Commit Graph

75 Commits

Author SHA1 Message Date
Andrew Halberstadt
0e697ce235 Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps
This is a new module that will provide a place to store some common
abstractions around the 'blessings' module. The main entrypoint is:

    from mozterm import Terminal
    term = Terminal()

If blessings is available, this will return a blessings.Terminal()
object. If it isn't available, or something went wrong on import,
this will return a NullTerminal() object, which is a drop-in
replacement that does no formatting.

MozReview-Commit-ID: 6c63svm4tM5

--HG--
extra : rebase_source : 9ab221774d92a418d9b098d79bb2c88f75d937f8
2017-12-04 09:38:24 -05:00
Andreas Tolfsen
894334f11e Bug 1405304 - Add Unix formatter for mozlint. r=ahal
This patch introduces a new report formatter for the mozlint
framework used by "./mach lint" that respects Unix output conventions,
popularised by grep(1), compilers, and preprocessors.

The output format looks like this:

	testing/marionette/driver.js:1153:48: no-unused-vars error: 'resp' is defined but never used.

Many editors (ed, Emacs, vi, Acme) recognise this format, allowing
users to interact with the output like a hyperlink to jump to the
specified location in a file.

MozReview-Commit-ID: 3IyiFmNbtMY

--HG--
extra : rebase_source : a2628a999c187a1c43f3cc5d32e6db835028eca4
2017-10-03 14:45:17 +01:00
Andrew Halberstadt
a73d388c79 Bug 1401309 - [mozlint] Remove vcs.py and use mozversioncontrol instead, r=gps
This also migrates the vcs.py test to mozversioncontrol and adds a new task for
it.

MozReview-Commit-ID: 9jTRkjNupVA

--HG--
extra : rebase_source : 400f27498e00ea45234ad7c951770b098e916b8e
2017-09-25 16:30:27 -04:00
Andrew Halberstadt
d59f62ddf2 Bug 1392787 - [mozlint] Fix bugs in path filtering and add a test, r=jmaher
MozReview-Commit-ID: LG47ASBMA17

--HG--
extra : rebase_source : 3d6394d2839bf4c12dedbdb84f5b7dd118c92fea
2017-08-23 06:33:06 -04:00
Andrew Halberstadt
dae5d6aae4 Bug 1399522 - [mozlint] Properly handle directories in LineLinters, r=bc
Currently line linters (linters that open a file and process it line by line,
by applying a regex for example), don't handle directories. If a directory is
passed in, it will try to 'open' it, which fails. Directories can get hit  if
the linter has a directory in its include directive or if the user passes in
--no-filter.

This patch modifies LineLinters so that if a directory is detected, we search
for all relevant files under that directory. If 'extensions' is used, we'll
look for only files with appropriate extensions. Otherwise we assume the
linter wants every file.

MozReview-Commit-ID: D9lzTNuQTob

--HG--
extra : rebase_source : 0b952c06eae28b67b687813ff7e75b231b2dd4d3
2017-09-13 12:03:18 -04:00
Steve Armand
08d5fcd935 Bug 1397423 - Enable py2 linter on python/mozlint. r=ahal
MozReview-Commit-ID: 6QX7YCmfjdJ

--HG--
extra : rebase_source : 0610d67f376c462b0f103a6510f21459fc39f940
2017-09-06 22:52:46 -04:00
Andrew Halberstadt
f79b06a32a 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

--HG--
extra : rebase_source : 3c762422ce0af54cbbe7d9fc20085a2d1ebe7057
2017-08-29 14:50:33 -04:00
Andrew Halberstadt
2255a9eed7 Bug 1395126 - Support cascading configuration for flake8, r=bc
This allows .flake8 files to override one another, and fixes a pretty bad known
bug with our flake8 implementation. For example, say we have a .flake8 file at:
/foo/.flake8

Before this patch, if we ran |mach lint foo/bar|, the configuration defined in
that .flake8 file wouldn't get picked up. It would only work if running the
specific directory that contains it, e.g |mach lint foo|.

