Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891167
PhabricatorLintEngine.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
1 KB
Referenced Files
None
Subscribers
None
PhabricatorLintEngine.php
View Options
<?php
final
class
PhabricatorLintEngine
extends
PhutilLintEngine
{
public
function
buildLinters
(
)
{
$linters
=
parent
::
buildLinters
(
)
;
foreach
(
$linters
as
$linter
)
{
if
(
$linter
instanceof
ArcanistPhutilXHPASTLinter
)
{
$linter
->
setDeprecatedFunctions
(
array
(
'phutil_escape_html'
=>
'The phutil_escape_html() function is deprecated. Raw strings '
.
'passed to phutil_tag() or hsprintf() are escaped automatically.'
,
'javelin_render_tag'
=>
'The javelin_render_tag() function is deprecated and unsafe. '
.
'Use javelin_tag() instead.'
,
'phabricator_render_form'
=>
'The phabricator_render_form() function is deprecated and unsafe. '
.
'Use phabricator_form() instead.'
,
)
)
;
}
}
$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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 14:44 (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125633
Default Alt Text
PhabricatorLintEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment