Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8890713
ArcanistNoLintLinter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
844 B
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
Thu, Jun 10, 1:41 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
3387665
Default Alt Text
ArcanistNoLintLinter.php (844 B)
Attached To
rARC Arcanist
Event Timeline
Log In to Comment