Page MenuHomePhabricator

`arc lint --everything` will not lint directories (as opposed to files) under git
Open, Needs TriagePublic

Description

Currently, arc lint --everything when using git will execute git ls-files -z to get a complete list of paths to lint. However, this won't include directories (either empty or not), since git just tracks files.

The result, is that linters will never be asked to lint directories even if they return true on shouldLintDirectories (ie: ArcanistFilenameLinter).

AFAIK, there is no straight forward way to do this on git, since it doesn't track directories. It seems that we may need to manually generate folder paths base on the actual file paths to actually get the expected results.

Event Timeline

jsotuyod updated the task description. (Show Details)
jsotuyod added a project: Arcanist.
jsotuyod updated the task description. (Show Details)
jsotuyod added a subscriber: jsotuyod.
joshuaspence renamed this task from arc lint --everything will not lint directories under git to `arc lint --everything` will not lint directories under git.Nov 5 2015, 1:07 AM
joshuaspence claimed this task.
joshuaspence added a project: Lint.
joshuaspence added a subscriber: joshuaspence.

Determining the directories implied by the paths we find and injecting them into the list seems reasonable to me.

eadler renamed this task from `arc lint --everything` will not lint directories under git to `arc lint --everything` will not lint directories (as opposed to files) under git.Jun 17 2016, 6:57 AM
eadler added a project: Restricted Project.
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 17 2016, 7:09 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:05 PM