Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2896579
save_lint.php
No One
Temporary
Actions
View 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
save_lint.php
View Options
#!/usr/bin/env php
<?php
require_once
dirname
(
__FILE__
)
.
'/../__init_script__.php'
;
$synopsis
=
<<<EOT
**save_lint.php**
Discover lint problems and save them to database so that they can
be displayed in Diffusion.
EOT
;
$args
=
id
(
new
PhutilArgumentParser
(
$argv
)
)
->
setTagline
(
'save lint errors to database'
)
->
setSynopsis
(
$synopsis
)
->
parseStandardArguments
(
)
->
parse
(
array
(
array
(
'name'
=>
'all'
,
'help'
=>
"Discover problems in the whole repository instead of just changes "
.
"since the last run."
,
)
,
array
(
'name'
=>
'arc'
,
'param'
=>
'path'
,
'default'
=>
'arc'
,
'help'
=>
"Path to Arcanist executable."
,
)
,
array
(
'name'
=>
'severity'
,
'param'
=>
'string'
,
'default'
=>
ArcanistLintSeverity
::
SEVERITY_ADVICE
,
'help'
=>
"Minimum severity, one of ArcanistLintSeverity constants."
,
)
,
array
(
'name'
=>
'chunk-size'
,
'param'
=>
'number'
,
'default'
=>
256
,
'help'
=>
"Number of paths passed to `arc` at once."
,
)
,
)
)
;
echo
"Saving lint errors to database...\n"
;
$count
=
id
(
new
DiffusionLintSaveRunner
(
)
)
->
setAll
(
$args
->
getArg
(
'all'
,
false
)
)
->
setArc
(
$args
->
getArg
(
'arc'
)
)
->
setSeverity
(
$args
->
getArg
(
'severity'
)
)
->
setChunkSize
(
$args
->
getArg
(
'chunk-size'
)
)
->
run
(
'.'
)
;
echo
"\nProcessed {$count} files.\n"
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jan 19 2025, 23:17 (6 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129806
Default Alt Text
save_lint.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment