Page MenuHomePhabricator

Don't lint symlinks by default.
ClosedPublic

Authored by joshuaspence on Jun 10 2014, 12:04 AM.
Tags
None
Referenced Files
F13992225: D9448.diff
Tue, Oct 22, 3:16 PM
F13989204: D9448.id22636.diff
Mon, Oct 21, 6:56 PM
F13975736: D9448.id22553.diff
Fri, Oct 18, 11:24 AM
F13975713: D9448.diff
Fri, Oct 18, 11:20 AM
F13958158: D9448.id22553.diff
Mon, Oct 14, 1:15 PM
Unknown Object (File)
Sat, Oct 12, 11:41 PM
Unknown Object (File)
Sep 26 2024, 10:49 PM
Unknown Object (File)
Sep 20 2024, 4:28 AM
Subscribers

Details

Summary

Fixes T5300. Currently, if a dead symbolic link is linted, all kinds of errors will be thrown by most linters because they will try to read the (non-existent) file contents. Instead, let's not lint symbolic links by default. In the case that the target of a symbolic link is inside the working copy, then it should be being linted anyway.

Test Plan

Created a symbolic link and verified that it wasn't linted (by any linter other than the ArcanistFilenameLinter).

Diff Detail

Repository
rARC Arcanist
Branch
shouldlintsymlinks
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 983
Build 983: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Don't lint symlinks by default..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

One inline -- can you verify that it doesn't cause problems?

src/lint/engine/ArcanistLintEngine.php
194

I would expect this to need to call getFilePathOnDisk() and test that, particularly if arc lint is run from a subdirectory.

src/lint/engine/ArcanistLintEngine.php
194

Yeah of course... I run arc from the project root 99% of the test and so often forget about things like this.

joshuaspence edited edge metadata.
  • Use getFilePathOnDisk to get the absolute path.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 11 2014, 1:19 AM
epriestley updated this revision to Diff 22636.

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