This change additionally allows multiple .flake8 files to be used. So if
there's one defined at both:
/.flake8
/foo/.flake8

Then running |mach lint foo/bar| will first apply the root .flake8, then the
one under /foo (overriding earlier configuration).

This bug still doesn't make flake8 configuration perfect though. Any directory
containing a .flake8 file still needs to be explicitly listed in the "include"
section of /tools/lint/flake8.yml. Otherwise in the example above, if running
|mach lint /|, it wouldn't be able to find /foo/.flake8. This is a hard problem
and is likely best solved by fixing flake8's upstream configuration handling.

Unfortunately this means we still can't switch from a whitelist to a blacklist.

MozReview-Commit-ID: 3DZAi1QHYYo

--HG--
extra : rebase_source : 51298c5847f6c2792581d9b312c87b70fa716ee1
2017-08-29 17:32:31 -04:00
Ted Mielczarek
afbf75cb40 bug 1371992 - make mozlint's LintRoller use concurrent.futures. r=ahal
There's a persistent test failure in automation that seems to have to do
with shutting down the `multiprocessing.Manager` that's used to get a
`Queue` to submit jobs to worker processes. After toying around with fixing
that I decided it would be simpler to just use concurrent.futures here,
since we already have it in-tree and it fits the use case here better
than using raw multiprocessing.

MozReview-Commit-ID: 8DdSvs2qp0q

--HG--
extra : rebase_source : 0b1cbb96bd3016778e4974a311722a8882f87216
2017-08-29 10:30:12 -04:00
Tom Prince
c29574c405 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
fdff416cd5 Bug 1390699 - Don't try to test mozlint's --edit if echo isn't available; r=ahal
MozReview-Commit-ID: IMS91WthZtq

--HG--
extra : rebase_source : 38e33b07fb7fdc4916fbb1469a22f19d871298aa
2017-08-15 16:45:00 -06:00
Andrew Halberstadt
411adfbc83 Bug 1387555 - [mozlint] Make use of quickfix when using --edit with vim/nvim, r=dylan
MozReview-Commit-ID: BlJbWVv1CeO

--HG--
extra : rebase_source : 005f72d9f74ccd86ae73a298acde6b0b3fd6a550
2017-08-09 10:03:02 -04:00
Andrew Halberstadt
81abb80919 Bug 1387555 - [mozlint] After using --edit, run lint check again, r=dylan
MozReview-Commit-ID: BlJbWVv1CeO

--HG--
extra : rebase_source : 18720a32c8ea562af1602ce4c32e46173c0ca4fb
2017-08-09 10:02:23 -04:00
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
Sebastian Hengst
aedd2b0e08 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
eb06963c9e 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 : 889c825dcde5e950e35bc64539b299988f82ac68
2017-08-10 09:21:17 -04:00
Justin Wood
f66ff278ca Bug 1387862 - Lint python/mozlint yaml files. r=ahal
We should have CI Lint YAML files in the tree.

MozReview-Commit-ID: IMOKGhxKFJW

--HG--
extra : rebase_source : 8c695dcb3a81b6683bc76ba663feeacb3126691e
2017-08-06 13:43:04 -04:00
Sebastian Hengst
ca07202265 Backed out changeset 103073e92350 (bug 1387862) 2017-08-10 14:29:48 +02:00
Justin Wood
582030b224 Bug 1387862 - Lint python/mozlint yaml files. r=ahal
We should have CI Lint YAML files in the tree.

MozReview-Commit-ID: IMOKGhxKFJW

--HG--
extra : rebase_source : a2e47f5c5517e999fe21bac4f86491611bd0cece
2017-08-06 13:43:04 -04:00
Ryan VanderMeulen
24396489e3 Backed out 7 changesets (bug 1387862) for yaml linting failures.
Backed out changeset 63f87f6db7d6 (bug 1387862)
Backed out changeset a85b7e7d9f24 (bug 1387862)
Backed out changeset 3713ea9672e8 (bug 1387862)
Backed out changeset 22c1094e387f (bug 1387862)
Backed out changeset e0bfb35b0eec (bug 1387862)
Backed out changeset 5bb5dc7655ec (bug 1387862)
Backed out changeset cc4c01794114 (bug 1387862)
2017-08-09 21:31:30 -04:00
Justin Wood
906fda8397 Bug 1387862 - Lint python/mozlint yaml files. r=ahal
We should have CI Lint YAML files in the tree.

