Commit graph

200 commits

Author SHA1 Message Date
Andrew Halberstadt
5983e78c51 Bug 1848533 - Update 'create linter' example to use ruff, r=linter-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D187133
2023-08-31 04:17:34 +00:00
Mark Banner
98a950aa76 Bug 1846758 - Automatically mark *.worker.?js files as belonging to the worker environment. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D185321
2023-08-04 09:51:15 +00:00
Tooru Fujisawa
aa900309a0 Bug 1843797 - Add ESLint rule to reject ChromeUtils.import. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D183696
2023-07-31 21:03:44 +00:00
Vincent Hilla
3f90cef3c9 Bug 1845550 - Docs on linting: clarify command to create git hook. r=ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D184600
2023-07-26 19:06:22 +00:00
Dave Townsend
60c7c71e2d Bug 1842620: Add overviews of the main applications to the docs. r=Gijs,geckoview-reviewers,owlish,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D183173
2023-07-26 18:22:32 +00:00
CanadaHonk
513aff8119 Bug 1841117 - Remove unused intl.uidirection pref r=gregp,sylvestre
It was still in `about:config` and referenced in some docs after mostly
being removed in Bug 1676137.

Differential Revision: https://phabricator.services.mozilla.com/D182748
2023-07-10 12:00:58 +00:00
Cristian Tuns
d58b87b9ba Backed out changeset 088b1611348a (bug 1841117) as requested by canadahonk CLOSED TREE 2023-07-04 18:39:27 -04:00
CanadaHonk
094b41d891 Bug 1841117 - Remove unused intl.uidirection pref r=gregp
It was still in `about:config` and referenced in some docs after mostly
being removed in Bug 1676137.

Differential Revision: https://phabricator.services.mozilla.com/D182748
2023-07-04 22:31:28 +00:00
Mike Hommey
e97e5246fd Bug 1834436 - Upgrade minimum supported GCC version to 8. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178736
2023-06-01 20:09:19 +00:00
Mike Hommey
fd126d15a5 Bug 1834955 - Upgrade minimum supported Clang-cl version to 9. r=firefox-build-system-reviewers,sergesanspaille
We have less constraints on the minimum supported clang-cl version, and
it would unlock C++17 inline variables (which had a bug on Windows
targets in clang up-to 8.x).

Differential Revision: https://phabricator.services.mozilla.com/D179037
2023-05-29 20:31:08 +00:00
Mike Hommey
2aac970b03 Bug 1833958 - Update clang version in C++ in Firefox doc. r=firefox-source-docs-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D178891
2023-05-25 06:50:43 +00:00
Arthur Carcano
640dd3d14e Bug 1831312 - Use the mach cargo machinery to lint using clippy. r=glandium,linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D177156
2023-05-17 11:07:47 +00:00
Barret Rennie
a645de723e Bug 1776480 - Remove OS.File et al. r=Gijs,webidl,smaug
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-05-12 18:34:28 +00:00
Sandor Molnar
924826ccad Backed out changeset 987d013caf11 (bug 1776480) for causing xpc failures in toolkit/components/extensions/test/xpcshell/test_ext_downloads_download.js CLOSED TREE 2023-05-11 22:36:59 +03:00
Barret Rennie
6149948e68 Bug 1776480 - Remove OS.File et al. r=Gijs,webidl,smaug
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-05-11 17:49:27 +00:00
Gijs Kruitbosch
f238fa0035 Bug 1508369 - add stylelint linter support to mach lint, r=Standard8,dao,linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D177477
2023-05-11 16:06:38 +00:00
Norisz Fay
bf5ea8f459 Backed out changeset 3d766d94945d (bug 1776480) for causing multiple xpcshell and bc failures CLOSED TREE 2023-04-28 06:55:03 +03:00
Barret Rennie
7bae7d5d70 Bug 1776480 - Remove OS.File et al. r=Gijs
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-04-28 02:35:13 +00:00
Butkovits Atila
608af74b62 Backed out changeset fc8a2b80e9f6 (bug 1776480) for causing Gecko Decision bustage. CLOSED TREE 2023-04-28 04:31:36 +03:00
Barret Rennie
b2b98d70e4 Bug 1776480 - Remove OS.File et al. r=Gijs
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-04-28 01:10:56 +00:00
Andi-Bogdan Postelnicu
79e171fd9f Bug 1277372 - Remove unused "mozilla/TypeTraits.h" r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D174129
2023-04-17 13:50:11 +00:00
Tooru Fujisawa
042e8e9bff Bug 1827163 - Support ChromeUtils.defineLazyGetter in ESLint rules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D175081
2023-04-14 00:18:11 +00:00
Itiel
35ac645687 Bug 1825586 - Update RTL docs r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D174136
2023-04-13 17:14:05 +00:00
Mark Banner
73db18ea40 Bug 1825715 - Add section about ignoring formatting to ESLint docs. r=Gijs
This also does a general clean-up of the ESLint doc.

