5

I would like to setup a quality check that enforces a certain score from pylint before authorizing a merge on a certain github branch. Is there a way to do this ? I see on github that you can set up "Require status checks to pass before merging" and I guess one status check could be a certain score on pylint.

Thank you for any guidance.

Charles Verleyen
  • 157
  • 1
  • 1
  • 5

1 Answers1

2

There is now a solution for this: Use the new --fail-under flag.

"If the final score is more than the specified score, it's considered a success and pylint exits with exit code 0. Otherwise, it's considered a failure and pylint exits with its current exit code based on the messages issued."

https://github.com/PyCQA/pylint/commit/16017690196e77fcabdedf1cd8b8cbfb357a97d4

Thomas
  • 4,696
  • 5
  • 36
  • 71
  • I can't find this flag in `pylint` feature [list](https://docs.pylint.org/en/1.6.0/features.html) or in example [pylintrc](https://github.com/PyCQA/pylint/blob/master/pylintrc), am I missing something? – saadi Mar 20 '20 at 21:52
  • The future is pretty new, it might not be documented yet? – Thomas Mar 21 '20 at 22:02
  • 1
    Tested it, it does not work in the latest version either. – saadi Mar 23 '20 at 16:44