Page MenuHomePhabricator

Set the working directory to the project root for external linter `ExecFuture` classes.
ClosedPublic

Authored by joshuaspence on May 17 2014, 4:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 12:08 AM
Unknown Object (File)
Mon, Apr 29, 2:47 PM
Unknown Object (File)
Wed, Apr 24, 10:15 PM
Unknown Object (File)
Fri, Apr 19, 3:29 PM
Unknown Object (File)
Fri, Apr 5, 5:12 PM
Unknown Object (File)
Mar 21 2024, 6:26 AM
Unknown Object (File)
Mar 20 2024, 11:39 PM
Unknown Object (File)
Jan 20 2024, 11:07 PM
Subscribers

Details

Summary

Fixes T5085. Currently, the ExecFuture instances that are used to call an external linter are executed in the current working directory. This means that if a path is specified in the .arclint file, relative to the project root directory, that the path will not be properly interpreted by the external linter when arc lint is called from a level deeper than the project root.

Test Plan

Ran arc lint from a subdirectory of a project and verified that the linter did not throw an exception due to not being able to find the specified configuration file.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Set the working directory to the project root for external linter `ExecFuture` classes..
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.May 17 2014, 4:48 AM
epriestley updated this revision to Diff 21763.

Closed by commit rARC7bde5941cf71 (authored by @joshuaspence, committed by @epriestley).

My only concern with this method is that it makes the output of arc lint --trace harder to read, because it is not clear that the command is being executed in the project root,

It would occasionally be nice to have CWD and ENV in --trace somehow, but they'd be really spammy 99% of the time.