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
Unknown Object (File)
Mar 9 2024, 9:10 PM
Unknown Object (File)
Mar 6 2024, 6:07 AM
Unknown Object (File)
Jan 3 2024, 11:38 AM
Unknown Object (File)
Nov 30 2023, 7:35 PM
Unknown Object (File)
Nov 30 2023, 4:59 AM
Unknown Object (File)
Nov 18 2023, 12:27 AM
Unknown Object (File)
Nov 1 2023, 9:31 PM
Unknown Object (File)
Oct 16 2023, 12:47 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