mozlint: allow some linters to be written in Rust
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Tracking
(firefox152 fixed)
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 3 obsolete files)
python isn't great when we have linters that needs to run on the full code base. Rust would be much better here.
| Assignee | ||
Comment 1•2 months ago
|
||
A new in-tree Rust binary (tools/lint/moz-linter/) that provides fast,
parallelized implementations of simple mozlint linters. This commit adds
the project setup and shared JSONL output infrastructure.
| Assignee | ||
Comment 2•2 months ago
|
||
Add RustType to supported_types. It locates the moz-linter binary,
serializes linter config as JSON, and invokes the batch subcommand.
This eliminates the need for per-linter Python wrappers.
| Assignee | ||
Comment 3•2 months ago
|
||
Adds a linux64 toolchain task that builds moz-linter as a static musl
binary. Updates the rejected-words, file-perm, file-whitespace, and
trojan-source mozlint CI tasks to fetch the pre-built binary.
| Assignee | ||
Comment 4•2 months ago
|
||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
| Assignee | ||
Comment 6•2 months ago
|
||
The module-level results list was never cleared between test runs,
causing results from test_lint_codespell_fix to leak into
test_lint_codespell.
Comment 7•2 months ago
|
||
Comment on attachment 9556069 [details]
Bug 2023410 - Fix codespell test leak: clear module-level state at start of lint() r?#linter-reviewers
Revision D289076 was moved to bug 2023756. Setting attachment 9556069 [details] to obsolete.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 8•1 month ago
|
||
Python 3.13's pkgutil.resolve_name rejects hyphenated module names
like "condprof-addons" when passed as a string to mock.patch.multiple.
Use a lazy import to pass the module object directly instead.
Comment 10•1 month ago
|
||
| Assignee | ||
Comment 11•1 month ago
|
||
Addresses review comments from ahal on D288082:
- The batch mode can emit multiple fixed-summary lines, so accumulate
into the running total instead of overwriting it. - Replace the SKIP_KEYS allow-list with a dedicated check-config YAML
key so extra fields can't drift when new top-level keys are added.
Migrate rejected-words.yml and file-perm.yml to the new shape.
Comment 12•1 month ago
|
||
Comment 13•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d837bb4851d1
https://hg.mozilla.org/mozilla-central/rev/12114988264a
https://hg.mozilla.org/mozilla-central/rev/fa853673fe27
https://hg.mozilla.org/mozilla-central/rev/6571d9f20e55
Comment 14•1 month ago
|
||
Comment 15•1 month ago
|
||
| bugherder | ||
Description
•