gecko-dev/python/mozlint
Andrew Halberstadt 10f8b7e161 Bug 1379151 - Add --fix and --edit to mozlint, r=standard8
While --fix previously worked with eslint, it is now more official (will show
up in the |mach lint --help|).  ESlint is still the only thing that implements
it, but we can implement it for flake8 using the `autopep8` module.

--edit is a new concept that will open an editor for each failing file to let
you fix the errors manually.  For now it is very naive (just opens the file),
and is only really useful if you have an editor integration for the linter(s).
But in the future I'd like to have editor-specific implementations for this.
For example, with vim, we can use -q to pass in an error file that will start
the editor pre-populated with a list of all errors that can then be easily
jumped to. Other editors may just open up to the line containing the error.

--fix and --edit can be used in conjunction with one another. Doing that means
only errors that can't be fixed automatically will show up in your editor.


MozReview-Commit-ID: 5JJJhMIrMIB

--HG--
extra : rebase_source : 2f78a77a91133d7fcc5620ecd5caa500decbce1b
2017-08-10 09:21:17 -04:00
..
mozlint Bug 1379151 - Add --fix and --edit to mozlint, r=standard8 2017-08-10 09:21:17 -04:00
test Bug 1379151 - Add --fix and --edit to mozlint, r=standard8 2017-08-10 09:21:17 -04:00
setup.py Bug 1302796 - Add integration between structured logging and lints, r=ahal 2016-09-13 14:18:41 +01:00