Closed jfly closed 7 years ago
Hmm... that is unfortunate. I'm merely trying to get a "best guess" implementation here based on the code in the ptools
repo https://github.com/djberg96/ptools/blob/b654c4b2cf9e30e3f1a5869afe88023513d1b0ab/lib/ptools.rb#L90
If this is problematic, I can probably revert the change that introduced this issue. After all, we're swapping one "guess" for another "guess". ¯\_(ツ)_/¯
You're totally right, it's a guess either way =) I'm definitely okay with us explicitly having to state what kind (extensions) of files in our repo need to be checked.
Released v0.32.0
which contains the original binary file check.
This appears to be due to https://github.com/jish/pre-commit/commit/4af9b52190c04bb430821d857ebeda8bb064b633, which changed the
binary?
heuristic.Now a lot (most?) of the images in our repository are not being treated as "binary". I hacked the code a bit to print out the percentage unicode its finding (greater than
0.30
means it is treated as binary):As you can see above, most of these images are coming out to below
0.30
, which means they end up getting checked by myprecommit.rb
script. If you're curious about the specific images, you can find them here.For now, I plan to work around this by explicitly stating the extensions of our binary files in our
.pre_commit.ignore
file.