Page MenuHomePhabricator

Recognize error codes from Flake8 extensions
ClosedPublic

Authored by jparise on Apr 27 2016, 8:59 PM.
Tags
None
Referenced Files
F13059636: D15810.diff
Fri, Apr 19, 4:36 PM
Unknown Object (File)
Thu, Apr 11, 8:19 AM
Unknown Object (File)
Wed, Apr 3, 5:35 AM
Unknown Object (File)
Wed, Apr 3, 12:16 AM
Unknown Object (File)
Mon, Apr 1, 4:11 PM
Unknown Object (File)
Sun, Mar 31, 2:28 PM
Unknown Object (File)
Sun, Mar 31, 2:28 PM
Unknown Object (File)
Sun, Mar 31, 2:28 PM
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.)