Page MenuHomePhabricator

Allow linter standards to be used with different linter types
AcceptedPublic

Authored by joshuaspence on Feb 18 2016, 4:20 AM.
Tags
None
Referenced Files
F18828089: D15298.diff
Fri, Oct 24, 2:12 PM
F18821661: D15298.diff
Thu, Oct 23, 1:08 AM
F18766737: D15298.id.diff
Oct 7 2025, 6:15 PM
F18696298: D15298.diff
Sep 27 2025, 7:16 AM
F18618378: D15298.diff
Sep 14 2025, 11:57 PM
F18085794: D15298.id.diff
Aug 5 2025, 7:25 PM
Unknown Object (File)
Jun 30 2025, 7:22 AM
Unknown Object (File)
Jun 19 2025, 4:11 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

This change allows linter standards to be reused with different linters. For example, you can define a PSR-2 linter standard which applies to ArcanistTextLinter and ArcanistXHPASTLinter.

public function getLinterConfiguration(ArcanistLinter $linter) {
    if ($linter instanceof ArcanistTextLinter) {
        return array(
            // ...
        );
    } else if ($linter instanceof ArcanistXHPASTLinter) {
        return array(
            // ...
        );
    }
}
Test Plan

Tested with a custom arcanist library.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 10748
Build 13224: Run Core Tests
Build 13223: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Allow linter standards to be used with different linter types.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Feb 18 2016, 10:55 AM