michalrus / git-hooks-code-autoformat

Apache License 2.0
87 stars 24 forks source link

Fixing issue where magic file matching too loose #13

Closed jad007 closed 6 years ago

jad007 commented 6 years ago

When file returns its output, it generally will return the name of the file along with its results for file contents. This would cause files named something like XmlParser.java to be counted as XML files, and be parsed to the xmllint formatter. Adding the -b flag tells file to print a brief output, which does not echo out the file name, just the results for file contents.

michalrus commented 6 years ago

Wonderful, thank you!