cdifflint
Term based tool to view colored, incremental diff in a Git/Mercurial/Svn workspace or from stdin, side by side with affected linting errors. Requires python (>= 2.7.0) and less.
Installation
Install with pip
Cdifflint is already listed on PyPI, you can install with pip if you have the tool.
pip install --upgrade cdifflint
Install with setup.py
You can also run the setup.py from the source if you don’t have pip.
git clone https://github.com/rgeoghegan/cdifflint.git
cd cdifflint
./setup.py install
Usage
Type cdifflint -h to show usage:
$ 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
See also
The original code I cribbed from heavily is the cdiff tool, which does most of the heavy lifting.
Change log
Version 1.0.0 (2016-12-14)
Working off cdiff version 0.9.8, can now show diffs, and also list any linter output within the diff.
Version 1.0.1 (2016-12-24)
Fixing distributed package so it actually installs
Metadata
Release files for cdifflint 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cdifflint-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / cdifflint-1.0.1-py2.py3-none-any.whl
| Download URL | cdifflint-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e3d559382a85d4a6182ddcc2d782fc6199a5a6b07944f2fff3f27f72a9fba18f
|
|
BLAKE2b-256 checksum How to use checksums |
7889b0bd45a77cf07e09797a2cd74a70717b49af5ec5cf15d5f021bb803e3f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |