vrana
|
0b45ec30be
|
Move files in Arcanist one level up
Summary:
- `kill_init.php`
- Manually change library map.
- Manually rename `/data/` test dirs.
- [src/lint/linter] `git mv base/ArcanistLinterTestCase.php __tests__/`
- `arc liberate`
Test Plan: Browse around to make sure I like it better, especially `repository/api`, and `workflow`.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Koolvin
Maniphest Tasks: T1103
Differential Revision: https://secure.phabricator.com/D2637
|
2012-06-01 11:56:00 -07:00 |
|
epriestley
|
9cd098ca01
|
Add "ArcanistSingleLintEngine" and "ArcanistScriptAndRegexLinter"
Summary:
Request from @csilvers. Allow installs to get most linter features with regexes, configuration and external scripts if they are hesitant to write phutil libraries.
- Add "ArcanistSingleLintEngine", which implements the smallest possible engine behavior (run one linter on every path).
- Add "ArcanistScriptAndRegexLinter", which uses a script and a regex to parse lint output from other scripts.
Depends on D2618.
Test Plan:
Basics:
$ arc set-config lint.engine ArcanistSingleLintEngine
Set key 'lint.engine' = 'ArcanistSingleLintEngine'.
$ arc set-config lint.engine.single.linter ArcanistScriptAndRegexLinter
Set key 'lint.engine.single.linter' = 'ArcanistScriptAndRegexLinter'.
$ arc set-config linter.scriptandregex.script 'echo derp #'
Set key 'linter.scriptandregex.script' = 'echo derp #'.
$ arc set-config linter.scriptandregex.regex '/^(?P<message>.*)$/m'
Set key 'linter.scriptandregex.regex' = '/^(?P<message>.*)$/m'.
$ arc lint
>>> Lint for .arcconfig:
Error (S&RX) Lint
derp
1 {
2 "project_id" : "arcanist",
3 "conduit_uri" : "https://secure.phabricator.com/",
Throw:
$ arc set-config linter.scriptandregex.regex '/^(?P<throw>.*)$/m'
Set key 'linter.scriptandregex.regex' = '/^(?P<throw>.*)$/m' (was '/^(?P<message>.*)$/m').
$ arc lint
Usage Exception: ArcanistScriptAndRegexLinter: configuration captured a 'throw' named capturing group, 'derp'. Script output:
derp
Ignore:
$ arc set-config linter.scriptandregex.regex '/^(?P<ignore>.*)$/m'
Set key 'linter.scriptandregex.regex' = '/^(?P<ignore>.*)$/m' (was '/^(?P<throw>.*)$/m').
$ arc lint
OKAY No lint warnings.
Severity:
$ arc set-config linter.scriptandregex.regex '/^(?P<warning>.)(?P<message>.*)$/m'
Set key 'linter.scriptandregex.regex' = '/^(?P<warning>.)(?P<message>.*)$/m' (was '/^(?P<ignore>.*)$/m').
$ arc lint
>>> Lint for src/lint/engine/single/ArcanistSingleLintEngine.php:
Warning (S&RX) Lint
erp
1 <?php
2
3 /*
Reviewers: csilvers, btrahan, vrana
Reviewed By: csilvers
CC: aran
Differential Revision: https://secure.phabricator.com/D2619
|
2012-05-31 12:09:01 -07:00 |
|