Commit graph

124 commits

Author SHA1 Message Date
Tooru Fujisawa
ab853db23f Bug 1773747 - Part 6: Add ESLint rule to check immediately-used lazy getter. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149867
2022-06-24 11:03:53 +00:00
Tooru Fujisawa
81ada6ab87 Bug 1772358 - Add ESLint rule to reject defining lazy getters for always available modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149872
2022-06-24 11:03:50 +00:00
Mark Banner
e4e8d3c73f Bug 1771173 - Add ESLint rule to check for correct usages of lazy. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D149718
2022-06-21 20:42:16 +00:00
Tooru Fujisawa
088b6d97cd Bug 1771097 - Add ESLint rule for ChromeUtils.defineESModuleGetters lazy object name. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D147400
2022-06-17 04:59:13 +00:00
criss
8fc8ec5d8e Backed out 8 changesets (bug 1771092, bug 1768870, bug 1771097, bug 1769002, bug 1768819) for causing mochitest failures on browser_sendQuery.js. CLOSED TREE
Backed out changeset 8a4d712f819a (bug 1771092)
Backed out changeset f4e27a35c83c (bug 1771092)
Backed out changeset 072323bc72cc (bug 1771092)
Backed out changeset 2ccf2a00fff7 (bug 1769002)
Backed out changeset ba7086fd9b1f (bug 1768819)
Backed out changeset 6205d3e2c666 (bug 1771097)
Backed out changeset 960f0aee97d5 (bug 1768870)
Backed out changeset 5f53760c5637 (bug 1768870)
2022-06-17 05:44:37 +03:00
Tooru Fujisawa
c0ff62bb21 Bug 1771097 - Add ESLint rule for ChromeUtils.defineESModuleGetters lazy object name. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D147400
2022-06-17 01:30:23 +00:00
Mark Banner
8ca4d49d65 Bug 1766228 - Add an ESLint rule to ensure that member property accesses of Services are valid. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D149393
2022-06-16 21:11:24 +00:00
Molnar Sandor
c1ae6857f8 Backed out 9 changesets (bug 1769002, bug 1768870, bug 1771097, bug 1771092, bug 1768819) for causing lint failures. CLOSED TREE
Backed out changeset 829df1dfad70 (bug 1769002)
Backed out changeset f0537d333adc (bug 1771092)
Backed out changeset 25b43856bc00 (bug 1771092)
Backed out changeset a49f754ca73f (bug 1771092)
Backed out changeset 164f85686a32 (bug 1769002)
Backed out changeset ef5cf9ceb915 (bug 1768819)
Backed out changeset c64e6c1fbfe7 (bug 1771097)
Backed out changeset f85393f988a8 (bug 1768870)
Backed out changeset fe708d13cc1d (bug 1768870)
2022-06-16 20:15:14 +03:00
Tooru Fujisawa
a1c76f5683 Bug 1771097 - Add ESLint rule for ChromeUtils.defineESModuleGetters lazy object name. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D147400
2022-06-16 16:20:36 +00:00
Norisz Fay
7cd43cc697 Backed out 5 changesets (bug 1766228) for causing lint failures on test_restrequest.js CLOSED TREE
Backed out changeset 5ff1634cfe18 (bug 1766228)
Backed out changeset 01642c97e7a5 (bug 1766228)
Backed out changeset cbba28151712 (bug 1766228)
Backed out changeset 76a32127865d (bug 1766228)
Backed out changeset 2c7ef1ad380a (bug 1766228)
2022-06-16 16:36:44 +03:00
Mark Banner
1383258437 Bug 1766228 - Add an ESLint rule to ensure that member property accesses of Services are valid. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D149393
2022-06-16 12:09:28 +00:00
Tooru Fujisawa
2337bc5418 Bug 1772299 - Reject modification to globalThis inside system module. r=Standard8,webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D148116
2022-06-15 22:20:53 +00:00
Ray Kraesig
4fc7f7613e Bug 1772856 - Clean up formatting r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D148417
2022-06-15 07:12:02 +00:00
Ray Kraesig
24e0619a0d Bug 1772856 - Add designated initializers to list of acceptable C++ features r=firefox-build-system-reviewers,bholley,glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D148416
2022-06-15 07:12:02 +00:00
Tooru Fujisawa
9975cd7318 Bug 1771751 - Reject static import for system module from non-system module. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149183
2022-06-14 21:56:55 +00:00
Tooru Fujisawa
371b3c1d97 Bug 1607331 - Part 3: Reject global this usage in JSM. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148551
2022-06-14 21:56:55 +00:00
Bobby Holley
99677cea83 Bug 1772234 - Update the style guide to deprecate rooting API typedefs. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D148081
2022-06-02 21:01:42 +00:00
Mark Banner
889c6efaf2 Bug 1768031 - Reject top-level await in modules via an ESLint rule. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D145892
2022-05-11 14:08:15 +00:00
Janvi Bajoria
c68c01937d Bug 1759754 - fix use the static preference API link in C++ coding style documentation r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D144191
2022-05-10 17:26:31 +00:00
Tooru Fujisawa
231114fa17 Bug 1548308 - Remove modules.json. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D145695
2022-05-06 12:35:33 +00:00
Mathew Hodson
05c78de712 Bug 1630027 - Migrate RTL Guidelines from MDN. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142183
2022-05-06 07:16:58 +00:00
Mathew Hodson
34e2ece16f Bug 1630027 - Migrate CSS Guidelines from MDN. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142163
2022-05-06 07:16:48 +00:00
Mathew Hodson
d83e906b06 Bug 1630027 - Migrate SVG Guidelines from MDN. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142184
2022-05-06 07:16:48 +00:00
Mark Banner
67e9352298 Bug 1766238 - Disallow more than one argument to ChromeUtils.import via ESLint. r=mossop
Depends on D144562

