Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22422451
ArcanistJSONLinter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
757 B
Referenced Files
None
Subscribers
None
ArcanistJSONLinter.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 28, 03:22 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1219951
Default Alt Text
ArcanistJSONLinter.php (757 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline