Skip to content

unknown-option-value should result in non-zero exit code #8457

@l0b0

Description

@l0b0

Bug description

Unknown disable or enable values (on the command line, in pyproject.toml, or in .pylintrc) do not trigger a non-zero exit code when using the default configuration.

test.py which passes default pylint rules:

"""comment"""
pass

Configuration

No response

Command used

pylint --disable=foo test.py

Pylint output

************* Module Command line
Command line:1:0: W0012: Unknown option value for '--disable', expected a valid pylint message and got 'foo' (unknown-option-value)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Expected behavior

The exit code should be non-zero.

Pylint version

pylint 2.17.0
astroid 2.15.0
Python 3.10.9 (main, Dec  6 2022, 18:44:57) [GCC 11.3.0]

OS / Environment

NixOS 22.11

Additional dependencies

astroid==2.15.0
dill==0.3.6
isort==5.12.0
lazy-object-proxy==1.9.0
mccabe==0.7.0
platformdirs==3.1.1
pylint==2.17.0
tomli==2.0.1
tomlkit==0.11.6
typing_extensions==4.5.0
wrapt==1.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking changes 🦤Enhancement ✨Improvement to a componentNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions