Граф коммитов

88 Коммитов

Автор SHA1 Сообщение Дата
Nick Alexander 16ab993262 Bug 1713683 - Run `setup` function with `lintargs` including log and virtual env binary path. r=ahal
This was oversight from Bug 1713178, which made black's `setup`
function require them but didn't bump the test.

Differential Revision: https://phabricator.services.mozilla.com/D116493
2021-06-02 21:24:49 +00:00
Nick Alexander a8f3540069 Bug 1713178 - Make `black` linter setup avoid updating the virtualenv if it's installed. r=ahal
This could be easily generalized to avoid the updating the virtualenv
more generally, but I think this functionality should be in the
`virtualenv_manager` -- something like `install_pip_binary(...)` -- so
I've just done the most impactful example here.

Differential Revision: https://phabricator.services.mozilla.com/D116148
2021-05-31 21:44:05 +00:00
Mitchell Hentges df45b126d1 Bug 1698616: Bump python dependencies r=firefox-build-system-reviewers,glandium
Did you know that our version of requests was from 2015? Phwoar!
This bumps `jinja2`, `py`, `pyyaml`, `requests` and `urllib3`.
There's significant risk for regressions due to breaking changes,
though due to the dynamic nature of Python, they're tricky to track
down.

The potential breaking changes I'm expecting to potentially affect
us are:

* `requests@2.11.0`: No longer accepts non-strings as header values.
* `requests@2.16.0`: `requests.packages` namespace was removed due to
  packages no longer being vendored. The namespace has been
  incrementally restored over future releases, but it's unclear to
  what degree.
* `requests@2.24.0`: Redirect resolution now only happens when
  `allow_redirects` is `True`.
* `requests` version of `urllib3` was bumped from `1.13.1` to `1.26`,
  unsure what repercussions that will have.

This also added dependencies to `flake8_requirements`. This is because
the vendored `importlib-metadata` update (and the new
`typing-extensions` dependency) is found by `pip`, but the
vendored `typing-extensions` is _not_ discovered (perhaps due to
details around "eggs" and the way we add vendored code to the sys.path).
So, `pip` tries to install it manually and fails when it finds no hash.
By re-compiling `flake8_requirements`, the necessary hashes are made
available.

Differential Revision: https://phabricator.services.mozilla.com/D108526
2021-05-04 20:43:26 +00:00
imoraru 63d199a7e6 Backed out changeset b413fce77522 (bug 1698616) for breaking mach commands (bug 1706456). a=backout 2021-04-21 14:16:08 +03:00
Mitchell Hentges 73f81b1c85 Bug 1698616: Bump python dependencies r=firefox-build-system-reviewers,glandium
Did you know that our version of requests was from 2015? Phwoar!
This bumps `jinja2`, `py`, `pyyaml`, `requests` and `urllib3`.
There's significant risk for regressions due to breaking changes,
though due to the dynamic nature of Python, they're tricky to track
down.

The potential breaking changes I'm expecting to potentially affect
us are:

* `requests@2.11.0`: No longer accepts non-strings as header values.
* `requests@2.16.0`: `requests.packages` namespace was removed due to
  packages no longer being vendored. The namespace has been
  incrementally restored over future releases, but it's unclear to
  what degree.
* `requests@2.24.0`: Redirect resolution now only happens when
  `allow_redirects` is `True`.
* `requests` version of `urllib3` was bumped from `1.13.1` to `1.26`,
  unsure what repercussions that will have.

This also added dependencies to `flake8_requirements`. This is because
the vendored `importlib-metadata` update (and the new
`typing-extensions` dependency) is found by `pip`, but the
vendored `typing-extensions` is _not_ discovered (perhaps due to
details around "eggs" and the way we add vendored code to the sys.path).
So, `pip` tries to install it manually and fails when it finds no hash.
By re-compiling `flake8_requirements`, the necessary hashes are made
available.

Differential Revision: https://phabricator.services.mozilla.com/D108526
2021-04-20 13:57:47 +00:00
championshuttler 1f5055fa54 Bug 1700423 - Remove py2 and py3 linters and their config from taskcluster.r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109647
2021-03-26 05:26:42 +00:00
Sylvestre Ledru 4b843f1ebf Bug 1699950 - mozlint/flake8: also update autopep8 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109234
2021-03-22 07:18:38 +00:00
Sylvestre Ledru 33d0032fc3 Bug 1699950 - Update to flake8 3.9.0 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109222
2021-03-22 07:18:38 +00:00
Sylvestre Ledru 8ffdec6355 Bug 1699950 - mozlint/flake8: Move to pip-compile r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109221
2021-03-22 07:18:37 +00:00
Alex Lopez 56dc4c7787 Bug 1682959 - Update pylint dependencies to ensure compatibility. r=mhentges
Conflicting pylint requirements were causing the new pip dependency resolver
to report an error. This updates the dependencies for pylint (using the hashin package)
so that the conflict is resolved.

