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

564 Коммитов

Автор SHA1 Сообщение Дата
Brendan Dahl f4384d768c Bug 1439766 - Replace editMenuOverlay.xul by inlining and preprocessing. r=Gijs
The overlay elements with children of editMenuOverlay.xul are moved into
include files (editMenuCommands.inc.xul and editMenuKeys.inc.xul). For
the other single elements in the overlay, the attributes are inlined
wherever they are used.

MozReview-Commit-ID: 792cuzUvQxT

--HG--
extra : rebase_source : 58e4c05bde16cee873d37c6198de102d048499c2
2018-02-22 15:48:24 -08:00
Brian Grinstead dcf493b621 Bug 1440094 - Allow `console` as a global for eslint;r=mossop
As of Bug 1425463 it's available in all contexts (including JSM). The following
patche is going to remove imports to Console.jsm, so prepare for this by allowing
it to be used as a global in eslint.

MozReview-Commit-ID: 3gCIspnlVgB

--HG--
extra : rebase_source : 6da75d42d7d937b628ef1d9c0d4e349fd76eda36
2018-02-27 11:29:35 -08:00
Andreea Pavel d805787970 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-02-28 00:25:43 +02:00
Andreea Pavel fa0861e443 Merge mozilla-inbound to mozilla-central. a=merge on a CLOSED TREE 2018-02-28 00:24:02 +02:00
Mark Banner 294979dc32 Bug 1441460 - ESLint's no-define-cc-etc looks at the wrong property item when checking for Cc/Ci/Cu/Cr usage. r=florian
MozReview-Commit-ID: IkSkCWqBHOn

--HG--
extra : rebase_source : 6b3a2977d4b157aea54c6e3f6960d3673e751a34
2018-02-23 20:42:17 +00:00
Peter Van der Beken 6cf0e1c871 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : f6f781b04923f67f60718706a78b3c4de15eca94
2018-02-22 20:22:29 +01:00
Simon Fraser b2f9f6fd8b Bug 1439860 update-packaging linting fixes and shell style updates r=bhearsum
MozReview-Commit-ID: 2vMbmonkVwD

--HG--
extra : rebase_source : 05e49e5c3013c0dd726c93f5e48e1b81879b97a9
2018-02-21 11:54:21 +00:00
Mark Banner 6afe18b30a Bug 1440379 - Tidy up ESlint no-unused-vars definitions wrt Ci/Cu/Cr/Cc usage for varsIgnorePattern. r=florian
MozReview-Commit-ID: HmliR8iNRDq

--HG--
extra : rebase_source : 483ae0b54b9e781cceac2accdfb2255d725ace6a
2018-02-22 16:55:36 +00:00
Mark Hammond 0ed1cfff09 Bug 1435929 - refactor browserid_identity.js to be less confusing and error prone. r=eoger,tcsc
MozReview-Commit-ID: IJPQv4ZvJlp

--HG--
extra : rebase_source : b3ed7ebfc2ccaf1dd23775372b2f4bb04b526ad8
2018-02-06 14:05:45 +11:00
Ciure Andrei 2a61dd0967 Backed out changeset 2e7cc4dc999c (bug 1435929) for eslint failure at /builds/worker/checkouts/gecko/services/sync/modules/browserid_identity.js a=backout on a CLOSED TREE 2018-02-25 09:37:26 +02:00
Mark Hammond 6afd2c2ec1 Bug 1435929 - refactor browserid_identity.js to be less confusing and error prone. r=eoger,tcsc
MozReview-Commit-ID: IJPQv4ZvJlp

--HG--
extra : rebase_source : d3052d120778dc1e8111ba76ee9df285d5483786
2018-02-06 14:05:45 +11:00
Mark Banner 8387fb332e Bug 1439949 - Update eslint to 4.18.1 to support async iteration. r=mossop
MozReview-Commit-ID: 6S8Fq7yHISq

--HG--
extra : rebase_source : 719181833e15bd299a20239ac546734dbb11509a
2018-02-21 16:00:24 +00:00
Kit Cambridge 04142e96e3 Bug 1439038 - Merge `Engine` and `SyncEngine`. r=eoger
MozReview-Commit-ID: GbuW3gFLCga