Differential Revision: https://phabricator.services.mozilla.com/D144563
2022-04-27 08:38:35 +00:00
Barret Rennie
c34d04e40e Bug 1765675 - Reject OS.Path usage in reject-osfile lint r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D144307
2022-04-26 17:34:35 +00:00
Kagami Sascha Rosylight
7f736cdebf Bug 1703953 - Part 1: Implement mozilla/use-isinstance rule r=Gijs,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D111354
2022-04-06 11:57:56 +00:00
Mark Banner
a6d11f320d Bug 1760286 - Add missing docs for rules in eslint-plugin-mozilla. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D142285
2022-03-30 17:40:15 +00:00
Gijs Kruitbosch
4d3b6146b8 Bug 1753696 - use an eslint rule to switch to add_setup(), r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D139542
2022-03-30 16:16:42 +00:00
Norisz Fay
acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
35d2a4ca12 Bug 1753696 - use an eslint rule to switch to add_setup(), r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D139542
2022-03-30 08:18:51 +00:00
criss
4eec7e25a3 Backed out 3 changesets (bug 1703953) for causing multiple failures. CLOSED TREE
Backed out changeset 871a1fac289e (bug 1703953)
Backed out changeset 8151244bda18 (bug 1703953)
Backed out changeset eaf6d4c353be (bug 1703953)
2022-03-29 17:01:58 +03:00
Kagami Sascha Rosylight
cbfca993e7 Bug 1703953 - Part 1: Implement mozilla/use-isinstance rule r=Gijs,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D111354
2022-03-29 13:10:59 +00:00
Mike Conley
f29b80b95b Bug 1758753 - Migrate XPCOM hashtable documentation from MDN to Firefox Source Docs. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D140671
2022-03-17 14:23:27 +00:00
Mark Banner
8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
smolnar
e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner
fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Mitchell Hentges
1d06e45585 Bug 1756224: Update references to perfdocs linter to explicitly set path r=sparky
Ideally, the `perfdocs` linter suggestion to `--fix` issues would take
into account the `paths` that were provided, rather than printing the
sure-fire "lint and fix all" solution.

Actually, on further consideration, theoretically such a recommendation
should appear at the `./mach lint` level, and not be linter-specific. Oh
well, that's a future improvement :)

-----

This patch updates the `perfdocs` documentation and suggestions to
successfully operate in the same manner that they did before
bug 1753701.

Differential Revision: https://phabricator.services.mozilla.com/D139159
2022-03-09 15:52:49 +00:00
Chris Peterson
4c1f824528 Bug 1756504 - Remove cpp-virtual-final linter, a minor style check that doesn't diagnose real bugs. r=firefox-static-analysis-reviewers,sylvestre
In bug 1436263, I added a cpp-virtual-final.yml linter to warn about virtual function declarations that included more than one virtual function specifier `virtual`, `final`, or `override`.

I think we should remove this linter now because:

* It's just a style check and doesn't diagnose a real bug. Including more than one virtual function specifier (`virtual`, `final`, or `override`) is harmless and unambiguous, just unnecessary extra code.
* It has caused some engineer frustration because this style check caused their changeset to be backed out of autoland. Backing out and fixing these style issues are not a good use of sheriffs' or engineers' time.
* It doesn't catch all virtual/final/override style issues because:
  * It can't analyze virtual function definitions that span multiple lines.
  * It doesn't check for `virtual void Foo() override` because  there are over 6000 cases already, so our code will never follow this style check consistently.

Differential Revision: https://phabricator.services.mozilla.com/D139454
2022-02-24 02:14:39 +00:00
Sylvestre Ledru
caaedeee98 Bug 1753413 - fx doc: Remove whitespaces, trailing lines & windows CR r=andi,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D137741
2022-02-03 18:34:58 +00:00
Sylvestre Ledru
1e47dd5d4f Bug 1738988 - Add support for trojan source detection in mozlint r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D131086
2021-11-19 08:37:28 +00:00
Bobby Holley
02e9792c14 Bug 1740616 - Modify the C++ style guide to prefer unsigned types and CheckedInt. r=glandium DONTBUILD
This commit resolves the question posed in [1], largely on the basis of
the rationale put forth by emilio [2].

The reasons cited for using signed types boil down to (1) taking
advantage of UB optimizations, (2) more tractable dynamic overflow
analysis, and (3) increased chance of the surrounding logic identifying
and rejecting overflowed values.

Emilio points out that (1) is not a durable advantage. I see some value
in (2) and (3), but I see more value in consistency with existing code
and clear communication of semantic intent to the reader.

[1] https://groups.google.com/a/mozilla.org/g/dev-platform/c/-h_2cz5APmY/
[2] https://groups.google.com/a/mozilla.org/g/dev-platform/c/-h_2cz5APmY/m/NPdl2uIhAgAJ

Differential Revision: https://phabricator.services.mozilla.com/D130928
2021-11-16 19:38:01 +00:00
OnuohaOluebube
5ff974a055 Bug 1460100 - Added ESLint rule to prevent use of nsIScriptableUnicodeConverter r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D129668
2021-11-01 16:56:25 +00:00
Andi-Bogdan Postelnicu
80fddabd67 Bug 1738598 - sunset Coverity in Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D129779
2021-10-31 17:18:02 +00:00
Nihanth Subramanya
e6d5cae88b Bug 1731780 - Reject .only() chained onto add_task in tests. r=Gijs,mythmon,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128027
2021-10-13 21:26:40 +00:00
Agi Sferro
2bd64785fc Bug 1571899 - Use google-java-format via spotless to enforce Java formatting. r=ahal,owlish
This change adds a new lint `android-format` which enforces formatting of Java
code using google-java-format.

To run the lint simply run:

./mach lint -l android-format

This command also support automatically fixing all errors running by adding
--fix:

./mach lint -l android-format --fix

This change also removes all the formatting-related checkstyle checks which are
now implicitly enforced by the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D127734
2021-10-11 18:11:55 +00:00
Sylvestre Ledru
e28b9db1e6 Bug 1731542 - Remove infer from the list of code quality tools r=andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D127634
2021-10-06 10:57:38 +00:00
Chris Peterson
339c7d8961 Bug 1729598 - Remove now-unused MustUseChecker and MOZ_MUST_USE_TYPE attribute. r=static-analysis-reviewers,andi
Depends on D125504

Differential Revision: https://phabricator.services.mozilla.com/D125505
2021-09-15 05:10:51 +00:00
Michael Comella
be77ae1fd6 Bug 1729053 - add links to Engineering Show and Tell. r=jaws,firefox-source-docs-reviewers,sylvestre
I feel these productivity tips will remain helpful in the future and
having them in our documentation will make them more discoverable.

Differential Revision: https://phabricator.services.mozilla.com/D124477
2021-09-08 19:45:05 +00:00
Simon Giesecke
78c7565ba4 Bug 1677549 - Add some guidelines on include directives and header files to the coding style. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D97916
2021-09-08 12:56:01 +00:00
Tom Ritter
05cffe8a72 Bug 1722724: Start a cookbook that lists common needs for matchers r=andi
Differential Revision: https://phabricator.services.mozilla.com/D121105
2021-07-29 14:34:44 +00:00