Closed Bug 1835655 Opened 2 years ago Closed 4 months ago

./mach lint -l ruff -n tools/moztreedocs fails with a python exception

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P3)

Tracking

(firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

$ ./mach lint -l ruff  -n tools/moztreedocs 
Traceback (most recent call last):
  File "/home/sylvestre/dev/mozilla/mozilla-unified.hg/python/mozlint/mozlint/roller.py", line 72, in _run_worker
    res = func(paths, config, **lintargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sylvestre/dev/mozilla/mozilla-unified.hg/python/mozlint/mozlint/types.py", line 57, in __call__
    return self._lint(paths, config, **lintargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sylvestre/dev/mozilla/mozilla-unified.hg/python/mozlint/mozlint/types.py", line 148, in _lint
    return func(files, config, **lintargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sylvestre/dev/mozilla/mozilla-unified.hg/tools/lint/python/ruff.py", line 139, in lint
    if config["exclude"]:
       ~~~~~~^^^^^^^^^^^
KeyError: 'exclude'
A failure occurred in the ruff linter.
✖ 1 problem (0 errors, 0 warnings, 1 failure, 0 fixed)

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bpostelnicu)
Severity: -- → S3
Flags: needinfo?(bpostelnicu)
Priority: -- → P3

to abort commit. HG: -- HG: user: Sylvestre Ledru <sylvestre@mozilla.com> HG: branch
'default' HG: bookmark 'phab-D223913_4' HG: changed tools/lint/python/ruff.py

Assignee: nobody → sledru
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/72a700077779 mozlint/ruff: don't fails when -n is passed r=linter-reviewers,ahal DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: