Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistFlake8Linter.php
| Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | final class ArcanistFlake8Linter extends ArcanistExternalLinter { | ||||
| protected function getLintCodeFromLinterConfigurationKey($code) { | protected function getLintCodeFromLinterConfigurationKey($code) { | ||||
| if (!preg_match('/^(E|W|C|F)\d+$/', $code)) { | if (!preg_match('/^(E|W|C|F)\d+$/', $code)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Unrecognized lint message code "%s". Expected a valid flake8 '. | 'Unrecognized lint message code "%s". Expected a valid flake8 '. | ||||
| 'lint code like "%s", or "%s", or "%s", or "%s".', | 'lint code like "%s", or "%s", or "%s", or "%s".', | ||||
| $code, | $code, | ||||
| "E225", | 'E225', | ||||
| "W291", | 'W291', | ||||
| "F811", | 'F811', | ||||
| "C901")); | 'C901')); | ||||
| } | } | ||||
| return $code; | return $code; | ||||
| } | } | ||||
| } | } | ||||