门禁检查
如何加入检查项
- 在ci_check/src/ac目录下新建文件夹放置检查项代码
- 在ac_conf.yaml中增加配置项
配置文件说明
示例=>
spec:
hint: check_spec
module: spec.check_spec
entry: Entry
exclude: true
ignored: []
allow_list: []
deny_list:[]
entry实现模板
from src.ac.framework.ac_base import BaseCheck
from src.ac.framework.ac_result import FAILED, SUCCESS, WARNING
class Entry(BaseCheck):
def __call__(self, *args, **kwargs):
...
def check_case_a(self):
return SUCCESS
检查结果
| 返回码 |
描述 |
emoji |
| 0 |
SUCCESS |
✅ |
| 1 |
WARNING |
🐛 |
| 2 |
FAILED |
❌ |
支持的检查项
| 检查项 |
目录 |
描述 |
| spec文件 |
spec |
检查homepage是否可以访问、版本号单调递增、检查补丁文件是否存在 |
| 代码风格 |
code |
检查压缩包文件、检查补丁是否可以使用、执行linter工具 |
| yaml文件 |
package_yaml |
|
| license检查 |
package_license |
|
| 代码片段检查 |
sca |
目前只针对自研项目 |