Page MenuHomePhabricator

arc lint can not find php and phpcs
Open, Needs TriagePublic

Description

I've add a .arclint for arc lint. php and phpcs are used for checking codes. It run well for our team. But in one PC(Win8),
php and phpcs have been added to environment variables, and can be run anywhere.
when arc lint, it display error:

2015-08-03 08:44:24] EXCEPTION: (PhutilAggregateException) Some linters failed:

  • ArcanistMissingLinterException: Unable to locate binary "phpcs" to run lin

ter ArcanistPhpcsLinter. You may need to install the binary, or adjust your lint
er configuration.

  TO INSTALL: Install PHPCS with `pear install PHP_CodeSniffer`.
- ArcanistMissingLinterException: Unable to locate binary "php" to run linte

r ArcanistPhpLinter. You may need to install the binary, or adjust your linter c
onfiguration.

TO INSTALL: Install PHP. at [<arcanist>\src\lint\engine\ArcanistLintEngine

.php:273]
arcanist(head=master, ref.master=0d6f3328a08f), phutil(head=master, ref.master=a
a6cd8f7e5e5)

#0 <#2> ArcanistExternalLinter::checkBinaryConfiguration() called at [<arcanis

t>\src\lint\linter\ArcanistExternalLinter.php:270]

#1 <#2> ArcanistExternalLinter::getExecutableCommand() called at [<arcanist>\s

rc\lint\linter\ArcanistExternalLinter.php:332]

#2 <#2> ArcanistExternalLinter::buildFutures(array) called at [<arcanist>\src\

lint\linter\ArcanistFutureLinter.php:17]

#3 <#2> ArcanistFutureLinter::willLintPaths(array) called at [<arcanist>\src\l

int\engine\ArcanistLintEngine.php:580]

#4 <#2> ArcanistLintEngine::executeLinterOnPaths(ArcanistPhpcsLinter, array) c

alled at [<arcanist>\src\lint\engine\ArcanistLintEngine.php:541]

#5 <#2> ArcanistLintEngine::executeLintersOnChunk(array, array) called at [<ar

canist>\src\lint\engine\ArcanistLintEngine.php:479]

#6 <#2> ArcanistLintEngine::executeLinters(array) called at [<arcanist>\src\li

nt\engine\ArcanistLintEngine.php:217]

#7 ArcanistLintEngine::run() called at [<arcanist>\src\workflow\ArcanistLintWo

rkflow.php:336]

#8 ArcanistLintWorkflow::run() called at [<arcanist>\scripts\arcanist.php:382]

Event Timeline

brucenan999 raised the priority of this task from to Needs Triage.
brucenan999 updated the task description. (Show Details)
brucenan999 added a subscriber: brucenan999.

We haven't had other reports, unfortunately, and nothing specific comes to mind.

Do you have any suggestions about it? In the Win8 Git Bash shell, I can run phpcs and php, But arc lint still tells me that it can not find them.

I check the code, find that arcanist try to execute "where php" and "where phpcs" to find the path of them.
But the Git Bash doesn't have "where" command, only has "which" command. I copy which to where, but it still doesn't work.

(These questions are way better suited for Stack Overflow or Google).

normal shell has the same problem.

Sorry, this is just in "fishing expedition" land, and we're not staffed to help you further. Nothing sounds like an issue with Phabricator.

Will leave it open for now if anyone passing by has additional thoughts. If you can list the exact steps to reproduce, that would be helpful too (like which shells specifically have been tested).

https://secure.phabricator.com/book/phabcontrib/article/bug_reports/ has more detailed information.