MozReview-Commit-ID: IMOKGhxKFJW

--HG--
extra : rebase_source : 0ef71f24141a531833d48f2a305183dd808f00f5
2017-08-06 13:43:04 -04:00
Wes Kocher
223f322400 Merge m-c to autoland a=merge
MozReview-Commit-ID: 2qLtb79Nlhs
2017-08-08 15:26:30 -07:00
Dyex
db4f4de93a Bug 1369710 - [mozlint] Ensure that a valid path is entered. r=ahal
MozReview-Commit-ID: 6HOE9hmOkCx

--HG--
extra : rebase_source : 584a4391b832e794dc084254e9203b3a65c89419
2017-08-08 19:20:31 +05:30
Justin Wood
4a6556fa3c Bug 1387830 - Make ./mach lint able to output available linters. r=ahal
MozReview-Commit-ID: 2hRtfzohwTR

--HG--
extra : rebase_source : 18275b1015f19b98461ebb849555a02fed335462
2017-08-06 09:41:05 -04:00
Wes Kocher
0854f5772d Backed out changeset 393b0727cba4 (bug 1387830) for flake8 failures a=backout
MozReview-Commit-ID: IOTenjMeVmt
2017-08-08 09:19:39 -07:00
Justin Wood
5381aa19f5 Bug 1387830 - Make ./mach lint able to output available linters. r=ahal
MozReview-Commit-ID: 2hRtfzohwTR

--HG--
extra : rebase_source : 7658b23e5456377bca9d20b5be93b40ca3c65ecc
2017-08-06 09:41:05 -04:00
Andrew Halberstadt
efd355d4d2 Bug 1306122 - [mozlint] Create a compact formatter that mimics the eslint 'compact' format, r=armenzg
MozReview-Commit-ID: 5JJJhMIrMIB

--HG--
extra : rebase_source : 2c8388e20005f7cc67c31fd631e96def452e5416
2017-08-04 10:53:43 -04:00
Andrew Halberstadt
6e2032d8c4 Bug 1361972 - [mozlint] Add ability to only lint staged changes to --workdir with git r=standard8
MozReview-Commit-ID: DUxCKN2fiag

--HG--
extra : rebase_source : 11bb7808c7d0f1c02eaea93dc61723d17e921eeb
2017-06-30 18:29:31 -07:00
Andrew Halberstadt
96fe8190c2 Bug 1375834 - [mozlint] Stop printing vcs command used if command returns non-zero, r=bc
MozReview-Commit-ID: HfG5CqQDIdr

--HG--
extra : rebase_source : 062d201073a13a906e156cee6592ef5251ab39d6
2017-06-23 08:55:04 -04:00
Andrew Halberstadt
af86c88b2f Bug 1369787 - [mozlint] Add a test for vcs operations, r=bc
Create a test for version control related functionality.

MozReview-Commit-ID: GXd27O69GNg

--HG--
extra : rebase_source : 56ce4a38b591fd62f05fbaed0ff05d56ec127422
2017-06-08 14:28:37 -04:00
Andrew Halberstadt
4761330083 Bug 1369787 - [mozlint] Fix up version control commands, r=standard8
The underlying commands to mozlint's vcs.py had a few problems. This:

    1. Ensures deleted files aren't considered in both hg and git
    2. Automatically determines the default remote repo and branch when using --outgoing with git
    3. Excludes metadata from output of the git command used with --outgoing
    4. Adds --cached to the git command for --workdir, which lints all staged files

MozReview-Commit-ID: EBtM3MCiCDs

