Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3282044
ArcanistNoLintLinter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
844 B
Referenced Files
None
Subscribers
None
ArcanistNoLintLinter.php
View Options
<?php
/**
* Stops other linters from running on code marked with a nolint annotation.
*/
final
class
ArcanistNoLintLinter
extends
ArcanistLinter
{
public
function
getInfoName
(
)
{
return
pht
(
'Lint Disabler'
)
;
}
public
function
getInfoDescription
(
)
{
return
pht
(
'Allows you to disable all lint messages for a file by putting "%s" in '
.
'the file body.'
,
'@'
.
'nolint'
)
;
}
public
function
getLinterName
(
)
{
return
'NOLINT'
;
}
public
function
getLinterPriority
(
)
{
return
0.25
;
}
public
function
getLinterConfigurationName
(
)
{
return
'nolint'
;
}
protected
function
canCustomizeLintSeverities
(
)
{
return
false
;
}
public
function
lintPath
(
$path
)
{
$data
=
$this
->
getData
(
$path
)
;
if
(
preg_match
(
'/@'
.
'nolint/'
,
$data
)
)
{
$this
->
stopAllLinters
(
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 04:01 (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1113666
Default Alt Text
ArcanistNoLintLinter.php (844 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment