Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistRuboCopLinter.php
| Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | foreach ($results['files'] as $file) { | ||||
| ->setCode($offense['cop_name']); | ->setCode($offense['cop_name']); | ||||
| $messages[] = $message; | $messages[] = $message; | ||||
| } | } | ||||
| } | } | ||||
| return $messages; | return $messages; | ||||
| } | } | ||||
| /* | /** | ||||
| Take the string from RuboCop's severity terminology and return an | * Take the string from RuboCop's severity terminology and return an | ||||
| ArcanistLintSeverity | * @{class:ArcanistLintSeverity}. | ||||
| */ | */ | ||||
| protected function getDefaultMessageSeverity($code) { | protected function getDefaultMessageSeverity($code) { | ||||
| switch ($code) { | switch ($code) { | ||||
| case 'convention': | case 'convention': | ||||
| case 'refactor': | case 'refactor': | ||||
| case 'warning': | case 'warning': | ||||
| return ArcanistLintSeverity::SEVERITY_WARNING; | return ArcanistLintSeverity::SEVERITY_WARNING; | ||||
| case 'error': | case 'error': | ||||
| case 'fatal': | case 'fatal': | ||||
| return ArcanistLintSeverity::SEVERITY_ERROR; | return ArcanistLintSeverity::SEVERITY_ERROR; | ||||
| default: | default: | ||||
| return ArcanistLintSeverity::SEVERITY_ADVICE; | return ArcanistLintSeverity::SEVERITY_ADVICE; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||