Bug 2069193 - Move the ruff-format exclusions to format.exclude. r=linter-reviewers,sergesanspaille
Unlike the yaml list, which mozlint applied before invoking the formatter, these are resolved by ruff against the project root, so they no longer depend on the directory `mach lint` happens to be run from. Differential Revision: https://phabricator.services.mozilla.com/D323538
This commit is contained in:
committed by
mh@glandium.org
parent
2a30b9c557
commit
5853e9e9f3
+14
-3
@@ -36,6 +36,8 @@ exclude = [
|
||||
# the walk rather than filter paths; `lint.exclude` would not stop ruff
|
||||
# descending into them. Excluded from formatting too, as it was under `black`.
|
||||
"testing/web-platform/tests",
|
||||
# mako files are not really python files
|
||||
"*.mako.py",
|
||||
]
|
||||
|
||||
# Paths skipped by `rust check` only. `ruff format` does not use this list.
|
||||
@@ -95,9 +97,6 @@ lint.exclude = [
|
||||
# Can be removed once remaining CI workers updated past Python 3.8
|
||||
"python/mozbuild/mozbuild/action/tooltool.py",
|
||||
|
||||
# mako files are not really python files
|
||||
"*.mako.py",
|
||||
|
||||
# These paths are intentionally excluded (not necessarily for good reason).
|
||||
"build/moz.configure/*.configure",
|
||||
"build/pymake/**",
|
||||
@@ -170,3 +169,15 @@ keep-runtime-typing = true
|
||||
# TODO: Remove preview once these features are in the stable release.
|
||||
preview = true
|
||||
docstring-code-format = true
|
||||
|
||||
# Paths skipped by `rust format` only. `ruff check` does not use this list.
|
||||
#
|
||||
# Entries here are matched as globs against each file path rather than pruned
|
||||
# during directory traversal, so a directory MUST be written as `some/dir/**`;
|
||||
# `some/dir` silently matches nothing.
|
||||
exclude = [
|
||||
"gfx/harfbuzz/src/meson.build",
|
||||
"python/mozbuild/mozbuild/test/frontend/data/reader-error-syntax/moz.build",
|
||||
"testing/mozharness/configs/test/test_malformed.py",
|
||||
"tools/lint/python/review_context_schema.py",
|
||||
]
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
---
|
||||
ruff-format:
|
||||
description: Reformat python with ruff
|
||||
# Excludes should be added to topsrcdir/pyproject.toml
|
||||
exclude:
|
||||
- gfx/harfbuzz/src/meson.build
|
||||
- '**/*.mako.py'
|
||||
- python/mozbuild/mozbuild/test/frontend/data/reader-error-syntax/moz.build
|
||||
- testing/mozharness/configs/test/test_malformed.py
|
||||
- testing/web-platform/tests
|
||||
# Excludes should be added to `format.exclude` in topsrcdir/pyproject.toml
|
||||
exclude: []
|
||||
extensions:
|
||||
- build
|
||||
- configure
|
||||
|
||||
Reference in New Issue
Block a user