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

14 Коммитов

Автор SHA1 Сообщение Дата
Simon Fraser 1c95120d44 Bug 1468394 mach python-safety command for checking requirements files r=mtabara,tomprince
Added `./mach python-safety`, distinct from python-test so it doesn't have
to be run on every CI job - its errors may not depend on the area the push has changed.

Added the python/safety directory to ensure a different Pipfile is used, avoiding
conflicts with python-test.

Differential Revision: https://phabricator.services.mozilla.com/D1825

--HG--
extra : moz-landing-system : lando
2018-06-29 16:56:51 +00:00
Rob Wood 4af496d7f2 Bug 1454466 - Move raptor in-tree; r=ahal
MozReview-Commit-ID: AkqbROfvmbu

--HG--
extra : rebase_source : bf30030a333852d6d81c4278e91b1ac9fef237fe
2018-04-16 17:15:38 -04:00
Andrew Halberstadt 0515e13234 Bug 1373368 - [lint] Add support-files to all of the lint configs, r=standard8
MozReview-Commit-ID: ChOVmTFTmha

--HG--
extra : rebase_source : 41e4666401cd58b1022aa4eed936987300213b6a
2018-02-16 17:46:46 -05:00
Andrew Halberstadt e04895a098 Bug 1373368 - [mozlint] Raise if a non-existant path is specified in a lint config, r=standard8
Since I left the next two patches to bitrot, I realized that a path I had added
didn't exist anymore. We should definitely error out if non-existant paths are
specified, otherwise the lists will become outdated and it will be possible to
accidentally disable linting on some files.

I discovered a few instances of this already in our existing definitions.

MozReview-Commit-ID: 8jsTKLI0nFE

--HG--
extra : rebase_source : acceb0b129fc472fb456ff527e4c8c52228edd59
2018-03-29 14:50:17 -04:00
Andrew Halberstadt 4c232ca311 Bug 1436792 - [py-compat] Improve error messaging when python is missing, r=jmaher
This patch makes a few changes around error handling:

1) Prints the name of the linter that produced non-json output
2) Changes the 'python not found' error to a warning (as this is not fatal)
3) Makes sure said warning only gets printed once (by moving it to the setup function)

MozReview-Commit-ID: Dkq7CulTs91

--HG--
extra : rebase_source : 5d4bd32a62264a88520c09420f5acd90edcdc740
2018-02-08 14:26:15 -05:00
Andrew Halberstadt aaea466286 Bug 1436725 - [lint] Remove obsolete eslintvalidate files, r=standard8
As the eslintvalidate linters haven't been doing anything but printing
an error message for a month, this is just cleanup.

MozReview-Commit-ID: 5dhrSmEv0Gi

--HG--
extra : rebase_source : 30e588f47a69b152f72d29e6aaab7efbd59fbf09
2018-02-08 09:25:14 -05:00
iceman 5d31e3d10a Bug 1407763 - Enable py2 and py3 compat linters for testing/marionette. r=ahal
MozReview-Commit-ID: 4IYhPPGlJlo

--HG--
extra : rebase_source : a27b89c734082fc8acbc329ded75d7ef87d70dbe
2018-01-17 16:14:43 +01:00
Andrew Halberstadt 59d606ead7 Bug 1411568 - Enable py3 linter on testing/xpcshell r=stevea1+601043
MozReview-Commit-ID: 722pub6TTuQ

--HG--
extra : rebase_source : 54571c07d49cdb01b3593c861fa708f51fd2f7bd
2017-10-25 08:51:16 -04:00
Steve Armand fa0b6e7c7e Bug 1397849 - Enable py2 and py3 linter on testing/mozbase. r=ahal
MozReview-Commit-ID: GnaVLhtO4un

--HG--
extra : rebase_source : 8839a423c5db505469b813957649b1605ed5737f
2017-09-25 22:57:18 -04:00
Sebastian Hengst 73fac0091d Backed out changeset dbe60b600dc0 (bug 1397853) for failining linter py-compat at testing/mochitest/runtests.py:2236. r=backout 2017-09-28 14:58:36 +02:00
Steve Armand f8318d16e8 Bug 1397853 - Enable py2 and py3 linter on testing/mochitest. r=ahal
MozReview-Commit-ID: EhkNhyFHDox

--HG--
extra : rebase_source : 5200a985034c7ca0a494bc7d02a4c842e85dec3a
2017-09-24 21:28:25 -04:00
Kris Maglione e99cced382 Bug 1371065: Part 1 - Remove external references to the add-on SDK. r=Mossop,glandium
MozReview-Commit-ID: D5KyHcg8Ujk

--HG--
extra : rebase_source : 1a74ccb2963f2946a49c8bf720af595151b48fd1
2017-09-12 11:54:47 -07:00
Ionut Goldan f3028165fe Bug 1396217 - resolve py2 and py3 lint errors r=jmaher
MozReview-Commit-ID: LG332HzJKcw

--HG--
extra : rebase_source : b82da0cceac18f310cadf945578464c2fb4704c4
2017-09-08 11:27:26 +03:00
Andrew Halberstadt 3411e8b3d4 Bug 1391019 - Add py2 and py3 compatability linters, r=gps
check_compat.py was adapted from gps' check-py3-compat.py in mercurial:
https://www.mercurial-scm.org/repo/hg/file/tip/contrib/check-py3-compat.py

The py3 linter simply runs ast.parse(f) for each file being linted. Any syntax errors
are formatted as mozlint results and dumped to stdout as json. I looked into also
importing the file (using 3.5+'s importlib.util.spec_from_file_location), but there
were too many problems:

1. Lots of false positives (e.g module not found)
2. Some files seemed to run indefinitely on import

I decided to punt on importing for now, we can always investigate in a follow-up.

The py2 linter runs ast.parse(f), and also checks that the file has:
from __future__ import absolute_import, print_function

Initially every python file in the tree is excluded from the py2 check, though
at least this makes it easy to find+fix, and new files in un-excluded
directories will automatically be linted.

MozReview-Commit-ID: ABtq9dnPo9T

--HG--
extra : rebase_source : 60762937284d498514cd020b90cbfd2ba23f0b70
2017-08-31 10:12:02 -04:00