--HG--
extra : rebase_source : b15ea149ff5ddca7cdb45b0ef195c07bf4915411
2018-02-16 16:43:42 -08:00
Chris Peterson c6373306f8 Bug 1436263 - Part 5: Add a mach lint for virtual function declarations with multiple specifiers. r=froydnj r=ahal
Virtual function declarations should specify only one of `virtual`, `final`, or `override`, as per the Mozilla C++ style guide:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style

This lint warns about:

  virtual void Bad1() final
  void Bad2() final override
  void Bad3() override final

Caveats: This lint doesn't warn about `virtual void NotBad() override` at this time because there are 8000+ instances. It also doesn't warn about function declarations that span multiple lines because the regex can't match across line breaks.

MozReview-Commit-ID: LcBsOAKKgz7

--HG--
extra : rebase_source : 4da72ffac59acdc9796e3f540f24bb97af989cd0
2018-02-15 00:50:02 -08:00
Jared Wein e03f7fb6d1 Bug 1436575 - Remove autofix from rule since it is not reliable in all cases. r=standard8
MozReview-Commit-ID: AYrOuQ95fD6

--HG--
extra : rebase_source : 5f21cdf8d91b1521a80a5932d12e9b0480ca7635
2018-02-08 15:37:40 -05:00
Jared Wein 1225eda729 Bug 1436575 - Prevent ==/!= comparisons with booleans as they aren't necessary. r=standard8
MozReview-Commit-ID: 25oVDVNzDyF

--HG--
rename : tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-includes-instead-of-indexOf.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-compare-against-boolean-literals.js
rename : tools/lint/eslint/eslint-plugin-mozilla/tests/use-chromeutils-import.js => tools/lint/eslint/eslint-plugin-mozilla/tests/no-compare-against-boolean-literals.js
extra : rebase_source : 46b7159f659ae0182408d5f11ac2ebafb08fe2df
2018-02-08 11:51:17 -05:00
Andrew Halberstadt c731fa1f2c Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.

For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.

This patch ensures that we run the flake8 binary (and the pip for installing flake8) from
the same interpreter as mach, no matter the system default.

MozReview-Commit-ID: HSuMzDsAvsW

--HG--
extra : rebase_source : faf4c8c0eb6f46d8b50c2d9be9aa6f6d47e4e0cb
2018-02-07 23:28:33 -05:00
Kyle Machulis 173d6a7510 Bug 1437226 - Fix text-disable linter message; r=ahal
MozReview-Commit-ID: KA9y8AwgVj8
2018-02-12 12:28:41 -08:00
Edouard Oger a0cec42f04 Bug 1415951 - Extend TPS to support Addresses and Credit Cards. r=tcsc
MozReview-Commit-ID: 8VKBvm60ZSH

--HG--
extra : rebase_source : 88cb7b4145db018517c920907da79c70c46d50d2
2018-02-05 14:39:32 -06:00
Andrew Halberstadt 1805dcb2d3 Bug 1436792 - [py-compat] Fix issue opening the temporary manifest on Windows, r=jmaher
MozReview-Commit-ID: FmA1K8osuqe

--HG--
extra : rebase_source : ee557c78b1c959caa10a7862fbc732b4cf11792e
2018-02-08 14:26:27 -05: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
Noemi Erli b6751c929f Backed out changeset c9d150401eea (bug 1436639) for potential local workflow issues r=ahal on a CLOSED TREE 2018-02-08 19:45:07 +02: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
Andrew Halberstadt eced3471fc Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.

For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.

This patch ensures that we run:
python2.7 -m flake8

which explicitly runs flake8 against the same interpreter as mach, no matter the default.

MozReview-Commit-ID: HSuMzDsAvsW

--HG--
extra : rebase_source : d39f97ed0f82f4d2c81f044ef1f7dad0953a3d8d
2018-02-07 23:28:33 -05:00
Mark Banner 2fd2fd7199 Bug 1436389 - Update complexity rules to adapt for the algorithm in the new ESLint. r=mossop
MozReview-Commit-ID: 1LlfamNvBEM

