Exemplo n.º 1
0
 public function setCustomSeverityMap(array $map)
 {
     foreach ($map as $code => $severity) {
         if (substr($code, 0, 2) === 'SA' && $severity == 'disabled') {
             throw new Exception(pht("In order to keep StyleCop integration with IDEs and other tools " . "consistent with Arcanist results, you aren't permitted to " . "disable StyleCop rules within '%s'. Instead configure the " . "severity using the StyleCop settings dialog (usually accessible " . "from within your IDE). StyleCop settings for your project will " . "be used when linting for Arcanist.", '.arclint'));
         }
     }
     return parent::setCustomSeverityMap($map);
 }
Exemplo n.º 2
0
 public function setLinterConfigurationValue($key, $value)
 {
     switch ($key) {
         case 'text.max-line-length':
             $this->setMaxLineLength($value);
             return;
     }
     return parent::setLinterConfigurationValue($key, $value);
 }
Exemplo n.º 3
0
 public function setLinterConfigurationValue($key, $value)
 {
     switch ($key) {
         case 'spelling.dictionaries':
             foreach ($value as $dictionary) {
                 $this->loadDictionary($dictionary);
             }
             return;
     }
     return parent::setLinterConfigurationValue($key, $value);
 }
Exemplo n.º 4
0
 private function beginLintServiceCall(ArcanistLinter $linter, array $paths)
 {
     $profiler = PhutilServiceProfiler::getInstance();
     return $profiler->beginServiceCall(array('type' => 'lint', 'linter' => $linter->getInfoName(), 'paths' => $paths));
 }
 public function setLinterConfigurationValue($key, $value)
 {
     switch ($key) {
         case 'external-json.script':
             $this->script = $value;
             return;
     }
     return parent::setLinterConfigurationValue($key, $value);
 }
 public function setLinterConfigurationValue($key, $value)
 {
     switch ($key) {
         case 'script-and-regex.script':
             $this->script = $value;
             return;
         case 'script-and-regex.regex':
             $this->regex = $value;
             return;
     }
     return parent::setLinterConfigurationValue($key, $value);
 }