Commit Graph

159 Commits

Author SHA1 Message Date
Tooru Fujisawa
2bef883c3f 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
98e3028bb3 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
a9fecdd342 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
a6d7d18556 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
ba3f307e2c 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
e39ff60a8e 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
481dd8581a 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
f2b3c1eab6 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
02c1e5dc6a 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
e2069f9e9f 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
f3f80c30f9 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
6e6f975d7e 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
d04ba14faf 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
e1d7571cc8 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
43d6391aa2 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
0038e58f1f 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
7e0f00efd6 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
b273648e2f 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
7ea3c792f2 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
19781d16c7 Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner
de1754318e 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
ac893c8e81 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
185d44df61 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
aa55fd2be8 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
d7e02f6d5f 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
0d8d639e0d 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
a4ad953053 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
900f657b62 Bug 1738598 - sunset Coverity in Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D129779
2021-10-31 17:18:02 +00:00
Nihanth Subramanya
1421241ada 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
94e265731b 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
f4150683bf 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
811beee789 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
492af2ced3 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
969138c537 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
b3cc883c05 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
Gijs Kruitbosch
20571461c3 Bug 1708462 - add warning level linter for OS.File use, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D120684
2021-07-28 15:15:03 +00:00
Tom Ritter
a729909dea Bug 1717076: Tweak some of the existing documentation r=andi
Depends on D118211

Differential Revision: https://phabricator.services.mozilla.com/D120515
2021-07-22 19:50:38 +00:00
Tom Ritter
8e7b49bed5 Bug 1717076: Add documentation about advanced checker techniques r=andi
Differential Revision: https://phabricator.services.mozilla.com/D118211
2021-07-22 19:50:37 +00:00
Tom Ritter
19aa3b24ee Bug 1717076 - Add a quick-start guide for how to turn a matcher to a static analysis check r=andi
Differential Revision: https://phabricator.services.mozilla.com/D118248
2021-07-22 19:50:37 +00:00
Tom Ritter
4fedd8b90b Bug 1717076 - Move comments to a separate line r=freddyb
clang-query does not allow end-of-line comments, they need
to be on a separate line

Differential Revision: https://phabricator.services.mozilla.com/D118247
2021-07-22 19:50:37 +00:00
Mark Banner
8d4af9c7e6 Bug 1587022 - Improve documentation for remaining Mozilla specific ESLint rules. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D118735
2021-07-05 11:38:39 +00:00
Tom Ritter
3ac2eb4da4 Bug 1716070 - Add more detailed documentation about our CE instance r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D117565
2021-06-14 17:28:09 +00:00
surajeet310
6cf624ea47 Bug 1714788 - Fixed more Sphinx warnings in 'mach doc' r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D117419
2021-06-10 19:33:53 +00:00
Mitchell Hentges
09e14aa35f Bug 1714641: Remove usages of vendored "backports" code r=ahal,perftest-reviewers
It provides `shutil.which(...)`, which has been part of `shutil` since
Python 3.3.

Differential Revision: https://phabricator.services.mozilla.com/D117063
2021-06-09 15:48:52 +00:00
Frederik Braun
79af859d6f Bug 1714991 - add docs for own compiler explorer instance r=andi
Differential Revision: https://phabricator.services.mozilla.com/D117000
2021-06-07 13:15:32 +00:00
Sylvestre Ledru
9867b02c38 Bug 1702922 - mozlint/ride along: Document how to run a specific testsuite r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D113287
2021-04-26 08:13:04 +00:00
Tom Ritter
9369fcebed Bug 1645419: Add new static analysis documentation r=andi
Differential Revision: https://phabricator.services.mozilla.com/D101956
2021-03-22 17:28:37 +00:00
Tom Ritter
bf3229c37c Bug 1645419: Edit the old static analysis page in the context of what's to come r=andi
Depends on D108053

Differential Revision: https://phabricator.services.mozilla.com/D108054
2021-03-22 17:28:37 +00:00
Tom Ritter
50b873e6c0 Bug 1645419: Move the existing static analysis page to a new one explicitly about existing stuff r=andi
Differential Revision: https://phabricator.services.mozilla.com/D108053
2021-03-22 17:28:37 +00:00
Simon Giesecke
a6e3b52371 Bug 1692835 - Remove nsJSThingHashtable. r=xpcom-reviewers,nika
The only use of nsJSThingHashtable is replaced by a direct use of
nsBaseHashtable.

Differential Revision: https://phabricator.services.mozilla.com/D105971
2021-03-02 09:02:19 +00:00