--HG--
extra : rebase_source : 8e41e5a5f67bfd43444fde25287cb3709452a349
2018-02-07 16:16:09 +00:00
Mark Banner b4f572f5fa Bug 1436389 - Upgrade ESLint to version 4.17.0. r=mossop
MozReview-Commit-ID: I4KBELxhBlM

--HG--
extra : rebase_source : d206fb88f8c70d161cc0541a068db1b2f02e7a37
2018-02-07 16:01:29 +00:00
Mark Banner 54c4111311 Bug 1230369 - Add ESLint rules to disallow defining Cc/Ci etc and to prefer the use of Cc/Ci rather than the Components.* equivalents. r=florian
MozReview-Commit-ID: 9eAgUO3iIJW

--HG--
extra : rebase_source : 3208d5f74477733e4c81206613f74d7c7821ac0d
2018-02-06 22:40:12 +00:00
Andrew Halberstadt eb84bf741c Bug 1429457 - [mozlint] Create formal 'setup' mechanism for bootstrapping lint dependencies, r=gbrown
This allows linters to define a 'setup' method which will automatically be
called by |mach lint| before running the linter. Users can also explicitly run
these methods (without doing any actual linting) by running |mach lint --setup|.

MozReview-Commit-ID: 74aY1pfsaX1

--HG--
extra : rebase_source : e6a7d769ba14c996c7a77316928063fa46358c5a
2018-01-25 13:40:02 -05:00
Andrew Halberstadt 4a7ebcb3bb Bug 1434430 - [flake8] Upgrade version of flake8 used by |mach lint| to 3.5.0 r=rwood
MozReview-Commit-ID: BBtM4TEl4Ve

--HG--
extra : rebase_source : 94d276746401426c9adcae5c962380679ffcb083
2018-01-30 16:43:10 -05:00
Andrew Halberstadt f354075c7a Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN

--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
2018-01-31 14:32:08 -05:00
Andrew Halberstadt 974ae38a52 Bug 1434430 - [flake8] Drop support for the FLAKE8 environment variable r=rwood
The flake8 linter requires a specific version of flake8, so that running it
locally vs in CI vs in mozreview will all produce the same results.

Allowing consumers to specify a custom flake8 binary via the FLAKE8 environment
variable, subverts that goal and can result in unexplained errors showing up in
some configurations but not others.

MozReview-Commit-ID: 1s0nC8ZO6Qi

--HG--
extra : rebase_source : f3913e2bce7770edf8deba18890f063975ca0844
2018-01-31 14:05:52 -05:00
Gurzau Raul 1315ffda06 Merge inbound to mozilla-central. a=merge 2018-02-02 00:22:39 +02:00
Florian Quèze fcd9a3a0c8 Bug 1339461 - add an eslint rule to detect when indexOf should be replaced with includes, r=Standard8. 2018-02-01 20:47:23 +01:00
Andrew McCreight cf2f48b80d Bug 767640, part 2 - Update eslint rules to take into account the definitions of Ci, Cr, Cc and Cu. r=florian
MozReview-Commit-ID: 4PyMh0WeA4r

--HG--
extra : rebase_source : 868258ad6d98698f13faee5d6af67adcb20b63a2
2018-01-25 09:45:45 -08:00
Bogdan Tara 5c052cc871 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-01-31 12:10:31 +02:00
Bogdan Tara 1a6614b8b5 Merge inbound to mozilla-central. a=merge 2018-01-31 12:00:14 +02:00
Mark Banner 9a2172526a Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. r=florian.
MozReview-Commit-ID: 3vBWDR3UjGF

--HG--
extra : rebase_source : 61495d14a8d761e71b4072b02e2ca57e77f44059
2018-01-30 22:10:08 +00:00
arthur.iakab c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00
Mark Banner 15e66f33ed Bug 1434332 - Add a checklist for adding new linters to the tree. r=ahal
MozReview-Commit-ID: FnYIXS5oZvW

