Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118631658
PhabricatorLintEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 21, 08:15
Size
788 B
Mime Type
text/x-php
Expires
Mon, Jun 23, 08:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26868568
Attached To
rPH Phabricator
PhabricatorLintEngine.php
View Options
<?php
final
class
PhabricatorLintEngine
extends
PhutilLintEngine
{
public
function
buildLinters
()
{
$linters
=
parent
::
buildLinters
();
$paths
=
$this
->
getPaths
();
foreach
(
$paths
as
$key
=>
$path
)
{
if
(!
$this
->
pathExists
(
$path
))
{
unset
(
$paths
[
$key
]);
}
}
$javelin_linter
=
new
PhabricatorJavelinLinter
();
$linters
[]
=
$javelin_linter
;
foreach
(
$paths
as
$path
)
{
if
(
strpos
(
$path
,
'support/aphlict/'
)
!==
false
)
{
// This stuff is Node.js, not Javelin, so don't apply the Javelin
// linter.
continue
;
}
if
(
preg_match
(
'/
\.
js$/'
,
$path
))
{
$javelin_linter
->
addPath
(
$path
);
$javelin_linter
->
addData
(
$path
,
$this
->
loadData
(
$path
));
}
}
return
$linters
;
}
}
Event Timeline
Log In to Comment