--HG--
extra : rebase_source : 982b24acd81c86e383b28b8a71bcd51a041e60f4
2017-06-08 23:31:16 -04:00
Andrew Halberstadt
5fde640164 Bug 1369787 - [mozlint] Refactor vcs.py into separate classes for hg and git, r=bc
The old method had a bunch of 'if vcs == git' statements and the like. This
made it hard to follow code paths for a given vcs system. I think this refactor
makes things cleaner to read. It shouldn't be changing any functionality.

MozReview-Commit-ID: EBtM3MCiCDs

--HG--
extra : rebase_source : 9c0fda3f4f824351bae852af25bcd2240b1b1024
2017-06-08 23:31:02 -04:00
Andrew Halberstadt
91efad9d6d Bug 1369787 - [mozlint] Remove 'rev' option from |mach lint|, r=bc
The rev option is inherently broken. It does let you lint files touched by any
revision, but it doesn't update those files to that revision first.  Instead,
they get linted at whatever the working directory is and their results are
bogus. Even if we did some magic to update the files to the proper revision
with in-memory version control magic, the config files would still be out of
date.

Plus, the new --outgoing option does pretty much the only thing --rev was good
for. Rather than cause confusion, I think it's better to just remove the
option.

MozReview-Commit-ID: 2y2UnfIkvsR

--HG--
extra : rebase_source : 9b5c142270c98905d71ebb89d1620e91914c0b47
2017-06-08 22:54:00 -04:00
Andrew Halberstadt
4b93103061 Bug 1375166 - [mozlint] Don't require leading '.' in extensions, r=standard8
This was a regression from bug 1288432. The 'extensions' config in mozlint required a
leading period, but eslint requires them without the period (and this got copied over
to the linter definition). The result was mozlint filtering out any files (not dirs)
that were passed in.

This just modifies mozlint to strip out the period so both are acceptable.

MozReview-Commit-ID: CbNynYzrbGz

--HG--
extra : rebase_source : 51c740cb1d2febaee3ae46784f83381cda5e5eaa
2017-06-21 13:22:34 -04:00
Andrew Halberstadt
9a082a086c Bug 1288432 - [mozlint] Use yaml for lint definitions and separate implementation of external linters, r=bc
Rather than using .lint.py files that contain a LINTER object, linter definitions are now in
standalone .yml files. In the case of external linters that need to run python code, the payload
is now of the form:
<module path>:<object path>

The <module path> is the import path to the module, and <object path> is the callable object to
use within that module. It is up to the consumer of mozlint to ensure the <module path> lives on
sys.path. For example, if an external lint's function lives in package 'foo', file 'bar.py' and
function 'lint', the payload would read:
foo.bar:lint

This mechanism was borrowed from taskcluster.

MozReview-Commit-ID: AIsfbVmozy4

