Page MenuHomePhabricator

Recognize error codes from Flake8 extensions
ClosedPublic

Authored by jparise on Apr 27 2016, 8:59 PM.
Tags
None
Referenced Files
F13149005: D15810.id38084.diff
Sat, May 4, 5:54 AM
Unknown Object (File)
Fri, May 3, 4:28 PM
Unknown Object (File)
Fri, May 3, 12:42 PM
Unknown Object (File)
Thu, May 2, 6:11 PM
Unknown Object (File)
Thu, May 2, 10:21 AM
Unknown Object (File)
Sun, Apr 28, 10:13 AM
Unknown Object (File)
Sat, Apr 27, 10:35 AM
Unknown Object (File)
Thu, Apr 25, 12:02 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
Branch
flake8-extension-codes (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11958
Build 15037: arc lint + arc unit

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.)