]> khamidou — GitHub mirrors - arcanist.git/commit
Recognize error codes from Flake8 extensions
authorJon Parise <jon@pinterest.com>
Wed, 27 Apr 2016 20:48:46 +0000 (13:48 -0700)
committerJon Parise <jon@pinterest.com>
Wed, 27 Apr 2016 22:11:46 +0000 (15:11 -0700)
commit9b07d1c480f447fea5f0cd9adeb2e7fc838778cc
tree2f4b547bce3a860f7b7689789df56274c6eab2fc
parenta2ab38df78a9d111459fab8d0d63e74d811edf29
Recognize error codes from Flake8 extensions

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"
    }

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15810
src/lint/linter/ArcanistFlake8Linter.php