--HG--
rename : python/mozlint/test/linters/badreturncode.lint.py => python/mozlint/test/linters/badreturncode.yml
rename : python/mozlint/test/linters/explicit_path.lint.py => python/mozlint/test/linters/explicit_path.yml
rename : python/mozlint/test/linters/external.lint.py => python/mozlint/test/linters/external.yml
rename : python/mozlint/test/linters/invalid_exclude.lint.py => python/mozlint/test/linters/invalid_exclude.yml
rename : python/mozlint/test/linters/invalid_extension.lnt => python/mozlint/test/linters/invalid_extension.ym
rename : python/mozlint/test/linters/invalid_include.lint.py => python/mozlint/test/linters/invalid_include.yml
rename : python/mozlint/test/linters/invalid_type.lint.py => python/mozlint/test/linters/invalid_type.yml
rename : python/mozlint/test/linters/missing_attrs.lint.py => python/mozlint/test/linters/missing_attrs.yml
rename : python/mozlint/test/linters/missing_definition.lint.py => python/mozlint/test/linters/missing_definition.yml
rename : python/mozlint/test/linters/raises.lint.py => python/mozlint/test/linters/raises.yml
rename : python/mozlint/test/linters/regex.lint.py => python/mozlint/test/linters/regex.yml
rename : python/mozlint/test/linters/string.lint.py => python/mozlint/test/linters/string.yml
rename : python/mozlint/test/linters/structured.lint.py => python/mozlint/test/linters/structured.yml
extra : rebase_source : bda3926712234123355c5af71c6453ce869b19fc
2017-06-02 09:49:26 -04:00
Mark Banner
021f1ff90a Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : python/mozlint/test/linters/badreturncode.lint => python/mozlint/test/linters/badreturncode.lint.py
rename : python/mozlint/test/linters/explicit_path.lint => python/mozlint/test/linters/explicit_path.lint.py
rename : python/mozlint/test/linters/external.lint => python/mozlint/test/linters/external.lint.py
rename : python/mozlint/test/linters/invalid_exclude.lint => python/mozlint/test/linters/invalid_exclude.lint.py
rename : python/mozlint/test/linters/invalid_include.lint => python/mozlint/test/linters/invalid_include.lint.py
rename : python/mozlint/test/linters/invalid_type.lint => python/mozlint/test/linters/invalid_type.lint.py
rename : python/mozlint/test/linters/missing_attrs.lint => python/mozlint/test/linters/missing_attrs.lint.py
rename : python/mozlint/test/linters/missing_definition.lint => python/mozlint/test/linters/missing_definition.lint.py
rename : python/mozlint/test/linters/raises.lint => python/mozlint/test/linters/raises.lint.py
rename : python/mozlint/test/linters/regex.lint => python/mozlint/test/linters/regex.lint.py
rename : python/mozlint/test/linters/string.lint => python/mozlint/test/linters/string.lint.py
rename : python/mozlint/test/linters/structured.lint => python/mozlint/test/linters/structured.lint.py
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 97de88e0328e91347192672b848b286df1904ade
2017-04-21 17:31:15 +01:00
Carsten "Tomcat" Book
1dd975c180 Backed out changeset eec770d062b4 (bug 1358540) for bustage
--HG--
rename : tools/lint/eslint.lint.py => tools/lint/eslint.lint
rename : tools/lint/flake8.lint.py => tools/lint/flake8.lint
rename : tools/lint/wpt.lint.py => tools/lint/wpt.lint
rename : tools/lint/wpt_manifest.lint.py => tools/lint/wpt_manifest.lint
2017-04-25 10:15:07 +02:00
Mark Banner
8e42062ea3 Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 66e4b4f95109c2645d0fb7be273de343408b9406
2017-04-21 17:31:15 +01:00
Andrew Halberstadt
8d7db75ee7 Bug 1340162 - Add task for running mozlint unitttests on Linux (and pull old tests out of make check), r=smacleod
MozReview-Commit-ID: 3XCWMJtQMvZ

--HG--
extra : rebase_source : 290c14cda5b7abf6aea43315fc91c0ac8fc869f0
2017-02-02 11:08:41 -05:00
Mike Hommey
dc5d1e6adf Bug 1335309 - Change the default for find_executables to False. r=mshal
Back when the class was written, for the packaging code, it made sense
that the default was True. But now that it's used all over the place,
and that the vast majority of uses are with find_executables=False, it
makes more sense for that to be the default.

--HG--
extra : rebase_source : ff813735fc0d53093f348f20eb77ee03e9b09d4e
2017-01-31 14:06:15 +09:00
Francesco Pischedda
8a2906dd4f Bug 1313194 - Add --outgoing argument to mozlint. r=ahal
Was: Replace mozlint's --rev with a --outgoing argument

MozReview-Commit-ID: 5YcRWbc1dR4

--HG--
extra : rebase_source : e13fca582d37fb40ba9d7782413190da4c1fa8b3
2017-01-26 17:50:34 +01:00
Andrew Halberstadt
b994a9eca5 Bug 1318597 - Explicitly call manager.shutdown() after running mozlint, r=mshal
This is an educated guess in an attempt to solve a hard to reproduce intermittent. This
also makes sure the original SIGINT handler is restored after running the linters.

MozReview-Commit-ID: HRo0GRlSN5L

