跳转到主要内容

在工作区中查看带有您喜欢的代码检查器信息的彩色、增量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)

  • 修复分发的软件包,使其能够实际安装

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

此版本没有提供源代码分发文件。请参阅生成分发存档教程

构建分发

cdifflint-1.0.1-py2.py3-none-any.whl (8.9 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下机构支持