Page MenuHomeSealhub

ArcanistJSONLinter.php
No OneTemporary

Authored By
Unknown
Size
757 B
Referenced Files
None
Subscribers
None

ArcanistJSONLinter.php

<?php
/**
* A linter for JSON files.
*/
final class ArcanistJSONLinter extends ArcanistLinter {
public function getInfoName() {
return 'JSON Lint';
}
public function getInfoDescription() {
return pht('Detect syntax errors in JSON files.');
}
public function getLinterName() {
return 'JSON';
}
public function getLinterConfigurationName() {
return 'json';
}
public function lintPath($path) {
$data = $this->getData($path);
try {
$parser = new PhutilJSONParser();
$parser->parse($data);
} catch (PhutilJSONParserException $ex) {
$this->raiseLintAtLine(
$ex->getSourceLine(),
$ex->getSourceChar(),
$this->getLinterName(),
$ex->getMessage());
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Nov 28, 03:22 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1219951
Default Alt Text
ArcanistJSONLinter.php (757 B)

Event Timeline