Situation
In my company, some developer needs to work in a windows environment. Therefore I need a basic custom linter based on the ArcanistTextLinter.
So I started asking in Q220 how this works in general.
I copied an exisiting Linter, customized it an saved it in the arcanist extensions directory.
After editing my .arclint file arc linters command works as expected and finds the new linter.
The Error
If I try to lint some files i get the following error:
$ arc lint WindowsPowerShell/Modules/VCRTools/Write-Message2.ps1 --trace libphutil loaded from '/home/admwkiv924/phab/libphutil/src'. arcanist loaded from '/home/admwkiv924/phab/arcanist/src'. Config: Reading user configuration file "/home/admwkiv924/.arcrc"... Config: Did not find system configuration at "/etc/arcconfig". Working Copy: Reading .arcconfig from "/home/admwkiv924/workspace/phabricator/vcr-powercli/.arcconfig". Working Copy: Path "/home/admwkiv924/workspace/phabricator/vcr-powercli" is part of `git` working copy "/home/admwkiv924/workspace/phabricator/vcr-powercli". Working Copy: Project root is at "/home/admwkiv924/workspace/phabricator/vcr-powercli". Config: Did not find local configuration at "/home/admwkiv924/workspace/phabricator/vcr-powercli/.git/arc/config". Examining paths for linter 'powerhsell'. Found 1 matching paths for linter 'powerhsell'. [2015-11-25 13:06:16] ERROR 2: md5_file(/home/admwkiv924/phab/arcanist/src//home/admwkiv924/phab/arcanist/src/extensions/ArcanistPowerShellLinter.php): failed to open stream: No such file or directory at [/home/admwkiv924/phab/arcanist/src/lint/engine/ArcanistLintEngine.php:204] arcanist(head=master, ref.master=9e78d15fc0c7, custom=1), phutil(head=master, ref.master=5538909d6468) #0 md5_file(string) called at [<arcanist>/src/lint/engine/ArcanistLintEngine.php:204] #1 ArcanistLintEngine::run() called at [<arcanist>/src/workflow/ArcanistLintWorkflow.php:334] #2 ArcanistLintWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382] >>> [0] <lint> Basic PowerShell Linter <paths = 1> <<< [0] <lint> 343 us >>> [1] <lint> Basic PowerShell Linter <paths = 1> <<< [1] <lint> 96 us >>> [2] <exec> $ git rev-parse --git-dir <<< [2] <exec> 3,799 us OKAY No lint warnings.
At first I thought I did something wrong with the lint file itself, or messed up with my environment. So I moved to a new system and tried it again but with the same result. I also tried it in a windows and linux environment with the same results.
According to the line beginning with [2015-11-25 13:06:16] ERROR 2: it seems like the directory is wrong. Maybe because of some configuration errors or parsing in ArcanistLinterEngine:
if ($symbol) { $version .= ':'.md5_file( phutil_get_library_root($symbol['library']).'/'.$symbol['where']); }
So I hope this are enough details to work with :D