dakrone / lein-bikeshed

A Leiningen plugin designed to tell you your code is bad, and that you should feel bad
176 stars 23 forks source link

Option to ignore files not in git #23

Open skazhy opened 8 years ago

skazhy commented 8 years ago

Rationale: I have many "messy" files that are not checked in git (typically living in :profiles :dev :source-paths) & I don't want to lint them until I have checked them in git.

This PR adds a new -c flag that ignores source files that are not tracked by git.

dakrone commented 8 years ago

Hmm.. so the only thing I'm concerned with here is whether this will run into a limit for the command line length, say if there are a lot of files with long names, whether it'll exceed the argument length for the commands.

What do you think about this? It might be better to change it not to expand the full list and instead pass it in a "pipe-y" way?

skazhy commented 8 years ago

Totally forgot about this PR, heh.

Recently I found that Python's flake8 provides a neat feature that generates a git hook which only checks staged versions of files in the .git directory & that's is much more elegant solution (no need for a file blacklist; staged files can be linted with gnutools-based checkers pretty fast).

I'll try to see if it works with bikeshed as well.