在工作区中查看带有您喜欢的代码检查器信息的彩色、增量diff。
项目描述
cdifflint
基于术语的工具,用于在Git/Mercurial/Svn工作区或从stdin中查看带有受影响的代码检查器错误的彩色、增量diff。需要python (> = 2.7.0) 和less。
安装
使用pip安装
Cdifflint已列在PyPI上,如果您有此工具,可以使用pip进行安装。
pip install --upgrade cdifflint
使用setup.py安装
如果您没有pip,也可以从源代码运行setup.py。
git clone https://github.com/rgeoghegan/cdifflint.git
cd cdifflint
./setup.py install
用法
输入cdifflint -h以显示用法
$ cdifflint -h usage: cdifflint [-h] [-s] [-w N] [-l] [-c M] [-t {pep8,jslint,pyflakes}] View colored, incremental diff in a workspace, annotated with messages from your favorite linter. optional arguments: -h, --help show this help message and exit -s, --side-by-side enable side-by-side mode -w N, --width N set text width for side-by-side mode, 0 for auto detection, default is 80 -l, --log show log with changes from revision control -c M, --color M colorize mode 'auto' (default), 'always', or 'never' -t {pep8,jslint,pyflakes}, --lint {pep8,jslint,pyflakes} run the given linters and show the lint messages in the diff. Currently supports pep8, jslint, pyflakes. (Can be specified multiple times) Note: Option parser will stop on first unknown option and pass them down to underneath revision control
另请参阅
我从其中大量借鉴的原始代码是cdiff工具,它完成了大部分繁重的工作。
变更日志
版本1.0.0(2016-12-14)
基于cdiff版本0.9.8,现在可以显示diff,还可以在diff中列出任何代码检查器输出。
版本1.0.1(2016-12-24)
修复分发的软件包,使其能够实际安装