Page MenuHomePhabricator

Allow linters that extend `ArcanistExternalLinter` to customize the file parameter
ClosedPublic

Authored by champo on May 9 2014, 4:21 PM.

Details

Summary

Not all linters run on a command file fashion. In particular, the maven checkstyle plugin runs like command --flag=file.

Test Plan

Run a linter that extends ArcanistExternalLinter.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

champo updated this revision to Diff 21439.May 9 2014, 4:21 PM
champo retitled this revision from to Allow linters that extend `ArcanistExternalLinter` to override the future.
champo updated this object.
champo edited the test plan for this revision. (Show Details)
champo added a reviewer: epriestley.
champo added a comment.May 9 2014, 4:24 PM

Sorry for the ninja diff, I was coding, got into it and forgot to log into IRC to check with you. We don't need this upstream 100% but it would be nice.

epriestley edited edge metadata.May 9 2014, 4:30 PM

Hmm, let's add some kind of, like getPathArgumentForLinterFuture($path) instead, which defaults to return $path;? I'd rather not expose the entire future construction unless we have to. Subclasses might have difficulty implementing subtleties like stdin rules and eventual hook rules correctly, and this stuff could change later.

champo planned changes to this revision.May 9 2014, 4:35 PM

Yeah, that sounds better.

champo updated this revision to Diff 21487.May 11 2014, 12:08 AM
champo edited edge metadata.

Instead of overriding the future, add a method to customize the file parameter.

champo retitled this revision from Allow linters that extend `ArcanistExternalLinter` to override the future to Allow linters that extend `ArcanistExternalLinter` to customize the file parameter.May 11 2014, 12:09 AM
epriestley accepted this revision.May 11 2014, 11:25 PM
epriestley edited edge metadata.
This revision is now accepted and ready to land.May 11 2014, 11:25 PM
epriestley closed this revision.May 11 2014, 11:27 PM
epriestley updated this revision to Diff 21506.

Closed by commit rARC377c585752b6 (authored by @champo, committed by @epriestley).