--HG--
extra : rebase_source : 7b8bf4b5818d741b5ab6a38c8c56f4eb53a801c8
2017-01-23 17:35:03 -05:00
Andrew Halberstadt
6adcf5b456 Bug 1317970 - Use manifestparser manifests for python unit tests, r=chmanchester
This deprecates PYTHON_UNIT_TESTS and replaces it with PYTHON_UNITTEST_MANIFESTS.
In the build system, this means python unittests will be treated the same as all
other test suites that use manifestparser. New manifests called 'python.ini' have
been created for all test directories containing python unittests.

MozReview-Commit-ID: IBHG7Thif2D

--HG--
extra : rebase_source : 11a92a2bc544d067946bbd774975140147458caa
2016-11-16 09:59:22 -05:00
Andrew Halberstadt
4524d8939a Bug 1318488 - [mozlint] Use sys.stdout.encoding when printing formatter's output, r=smacleod
This fixes a UnicodeDecodeError when sys.stdout's encoding can't handle unicode.

MozReview-Commit-ID: 3INna8MRje5

--HG--
extra : rebase_source : bb8f3b5cbdbb6601b6946d5fbb7396848f22b5c6
2016-11-17 17:36:34 -05:00
Andrew Halberstadt
7c26ce739c Bug 1316925 - Keep track of failed linters in stylish formatter summary, r=jgraham
This replaces the "return_code" property on the LintRoller object with a list of "failed"
linters. This is a bit more useful as it lets us know exactly which linters had a problem
(whereas previously we just knew *something* went wrong). This patch pushes determining
the return code back into cli.py, which I think is fine.

In addition, we now pass the list of failed linters into the formatter. This allows us to
clarify exactly how many linters hit a failure which is a lot better than a seemingly
"successful" summary message.

Finally I also removed the "no files to lint" message because I've seen several people
confuse it for an error. I'll probably add it back as a debug log message when we switch
to using mozlog for output.

MozReview-Commit-ID: 4wyCeOZdOf8

--HG--
extra : rebase_source : 23810a8ab8dd9cbbad6b9e965ccff7214f947fbc
2016-11-14 11:56:46 -05:00
Andrew Halberstadt
5b45c5a120 Bug 1315805 - [mozlint] Make sure multiprocess' stdout gets flushed in lint tasks, r=dustin
MozReview-Commit-ID: FhOI92JySXg

--HG--
extra : rebase_source : f3de6198a2616315358e3e3be1441df0713b442f
2016-11-08 13:33:13 -05:00
Andrew Halberstadt
dde3965629 Bug 1309963 - Make sure return codes are passed from .lint files up to the cli, r=jgraham
If a linter returns a status code instead of a list of results, mozlint will throw away
that status code and move on to the next linter. We should make sure that status code
bubbles all the way up to the cli.

MozReview-Commit-ID: 9fXpmtlUUT1

--HG--
extra : rebase_source : 84c80d1b24d7233d0c4c6e38b23e775110776d1f
2016-10-13 16:23:13 -04:00
James Graham
bba975bca2 Bug 1302796 - Add integration between structured logging and lints, r=ahal
MozReview-Commit-ID: K3tu0Zdg5go

--HG--
extra : rebase_source : 2b78059908c3a297b8ce7d134af20733fc082df5
2016-09-13 14:18:41 +01:00
Andrew Halberstadt
98a0fd6336 Bug 1302172 - [mozlint] Convert unittest tests to use pytest instead, r=maja_zf
MozReview-Commit-ID: D4bN62QbkKm

--HG--
extra : rebase_source : 22ffe05ca78095fc469520b9f85d93585251cd1c
2016-09-09 16:20:09 -04:00
Andrew Halberstadt
0f35e014fa Bug 1300779 - [mozlint] Redirect stderr when detecting version control root, r=smacleod
This avoids printing harmless (but confusing) errors to the log. For instance, git users
will see a '.hg not found!' error in the output even though not finding an hg repo is
expected in that case.

MozReview-Commit-ID: DBPOabcV7PA

--HG--
extra : rebase_source : a40de185cd4bf0c58917065d1331e0e663b92b94
2016-09-06 10:36:45 -04:00