3 # See https://beta.ruff.rs/docs/rules/ for a full list of rules.
5 "E", "W", # pycodestyle
11 # These should be triaged and either fixed or moved to the list below.
12 "E713", "E714", "W605",
14 # These are intentionally ignored.
15 "E741", # ambiguous-variable-name
16 "PLR09", # too-many-return-statements, too-many-branches, too-many-arguments, too-many-statements
17 "PLR2004", # magic-value-comparison
19 # These are handled by black.
20 "E1", "E4", "E5", "W2", "W5"
24 # These paths should be triaged and either fixed or moved to the list below.
26 "dom/bindings/Codegen.py",
27 "dom/bindings/parser/WebIDL.py",
28 "dom/bindings/parser/tests/test_arraybuffer.py",
29 "dom/bindings/parser/tests/test_securecontext_extended_attribute.py",
32 "layout/base/tests/marionette",
33 "layout/reftests/border-image",
34 "layout/reftests/fonts",
35 "layout/reftests/w3c-css",
37 "media/libdav1d/generate_source.py",
39 "netwerk/dns/prepare_tlds.py",
40 "netwerk/protocol/http/make_incoming_tables.py",
41 "python/l10n/fluent_migrations",
42 "security/manager/ssl/tests/unit",
43 "servo/components/style",
44 "testing/condprofile/condprof/android.py",
45 "testing/condprofile/condprof/creator.py",
46 "testing/condprofile/condprof/desktop.py",
47 "testing/condprofile/condprof/runner.py",
48 "testing/condprofile/condprof/scenarii/heavy.py",
49 "testing/condprofile/condprof/scenarii/settled.py",
50 "testing/condprofile/condprof/scenarii/synced.p",
51 "testing/condprofile/condprof/helpers.py",
52 "testing/jsshell/benchmark.py",
53 "testing/marionette/mach_commands.py",
54 "testing/mozharness/docs",
55 "testing/mozharness/examples",
56 "testing/mozharness/external_tools",
57 "testing/mozharness/mach_commands.py",
58 "testing/mozharness/manifestparser",
59 "testing/mozharness/mozprocess",
60 "testing/mozharness/setup.py",
61 "testing/parse_build_tests_ccov.py",
62 "testing/runtimes/writeruntimes.py",
63 "testing/tools/iceserver/iceserver.py",
64 "testing/tools/websocketprocessbridge/websocketprocessbridge.py",
65 "toolkit/components/featuregates",
66 "toolkit/content/tests/chrome/file_about_networking_wsh.py",
67 "toolkit/library/build/dependentlibs.py",
68 "toolkit/locales/generate_update_locale.py",
70 "toolkit/moz.configure",
71 "toolkit/nss.configure",
73 # mako files are not really python files
76 # These paths are intentionally excluded (not necessarily for good reason).
77 "build/moz.configure/*.configure",
79 "browser/extensions/mortar/ppapi/",
80 "browser/moz.configure",
81 "dom/canvas/test/webgl-conf/checkout/closure-library/",
82 "editor/libeditor/tests/browserscope/",
84 "ipc/chromium/src/third_party/",
89 "memory/moz.configure",
90 "mobile/android/*.configure",
92 "python/mozbuild/mozbuild/test/configure/data",
94 "testing/marionette/harness/marionette_harness/runner/mixins",
95 "testing/marionette/harness/marionette_harness/tests",
96 "testing/mochitest/pywebsocket3",
97 "testing/mozharness/configs/test/test_malformed.py",
98 "testing/web-platform/tests",
99 "tools/lint/test/files",
100 "tools/crashreporter/*.configure",
101 ".ycm_extra_conf.py",
104 [tool.ruff.per-file-ignores]
105 # These paths are intentionally excluded.
106 "dom/bindings/Configuration.py" = ["PLC3002"]
107 "ipc/ipdl/*" = ["F403", "F405"]
108 "layout/tools/reftest/selftest/conftest.py" = ["F811"]
109 # cpp_eclipse has a lot of multi-line embedded XML which exceeds line length
110 "python/mozbuild/mozbuild/backend/cpp_eclipse.py" = ["E501"]
111 "testing/firefox-ui/**/__init__.py" = ["F401"]
112 "testing/marionette/**/__init__.py" = ["F401"]
113 "testing/mochitest/tests/python/conftest.py" = ["F811"]
114 "testing/mozbase/manifestparser/tests/test_filters.py" = ["E731"]
115 "testing/mozbase/mozinfo/mozinfo/mozinfo.py" = ["PLE0605"]
116 "testing/mozbase/mozlog/tests/test_formatters.py" = ["E501"]
117 "testing/mozharness/configs/*" = ["E501"]
118 "**/*.configure" = ["F821"]
119 # These paths contain Python-2 only syntax.
120 "build/compare-mozconfig/compare-mozconfigs.py" = ["F821"]
121 "build/midl.py" = ["F821"]
122 "build/pgo/genpgocert.py" = ["F821"]
123 "config/MozZipFile.py" = ["F821"]
124 "config/check_source_count.py" = ["F821"]
125 "config/tests/unitMozZipFile.py" = ["F821"]
126 "ipc/pull-chromium.py" = ["F633"]
127 "js/src/**" = ["F633", "F821"]
128 "python/mozbuild/mozbuild/action/dump_env.py" = ["F821"]
129 "python/mozbuild/mozbuild/dotproperties.py" = ["F821"]
130 "python/mozbuild/mozbuild/testing.py" = ["F821"]
131 "python/mozbuild/mozbuild/util.py" = ["F821"]
132 "testing/mozharness/mozharness/mozilla/testing/android.py" = ["F821"]
133 "testing/mochitest/runtests.py" = ["F821"]