researchgate / phpnsc

Small tool to check for missing use statements when using PHP namespaces
MIT License
43 stars 4 forks source link

Add return codes to allow usage in e.g. a commit hook #8

Closed ExplodingCabbage closed 8 years ago

ExplodingCabbage commented 8 years ago

I wanted to write a Git commit hook that would block me from committing if I had any linting errors, but at present phpnsc binary doesn't spit out a status code to indicate the presence of errors (which linting tools usually do). This makes it emit a status code 1 on error, which allows it to be used nicely in a hook.

bashofmann commented 8 years ago

Looks good, thanks