mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-24 21:48:20 +01:00
2c5c9815c0
Summary:
Ref T3186. Ref T2039. Ref T3771. A few effects here:
# Expose PHPCS as a `.arclint` linter.
# Turn PHPCS into an ArcanistExternalLinter linter.
# Add test coverage for PHPCS.
# Add a `severity.rules` option to `.arclint`. Some linters have very explicit builtin severities ("error", "warning") but their meanings are different from how arc interprets these terms. For example, PHPCS raises "wrong indentation level" as an "error". You can already use the "severity" map to adjust individual rules, but if you want to adjust an entire linter it's currently difficult. This rule map makes it easy. There's substantial precedent for this in other linters, notably all the Python linters.
For `severity.rules`, for example, this will turn all PHPCS "errors" into warnings, and all of its warnings into advice:
"severity.rules" : {
"(^PHPCS\\.E\\.)" : "warning",
"(^PHPCS\\.W\\.)" : "advice"
}
The user can use `severity` (or more rules) to get additional granularity adjustments if they desire.
Test Plan:
|
||
---|---|---|
.. | ||
ArcanistConfigurationDrivenLintEngine.php | ||
ArcanistLintEngine.php | ||
ArcanistSingleLintEngine.php | ||
ComprehensiveLintEngine.php | ||
ExampleLintEngine.php | ||
PhutilLintEngine.php | ||
UnitTestableArcanistLintEngine.php |