Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistJSONLinter.php
| Show All 27 Lines | return array( | ||||
| self::LINT_PARSE_ERROR => pht('Parse Error'), | self::LINT_PARSE_ERROR => pht('Parse Error'), | ||||
| ); | ); | ||||
| } | } | ||||
| protected function canCustomizeLintSeverities() { | protected function canCustomizeLintSeverities() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function lintPath($path) { | protected function lintPath(ArcanistWorkingCopyPath $path) { | ||||
| $data = $this->getData($path); | $data = $path->getData(); | ||||
| try { | try { | ||||
| id(new PhutilJSONParser())->parse($data); | id(new PhutilJSONParser())->parse($data); | ||||
| } catch (PhutilJSONParserException $ex) { | } catch (PhutilJSONParserException $ex) { | ||||
| $this->raiseLintAtLine( | $this->raiseLintAtLine( | ||||
| $ex->getSourceLine(), | $ex->getSourceLine(), | ||||
| $ex->getSourceChar(), | $ex->getSourceChar(), | ||||
| self::LINT_PARSE_ERROR, | self::LINT_PARSE_ERROR, | ||||
| $ex->getMessage()); | $ex->getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||