Pylint: How to get only score?

Created on 25 Jul 2019  路  4Comments  路  Source: PyCQA/pylint

Question

Is there any way to disable output and show only score via command line or programmatically?

Most helpful comment

@PCManticore what's wrong with "only" score?

It can be used in CI-CD pipelines to ensue code below a certain threshold value doesn't get deployed.

All 4 comments

No, the score is not the purpose of pylint, the output is.

@PCManticore what's wrong with "only" score?

It can be used in CI-CD pipelines to ensue code below a certain threshold value doesn't get deployed.

@devender-yadav There is a way to display only the score: pipenv run pylint -E $(find ./src/ -name "*.py") --score=y --reports=n the reports=n suppresses other output and --score=y ensures that the score is being displayed. You can then parse it in a way you wish.

@techspeque thanks for taking time to answer to this old post. :+1:

Was this page helpful?
0 / 5 - 0 ratings