Commit Graph

9 Commits

Author SHA1 Message Date
Steve Armand
7f77fd4581 Bug 1397423 - Enable py2 linter on python/mozlint. r=ahal
MozReview-Commit-ID: 6QX7YCmfjdJ
2017-09-06 22:52:46 -04:00
Andrew Halberstadt
f7b445f2f2 Bug 1339178 - Use pytest to run python-tests, r=davehunt
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).

There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py

For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.

MozReview-Commit-ID: Gcsz6z8MeOi
2017-08-29 14:50:33 -04:00
Tom Prince
4940d19984 Bug 1390699 - Follow-up: Use find_executable() to locate echo. r=ahal
MozReview-Commit-ID: QY8dajeXs0
2017-08-17 00:19:12 -06:00
Tom Prince
2c288fc5d1 Bug 1390699 - Don't try to test mozlint's --edit if echo isn't available; r=ahal
MozReview-Commit-ID: IMS91WthZtq
2017-08-15 16:45:00 -06:00
Andrew Halberstadt
c6c7ed20a2 Bug 1387555 - [mozlint] Make use of quickfix when using --edit with vim/nvim, r=dylan
MozReview-Commit-ID: BlJbWVv1CeO
2017-08-09 10:03:02 -04:00
Andrew Halberstadt
7bbf1b87c4 Bug 1387555 - [mozlint] After using --edit, run lint check again, r=dylan
MozReview-Commit-ID: BlJbWVv1CeO
2017-08-09 10:02:23 -04:00
Andrew Halberstadt
08bcc8004a 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
2017-08-10 09:21:17 -04:00
Sebastian Hengst
5638b3b5e2 Backed out changeset d24be9fbef98 (bug 1379151) for breaking Windows builds. r=backout on a CLOSED TREE 2017-08-10 16:55:11 +02:00
Andrew Halberstadt
7ca08a5bf6 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
2017-08-10 09:21:17 -04:00