连续IO检查/测试套件

ciocheck的Python项目详细描述


[![审查员代码质量](https://scrunizer-ci.com/g/continumio/ciocheck/badges/quality-score.png?b=master)](https://scrunizer-ci.com/g/continumio/ciocheck/?分支=主)
[![代码问题](https://www.quantifiedcode.com/api/v1/project/ccc68df612024e7e8fd386ffe2252a95/badge.svg)(https://www.quantifiedcode.com/app/project/ccc68df612024e7e8fd386ffe2252a95)



它利用了python可用的不同linting、格式化和测试工具
包括:

\linters
-[pep8](https://pep8.readthedocs.io/)(代码的样式检查)
-[pydocstyle](https://pydocstyle.readthedocs.io/en/latest/)(文档的样式检查)字符串)
-[flake8](http://flake8.readthedocs.io/en/latest/)(基于[pep8](https://pep8.readthedocs.io/)和[pyflakes](https://github.com/pyflakes/pyflakes))的样式检查
-[pylint](https://pylint.readthedocs.io/)(代码质量检查)

ub.com/hhato/autopep8)(代码格式化程序)
-[yapf](https://github.com/google/yapf)(代码格式化程序)
-[isort](https://github.com/timothycrosley/isort/)(导入语句格式化程序)

-[test-cov](http://pytest-cov.readthedocs.io/en/latest/)(运行代码[cove]rage](http://coverage.readthedocs.io/en/latest)和[pytest](http://pytest.org/latest/)库一起使用

还有一些额外的优点,比如:
-所有工具的单文件配置(仍在消除
冗余)
-自动添加文件夹containing python files
-为python文件自动添加自定义编码和版权头
-仅为暂存/未暂存或提交的diff运行工具(仅支持git)
-为修改的行、修改的文件或所有文件运行工具。

为什么要进行ciocheck?
有许多用于测试代码质量的提交后工具,但ciocheck的思想是在提交推送之前执行检查和自动格式化。

----------------------------------
ciocheck
https://github.com/continuMio/ciocheck
----------
[ciocheck]
inherit配置=.ciocheck
branch=origin/master
diff模式=commited
文件模式=行
检查=pep8,pydocstyle,flake8,pylint,pyformat,isort,autopep8,yapf,覆盖率,pytest
强制=pep8,pydocstyle,flake8,pylint,pyformat,isort,autopep8,yapf,覆盖率,pytest
python(pyformat)
标题=-*-编码:utf-8-*-
版权文件='.cionecoding'
add_copyright=true
add_header=true
add_init=true

https://pep8.readthedocs.io/en/release-1.7.x/intro.html配置---————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————----------------------------------
[pydocstyle]
add ignore=d203,
inherit=false

http://flake8.readthedocs.io/en/latest/config.html
--------------------------------
[flake8]
exclude=*/tests/*
ignore=e126,
max line length=79
max complexity=64

\---————————————————————————————————————————————————————————————————————————设置
ty=6,pytest,autopep8,yapf,pylint
行长度=79
节=未来,stdlib,第三方,第一方,本地文件夹--——
[yapf:style]
基于"u style=pep8
列限制=79
注释前的空格=2

——
[autopep8]
exclude=*/tests/*
ignore=e126,
max line length=99
aggressive=0



[coverage:run]
omit=
*/tests/


[coverage:report]
fail_under=0
show_missing=true
skip_covered=true
exclude_行数
必须重新启用标准pragma
pragma:no coverver
忽略本地文件测试
def test()
[coverage:no coverver
;忽略本地文件测试
def test()

":

#-----------------------------------
pytest
http://doc.pytest.org/en/latest/usage.html
-----------------------------------
[pytest]
addopts=-rfew--durations=10
python_functions=test
````

usage

``bash
usage:ciocheck[-h][--disable formatters][--disable linters]
[--disable tests][--file mode{lines,files,all}]
[--diff mode{committed,staged,unstaged}[--branch branch]
[--check{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autoep8,coverage,pytest}[{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}…]
[-强制{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}[{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}…]
[-配置配置文件]
文件夹[文件夹…]

uum分析测试套件。


位置参数:
要分析的文件夹。从repo根目录使用。'


可选参数:
--help,-h显示此帮助消息并退出

--disable formatters,-df跳过所有配置的格式化程序

--disable linter,-dl跳过所有配置的linter

--disable tests,-dt跳过运行测试

--file mode,-fm{lines,files,all}
定义工具是否应在
文件(默认)、修改文件或所有文件的修改行上运行

--diff mode,-dm{committed、staged、unstaged}
定义diff mode。默认模式已提交。

--branch,-b branch定义要与之比较的分支。默认分支是
"origin/master"选择要运行的工具。默认值为"pep8"

--enforce,-e{pep8,pydocstyle,flake8,pylint,pyformat,isort,yapf,autopep8,coverage,pytest}
选择要强制的工具。如果获得
结果,强制工具将失败。默认为"无"。

--config,-cf config_file选择要使用的配置文件。默认值为"无"。

```


仅在"某些模块"中检查导入的格式。


从git repo的根目录使用ciocheck(目前…)。

``bash
$ciocheck some\u模块/
```

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中的相等对象   java如何从列表视图中选择特定文件   java使用标识符“long”获取负值/错误值   二维数组中的java坐标邻近性   将XML转换为字符串JAVA   理论:关于Java识别数组名及其值   java创建一个密码应用程序。密码输入错误3次后如何结束循环   安卓 Cordova运行的Java版本错误。如何让Cordova运行特定的Java版本?   java向上滑动面板将panelHeight设置为Textview子高度   java当我使用jedis,set(字节[],字节[])或set(字符串,字符串)时,哪个性能更好?   java JTable不保存编辑更改   java语句。setQueryTimeout不会引发异常(SQL SERVER)   java为正确的对象创建对象   java如何通过(socket、线程)传输文件?   java如何在Android中使用Web服务?   java字符串数组:从用户获取信息并在数组中显示数字   协议缓冲区Protobuf生成的类中的newBuilder()是否创建新的Java对象?