Page MenuHomePhabricator

Recognize error codes from Flake8 extensions

Authored by jparise on Apr 27 2016, 8:59 PM.
Referenced Files
Unknown Object (File)
Sun, Jun 26, 12:43 PM
Unknown Object (File)
Sat, Jun 25, 11:57 AM
Unknown Object (File)
Thu, Jun 23, 8:28 AM
Unknown Object (File)
Fri, Jun 17, 4:53 AM
Unknown Object (File)
Sat, Jun 11, 6:51 AM
Unknown Object (File)
Sun, Jun 5, 5:17 AM
Unknown Object (File)
May 30 2022, 1:18 PM
Unknown Object (File)
May 30 2022, 1:03 AM



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

rARC Arcanist
Lint Not Applicable
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.)