Page MenuHomePhabricator

Recognize error codes from Flake8 extensions
ClosedPublic

Authored by jparise on Apr 27 2016, 8:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 12 2024, 3:34 PM
Unknown Object (File)
Feb 3 2024, 9:54 AM
Unknown Object (File)
Jan 25 2024, 11:47 AM
Unknown Object (File)
Dec 27 2023, 6:53 AM
Unknown Object (File)
Dec 27 2023, 6:53 AM
Unknown Object (File)
Dec 27 2023, 6:53 AM
Unknown Object (File)
Dec 23 2023, 11:10 PM
Unknown Object (File)
Dec 22 2023, 5:47 AM
Subscribers

Details

Summary

Flake8 extensions are allowed to use their own letter-prefixed codes. For
example, the flake8-debugger extension emits 'T002'-tagged messages.

This change relaxes getLintCodeFromLinterConfigurationKey() to also recognize
extension codes. Otherwise, attempting to configure message severities for
e.g. 'T002' would result in an exception.

Messages from extensions continue to default to ERROR severity, as they did
before this change.

Test Plan

Successfully reduced the severity of 'T002' to a warning via .arclint:

"severity": {
    "T002": "warning"
}

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jparise retitled this revision from to Recognize error codes from Flake8 extensions.
jparise updated this object.
jparise edited the test plan for this revision. (Show Details)
jparise added a reviewer: epriestley.
jparise edited edge metadata.

Simplify regular expression. No need to capture the code character.

epriestley edited edge metadata.
This revision is now accepted and ready to land.Apr 27 2016, 10:04 PM
This revision was automatically updated to reflect the committed changes.

(I added you to Community too, which confers a few powers.)