Differential Revision: https://phabricator.services.mozilla.com/D106154
2021-02-25 18:36:59 +00:00
Renovate Bot bd82b1c554 no bug - Update dependency pylint to v2.6.2 r=linter-reviewers,andi DONTBUILD
Depends on D105298

Differential Revision: https://phabricator.services.mozilla.com/D105299
2021-02-16 12:57:04 +00:00
Akshat Dixit ad11827401 Bug 1591991 Add lint Fixed count support to linters r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D102082
2021-02-08 19:00:10 +00:00
Sylvestre Ledru f3bf06a03a Bug 1690745 - mozlint: Update to autopep8 1.5.5 r=linter-reviewers,marco,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104007
2021-02-04 10:00:13 +00:00
Mitchell Hentges f4a03e538f Bug 1680802: Install pylint requirements with legacy resolver r=firefox-build-system-reviewers,sheehan,glandium
pylint_requirements.txt fail to install with the new pip resolver due
to a conflict between astroid and lazy-object-proxy.
Rather than bumping those packages and handling the potential fallout,
the package-upgrade has been deferred and we will use the legacy
resolver in the interrim.

Differential Revision: https://phabricator.services.mozilla.com/D99940
2021-01-05 20:14:25 +00:00
Cosmin Sabou 8a46d2e9d6 Backed out 3 changesets (bug 1680802, bug 1680630) for turning Bug 1521378 into permafail. CLOSED TREE
Backed out changeset 3464c8f10994 (bug 1680630)
Backed out changeset 591d32364c0f (bug 1680802)
Backed out changeset 3e9350fd509d (bug 1680802)
2021-01-04 18:47:44 +02:00
Mitchell Hentges cdf668d1ae Bug 1680802: Install pylint requirements with legacy resolver r=firefox-build-system-reviewers,sheehan,glandium
pylint_requirements.txt fail to install with the new pip resolver due
to a conflict between astroid and lazy-object-proxy.
Rather than bumping those packages and handling the potential fallout,
the package-upgrade has been deferred and we will use the legacy
resolver in the interrim.

Differential Revision: https://phabricator.services.mozilla.com/D99940
2021-01-04 15:20:21 +00:00
championshuttler be0f060c18 Bug 1679073 - Print Version of Pylint in logs.r=sylvestre,linter-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D99712
2020-12-15 11:22:59 +00:00
Renovate Bot b1cecbf72f Bug 1679065 - Update dependency pylint to v2.6.0 r=linter-reviewers,marco DONTBUILD
Reported here: https://github.com/sylvestre/gecko-dev/pull/207/files

Differential Revision: https://phabricator.services.mozilla.com/D97896
2020-11-23 21:22:30 +00:00
championshuttler 41d3960fca Bug 1679056 - Update to flake8 3.8.4.r=sylvestre
PR can be found here:
https://github.com/sylvestre/gecko-dev/pull/165

./mach lint -l flake8

Differential Revision: https://phabricator.services.mozilla.com/D97895
2020-11-23 20:27:21 +00:00
Ricky Stewart 7860c29e4c Bug 1674923 - Pass down `virtualenv_manager` from `mach lint` down to linters r=ahal
Before, on Windows, this resulted in installing the package in the parent environment (not the `virtualenv`). We fix this by passing down the `virtualenv_manager` so linters can install packages they need using that object's helper methods.

Differential Revision: https://phabricator.services.mozilla.com/D95738
2020-11-06 20:51:16 +00:00
Ricky Stewart fe502f41e1 Bug 1660338 - Pass down location of `virtualenv` `bin` directory from `mach lint` invocation down to linters r=ahal
The logic the `black` and `flake8` linters were using to find the location of the appropriate binaries for linting was wrong in certain cases given how `mach lint` uses subprocesses to batch work. Instead, we allow the option to override the old janky behavior with a known-good path.

Differential Revision: https://phabricator.services.mozilla.com/D95396
2020-10-31 04:42:11 +00:00
Sylvestre Ledru da34b6a58e Bug 1661514 - Reformat some python files with black 20.8b1 r=rstewart
# ignore-this-changeset

Depends on D88711

Differential Revision: https://phabricator.services.mozilla.com/D88712
2020-09-07 14:05:10 +00:00
Sylvestre Ledru acd45d10e5 Bug 1661514 - Update to black 20.8b1 r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D88711
2020-09-07 15:25:29 +00:00
Cristina Coroiu 8eaafae8fd Backed out 2 changesets (bug 1661514) for lint failure on a CLOSED TREE
Backed out changeset 8e58c88f756b (bug 1661514)
Backed out changeset aef89f9a8031 (bug 1661514)
2020-09-01 19:34:12 +03:00
Sylvestre Ledru 5ee2fbd7cb Bug 1661514 - Reformat some python files with black 20.8b1 r=rstewart
# ignore-this-changeset

Depends on D88711

Differential Revision: https://phabricator.services.mozilla.com/D88712
2020-08-31 17:06:22 +00:00
Sylvestre Ledru 7b9bcc2a8b Bug 1661514 - Update to black 20.8b1 r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D88711
2020-08-31 17:05:08 +00:00
Andrew Halberstadt 9fb7a14b52 Bug 1654937 - [lint] Fix test_flake8.py::test_lint_excluded_file on Windows, r=linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D86411
2020-08-10 09:37:29 +00:00
Sylvestre Ledru 711e975c18 Bug 1650834 - mozlint/pylint - remove useless code r=marco
Differential Revision: https://phabricator.services.mozilla.com/D82490
2020-07-09 14:09:49 +00:00
Sylvestre Ledru 9b0a16fc65 Bug 1650834 - Make tools/lint code black compatible r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D82401
2020-07-09 14:09:31 +00:00
Chris AtLee d1fb386dae Bug 1555560: Add support for black formatting with mozlint; r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D33125
2020-07-08 22:08:08 +00:00
Mihai Alexandru Michis 5f385df474 Backed out 2 changesets (bug 1555560) for causing multiple lint failures.
CLOSED TREE

Backed out changeset bd9460ac6e48 (bug 1555560)
Backed out changeset f2896032ced6 (bug 1555560)
2020-07-09 01:04:18 +03:00
Chris AtLee 7f8f324f06 Bug 1555560: Add support for black formatting with mozlint; r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D33125
2020-07-08 19:35:49 +00:00
Manish Giri c61d108740 Bug 1650306 - mozlint/pylint - Enable 'no-else-return' rule r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D82507
2020-07-08 09:24:04 +00:00
Mihai Alexandru Michis 3a33785d38 Backed out changeset 9b15a67a50c3 (bug 1650834) as requested by Sylvestre.
CLOSED TREE
2020-07-07 11:49:36 +03:00
Sylvestre Ledru 9c734f1175 Bug 1650834 - Make tools/lint code black compatible r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D82401
2020-07-07 08:09:31 +00:00
Razvan Maries 65bc3a986b Backed out changeset 4911fdc92832 (bug 1650834) for Docker Images bustages. CLOSED TREE 2020-07-06 22:30:17 +03:00
Sylvestre Ledru 16145a8de0 Bug 1650834 - Make tools/lint code black compatible r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D82401
2020-07-06 18:11:28 +00:00
Andrew Halberstadt 47d424ae5d Bug 1648586 - [lint] Add missing 'colorama' to pylint_requirements.txt when on Windows, r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D82126
2020-07-03 12:16:50 +00:00
Sylvestre Ledru 3ff66789b4 Bug 1646421 - Update to flake8 3.8.3 (requires toml now) r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D80076
2020-06-20 10:24:29 +00:00
Sylvestre Ledru 45c363c275 Bug 1646421 - mozlint/flake8 remove the force-removal of the exclude list r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D80075
2020-06-20 09:45:59 +00:00
Sylvestre Ledru f47f1968a4 Bug 1623024 - mozlint: Add pylint as new linter r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D79076
2020-06-18 20:04:50 +00:00
Sylvestre Ledru 00ce6e0715 no bug - mozlint/flake8 - Show the flake8 version in debug mode r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D67322

--HG--
extra : moz-landing-system : lando
2020-03-20 18:49:09 +00:00
Andrew Halberstadt f4ff3c2181 Bug 1623339 - [lint.flake8] Fix path filtering bug when specifying subdirectory of excluded path, r=linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D67335

--HG--
rename : tools/lint/test/files/flake8/subdir/exclude/bad.py => tools/lint/test/files/flake8/subdir/exclude/exclude_subdir/bad.py
extra : moz-landing-system : lando
2020-03-18 17:02:34 +00:00
Andrew Halberstadt 9ad2608875 Bug 1623339 - [lint] Honour --no-filter in the flake8 linter, r=linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D67333

--HG--
extra : moz-landing-system : lando
2020-03-18 17:02:22 +00:00
Sylvestre Ledru df94d62f7f Bug 1611088 - Upgrade to autopep8 1.5 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D60807

--HG--
extra : moz-landing-system : lando
2020-01-23 14:06:09 +00:00
Andrew Halberstadt d3eae4b83c Bug 1580280 - [mozlint] Run |mach lint| with Python 3 and drop support for Python 2 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D45441

--HG--
extra : moz-landing-system : lando
2019-09-30 15:09:41 +00:00
Oana Pop Rus 4b9792db7c Backed out changeset 371641b1010b (bug 1580280) for lints failure on a CLOSED TREE 2019-09-26 00:18:33 +03:00
Andrew Halberstadt fdc7d0afac Bug 1580280 - [mozlint] Run |mach lint| with Python 3 and drop support for Python 2 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D45441

--HG--
extra : moz-landing-system : lando
2019-09-25 20:03:14 +00:00
Anmol Agarwal d6766388f1 Bug 1554657 - Add a verbose mode to |mach lint| to display log output r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D43507

--HG--
extra : moz-landing-system : lando
2019-09-23 13:19:25 +00:00
Andrew Halberstadt 5b5dc5542a Bug 1580280 - [lint] Support Python 3 in the flake8 integration r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D45436

--HG--
extra : moz-landing-system : lando
2019-09-11 10:00:58 +00:00