Skip to content

--fail-under flag #2242

Closed
Closed
@pckroon

Description

@pckroon

Is your feature request related to a problem? Please describe

Hi all,

I like running pylint on my codebase on Travis as a check, but I think it's unreasonable to fix all the warning, errors and other messages pylint issues (I do want to see them though). What I would like is to have a 0 exit code if and only if the final score is more than a certain value (say, 9). As time progresses and the project matures I can then increase that score threshold to higher and higher values.

Currently, so long as pylint finds any problem with my code and issues a message, it exits with a non-zero exit code, signalling failure to Travis.

Describe the solution you'd like

A --fail-under <score> flag, also configurable in a .pylintrc file. If the final score is more than the specified score, it's considered a success and pylint exits with exitcode 0. Otherwise, it's considered a failure and pylint exits with it's current exitcode based on the messages issued.

Current work-around

At the moment I call pylint as following in Travis, but that trashes the actual usefull output. And is hard to read.
test $(bc -l <<< $(pylint --disable=fixme vermouth | sed -re "s_.* ([0-9\.]+)/10.*_\1>9_;t;d")) -eq 1

Thanks for all the hard work so far, keep it up! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement ✨Improvement to a componentGood first issueFriendly and approachable by new contributorsHelp wanted 🙏Outside help would be appreciated, good for new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions