PrincetonUniversity / blocklint

MIT License
7 stars 7 forks source link

Add fail on detection flag #5

Closed jaedoucette closed 3 years ago

jaedoucette commented 3 years ago

I am using blocklint as part of a CI/CD pipeline on a protected branch.

I would like blocklint to exit with a non-zero status if it encounters more than a specific number of instances of non-inclusive language, so that my pipeline can prevent merging to a protected branch when new instances of non-inclusive language are being added to a codebase.

This PR adds a new argument to blocklint that implements this behavior. Included is a test file to cover the proposed changes.

I also added a second line of whitespace between function definitions, conforming to PEP8 as suggested by flake8. Happy to remove that change if it is not welcome in this project.