Differential Revision: https://phabricator.services.mozilla.com/D174218
2023-04-01 16:40:02 +00:00
Cristian Tuns
8cca7e0d9f Backed out 3 changesets (bug 1825715) for causing node failures with checkBundles CLOSED TREE
Backed out changeset 53faa883781a (bug 1825715)
Backed out changeset 5ce3ad6ce483 (bug 1825715)
Backed out changeset 7f0b08e89cd1 (bug 1825715)
2023-03-31 17:23:28 -04:00
Mark Banner
aa106431fe Bug 1825715 - Add section about ignoring formatting to ESLint docs. r=Gijs
This also does a general clean-up of the ESLint doc.

Differential Revision: https://phabricator.services.mozilla.com/D174218
2023-03-31 20:32:20 +00:00
Andrew Halberstadt
82d9947901 Bug 1811850 - [lint] Replace pylint linter with ruff, r=linter-reviewers,marco
This is enabling the PLE and PLC rules across a much larger swatch of the code
base. The PLR and PLW are additionally enabled at the warning level (introduces
~2500 new warnings).

To avoid extraneous changes in people's patches, rules at the warning level are
excluded from --fix.

Differential Revision: https://phabricator.services.mozilla.com/D172358
2023-03-20 13:06:28 +00:00
Andrew Halberstadt
dd673c2fb2 Bug 1811850 - [lint] Replace flake8 linter with ruff, r=linter-reviewers,sylvestre
Ruff is a very fast linter implemented in Rust and it can act as a drop-in
replacement for flake8. When running the same set of rules across all files
in mozilla-central (without mozlint), flake8 takes 900 seconds whereas ruff
takes 0.9 seconds.

Ruff also implements rules from other popular Python linters such as pylint,
isort and pyupgrade. There are even plans to implement feature parity with
black in the future. Ultimately, it can become our one stop shop for all Python
linting and formatting.

This stack will swap out all our Python lint tools for ruff (excluding black
for now).

Differential Revision: https://phabricator.services.mozilla.com/D172313
2023-03-20 13:06:27 +00:00
Cristian Tuns
c1b52fd95e Backed out 5 changesets (bug 1811850) for causing linting bustages(bugzilla) CLOSED TREE
Backed out changeset e8fcfc7f8108 (bug 1811850)
Backed out changeset f8950d716c9e (bug 1811850)
Backed out changeset f650123cc188 (bug 1811850)
Backed out changeset d96f90c2c58b (bug 1811850)
Backed out changeset c3b0f9666183 (bug 1811850)
2023-03-16 22:16:30 -04:00
Andrew Halberstadt
054d07c54f Bug 1811850 - [lint] Replace pylint linter with ruff, r=linter-reviewers,marco
This is enabling the PLE and PLC rules across a much larger swatch of the code
base. The PLR and PLW are additionally enabled at the warning level (introduces
~2500 new warnings).

To avoid extraneous changes in people's patches, rules at the warning level are
excluded from --fix.

Differential Revision: https://phabricator.services.mozilla.com/D172358
2023-03-17 01:54:00 +00:00
Andrew Halberstadt
8a4d48a70d Bug 1811850 - [lint] Replace flake8 linter with ruff, r=linter-reviewers,sylvestre
Ruff is a very fast linter implemented in Rust and it can act as a drop-in
replacement for flake8. When running the same set of rules across all files
in mozilla-central (without mozlint), flake8 takes 900 seconds whereas ruff
takes 0.9 seconds.

Ruff also implements rules from other popular Python linters such as pylint,
isort and pyupgrade. There are even plans to implement feature parity with
black in the future. Ultimately, it can become our one stop shop for all Python
linting and formatting.

