Skip to main content

View colored, incremental diff in a workspace, annotated with messages from your favorite linter.

Project description

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-01-16)

  • Working off cdiff version 0.9.8, can now show diffs, and also list any linter output within the diff.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdifflint-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file cdifflint-1.0.0.tar.gz.

File metadata

  • Download URL: cdifflint-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cdifflint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7c123eef31cef4c00862f95e107581a89c2941a8d0585708e70e572367bc1c9
MD5 9446f0581002ef4ee48250986f9ba910
BLAKE2b-256 c98ea9e5a84267fd70f56cb45cb7e37313adfbdded2d084db6f993acb49044b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page