--HG--
extra : rebase_source : 2eba61a24a4ca313f3c1d65adef454e34c57bdb5
2018-01-30 16:55:20 +00:00
Dorel Luca 0e6d4442ff Backed out 2 changesets (bug 767640) for talos failure on scripts/MozillaFileLogger.js on a CLOSED TREE
Backed out changeset 073aecb9bee5 (bug 767640)
Backed out changeset 6bc5ccfb1bd3 (bug 767640)
2018-01-30 21:53:28 +02:00
Andrew McCreight aa6a1107ab Bug 767640, part 2 - Update eslint rules to take into account the definitions of Ci, Cr, Cc and Cu. r=florian
MozReview-Commit-ID: 4PyMh0WeA4r

--HG--
extra : rebase_source : da3db733d6c682ee137c90f8a5a9afaf85713c48
2018-01-25 09:45:45 -08:00
Kris Maglione 19a956c2c6 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
extra : amend_source : 09a90b29837e339eec7bdf8504f86c28e74ca3dd
extra : intermediate-source : a1eca62826a1341ca24d4d2a93d4884d4fc7ad51
extra : histedit_source : eb26e73b531f9a34d3401d39f60b533b27b78540
2018-01-18 16:27:26 -08:00
Kris Maglione 6425ff4f8d Bug 1431533: Part 4 - Add ESLint support for ChromeUtils import methods. r=florian
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.

The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.

MozReview-Commit-ID: 6Bgo6ohQA5j

--HG--
extra : source : fbef09c3e8af1653f270db589f73f2786c23ddc2
extra : intermediate-source : e2674287e57fbf6835729f42b8491359c2c4bfd5
2018-01-18 12:53:01 -08:00
George Dan, Ryan Neilsen, Dylan Turner 4cbac2527f Bug 1387632: Rename ProfileStorage module to FormAutofillStorage. r=MattN
--HG--
rename : browser/extensions/formautofill/ProfileStorage.jsm => browser/extensions/formautofill/FormAutofillStorage.jsm
extra : rebase_source : aa456b06046f1d995d65bec13044cde081559061
extra : histedit_source : 620bdb1c33de4b4b656066ea6432826f3631c3b4
2018-01-30 14:44:59 -08:00
Simon Fraser 5acab0f13e Bug 1432627 Add shellcheck linter to CI r=ahal
MozReview-Commit-ID: 2IYUsXunfab

--HG--
extra : rebase_source : 806ab4abfb1838a1b5eec279f5e93ce5c703685d
2018-01-29 15:27:04 +00:00
Margareta Eliza Balazs acf50fbab3 Backed out changeset 85794e045326 (bug 1432627) for shell lint failure in /builds/worker/checkouts/gecko/taskcluster/docker/firefox-snap/runme.sh:50:95 on a CLOSED TREE 2018-01-29 19:09:55 +02:00
Simon Fraser 82f0264fa1 Bug 1432627 Add shellcheck linter to CI r=ahal
MozReview-Commit-ID: 2IYUsXunfab

--HG--
extra : rebase_source : a40376ffc66e4a35d30e7e02a6ec208b1f52b021
2018-01-29 15:27:04 +00:00
Andrew Halberstadt a8b5fc493f Bug 1433912 - [lint] Only run codespell linter on python/mozlint and tools/lint for now, r=sylvestre
This is a bustage fix that needs to get out quickly. Once landed we can take
the time to enable it on more directories, or preferably change it to a
blacklist.

MozReview-Commit-ID: Gbf7q2L0tg3

--HG--
extra : rebase_source : a58ae64c655b24e686710a663d4538b4cfe020f7
2018-01-29 10:25:54 -05:00
Sylvestre Ledru 8238fab711 Bug 1433410 - Add codespell support for mach lint r=ahal
MozReview-Commit-ID: Ii6QjPMN0Ks

--HG--
extra : rebase_source : 854dc0994e9e204c5c5f9f25a4e956c9f51001d0
2018-01-27 10:35:31 +01:00
Kit Cambridge 2449a744b8 Bug 1305563 - Add a `BufferedBookmarksEngine` that can be toggled with a pref. r=markh,tcsc
This patch adds a new bookmarks engine, pref'd off, that writes to the
buffer instead of Places.

MozReview-Commit-ID: 7idBa03kOzm

--HG--
extra : rebase_source : 671ebeb3de824dc43c0ef14b2dfe065a33e2911a
2017-12-19 17:10:54 -08:00