This stack will swap out all our Python lint tools for ruff (excluding black
for now).

Differential Revision: https://phabricator.services.mozilla.com/D172313
2023-03-17 01:53:58 +00:00
ogiorgis
be61f74c7a Bug 1820759 - add sphinx support to rstcheck r=firefox-source-docs-reviewers,linter-reviewers,sylvestre DONTBUILD
This suppresses rstcheck errors due to code-block and caption .
This also removes errors related to mermaid (Bug 1815454).

We also need to use anonymous references instead of explicit ones to
avoid another lint error.

Differential Revision: https://phabricator.services.mozilla.com/D171860
2023-03-08 09:48:56 +00:00
Sylvestre Ledru
f616c106ea no bug - doc: fix some typos r=marco
Differential Revision: https://phabricator.services.mozilla.com/D171688
2023-03-06 11:53:54 +00:00
Gijs Kruitbosch
2defa4450d Bug 1795255 - add no-redeclare-with-import-autofix eslint rule to deal with duplicate imports in tests, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D166177
2023-01-31 11:48:40 +00:00
ogiorgis
5fa906d358 Bug 1749473 - fix all pygments warnings r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D167915
2023-01-27 13:41:10 +00:00
Sylvestre Ledru
13ac309924 Bug 1806331 - doc: use ChromeUtils.importESM instead of ChromeUtils.importESModule r=Standard8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165815
2023-01-03 18:47:59 +00:00
Sylvestre Ledru
bb96d6b3a7 Bug 1802290 - Remove +x permissions on doc files r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165665
2022-12-29 16:01:38 +00:00
Eemeli Aro
f08c01b802 Bug 1804404 - Update l10n documentation due to DTD & .inc removal. r=flod
Differential Revision: https://phabricator.services.mozilla.com/D164047
2022-12-07 11:50:39 +00:00
Mark Banner
a6cdc10b5c Bug 1801092 - Add an ESLint rule to disllow use of Cu.reportError with a single argument. r=Gijs,cmkm
This enforces the bulk of the cases for Cu.reportError. A follow-up will extend this to the
two argument form.

Differential Revision: https://phabricator.services.mozilla.com/D162285
2022-11-29 23:07:42 +00:00
Iulian Moraru
f9ee846608 Backed out 3 changesets (bug 1801092) for causing newtab failures.
Backed out changeset 9153de956154
Backed out changeset 9df9c279c28d (bug 1801092)
Backed out changeset 7323c7444941 (bug 1801092)
2022-11-30 00:28:42 +02:00
Mark Banner
e87d5936ff Bug 1801092 - Add an ESLint rule to disllow use of Cu.reportError with a single argument. r=Gijs,cmkm
This enforces the bulk of the cases for Cu.reportError. A follow-up will extend this to the
two argument form.

Differential Revision: https://phabricator.services.mozilla.com/D162285
2022-11-29 21:21:28 +00:00
Greg Stoll
4c4a846ade no bug - fx doc: fix a few links to old pages r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D162421
2022-11-18 21:20:18 +00:00
Mark Banner
f13a3ea497 Bug 1800874 - Add docs for eslint-build tester. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D162389
2022-11-18 19:34:34 +00:00
Makoto Kato
1756e8266e Bug 1740799 - Format Kotlin code using ktlint. r=geckoview-reviewers,owlish,linter-reviewers,sylvestre
Android-component and Fenix use ktlint, so mozilla-central should use same
tools via spotless.

This is from https://phabricator.services.mozilla.com/D131018

Differential Revision: https://phabricator.services.mozilla.com/D161557
2022-11-18 00:55:03 +00:00
Sylvestre Ledru
2f9f65bbc4 Bug 1799620 - mozlint/clippy: using nightly isn't necessary anymore r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D161564
2022-11-08 15:05:31 +00:00
june wilde
9da4567aa7 Bug 1796723 - Remove docs about foxyeah Compiler Explorer; r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D159912
2022-10-31 12:28:58 +00:00
Mark Banner
9613c19f16 Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +00:00
Mark Banner
7f3cba09e8 Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-26 08:06:37 +00:00
Csoregi Natalia
5f9da7b301 Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Mark Banner
fc7befc08d Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-25 19:49:28 +00:00