1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-24 21:48:20 +01:00
phorge-arcanist/src/lint/engine
epriestley 2c5c9815c0 Support PHPCS as a .arclint linter
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: 5bb919bc3a

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, ajtrichards

Maniphest Tasks: T2039, T3186, T3771

Differential Revision: https://secure.phabricator.com/D6830
2013-08-29 06:47:27 -07:00
..
ArcanistConfigurationDrivenLintEngine.php Expose PEP8, Flake8 and CSSLint engines to .arclint 2013-08-23 11:58:07 -07:00
ArcanistLintEngine.php Support PHPCS as a .arclint linter 2013-08-29 06:47:27 -07:00
ArcanistSingleLintEngine.php Delete license headers from files 2012-11-05 11:16:24 -08:00
ComprehensiveLintEngine.php Ready more linters and linter functions for .arclint 2013-08-26 05:37:10 -07:00
ExampleLintEngine.php Delete license headers from files 2012-11-05 11:16:24 -08:00
PhutilLintEngine.php Ready more linters and linter functions for .arclint 2013-08-26 05:37:10 -07:00
UnitTestableArcanistLintEngine.php Delete license headers from files 2012-11-05 11:16:24 -08:00