alexcouper / captainhook

Git hook scripts
BSD 3-Clause "New" or "Revised" License
54 stars 14 forks source link

isort checker ignores isort config #54

Closed OddBloke closed 10 years ago

OddBloke commented 10 years ago

isort looks for its config files in the parent directories of the files being checked (rather than the directory in which the isort process is running). This means that the isort checkers doesn't obey a project's .isort.cfg files because it doesn't find it in the temporary directory structure we copy to.

I propose defining an EXTRA_FILES attribute on checker modules, which will contain the names of files which should be copied across to the temporary directory (if they exist in the repo). @alexcouper, what do you reckon?

(I've opened https://github.com/timothycrosley/isort/issues/166 to work out what the expected isort behaviour might be)

OddBloke commented 10 years ago

timothycrosley/isort#166 has been closed as this is expected behaviour. So we'll definitely need to handle this somehow.