1 Star 0 Fork 1

Maurice_575c/colcon-mixin-repository

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lint.py 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
Dirk Thomas 提交于 2018-09-07 16:30 . relax line length check (#9)
#!/usr/bin/env python3
"""Lint the index.yaml file as well as all files ending with .mixin."""
import os
import sys
try:
from yamllint.cli import run
except ImportError:
sys.exit("Failed to import Python package 'yamllint'")
any_error = False
for name in sorted(os.listdir()):
if name != 'index.yaml' and not name.endswith('.mixin'):
continue
try:
run([
'--config-data',
'{'
'extends: default, '
'rules: {'
'document-start: {present: false}, '
'empty-lines: {max: 0}, '
'key-ordering: {}, '
'line-length: {max: 999}'
'}'
'}',
'--strict',
name,
])
except SystemExit as e:
any_error |= bool(e.code)
continue
assert False, 'run() should always raise SystemExit'
sys.exit(1 if any_error else 0)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Maurice_575c/colcon-mixin-repository.git
[email protected]:Maurice_575c/colcon-mixin-repository.git
Maurice_575c
colcon-mixin-repository
colcon-mixin-repository
master

搜索帮助