Skip to content

Allow setting default modules_or_packages command line argument in configuration file #9284

@richardebeling

Description

@richardebeling

Current problem

I'd like to invoke pylint in multiple places (CI script, precommit hook, ...) without duplicating any command line arguments. Almost all configuration can be stored in a configuration file. However, afaik, I must currently pass the modules_or_packages command line argument on every invocation.

Desired solution

I would like to have a new configuration option that allows me to specify the modules or packages that will be linted when pylint is invoked without any arguments.

random suggestion: I would like to put it as modules-or-packages inside of tool.pylint.master in my pyproject.toml. Although modules-or-packages is the name the docs use, pylint --help doesn't give a name for these arguments.

Additional context

MyPy has this as the configuration value modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfigurationRelated to configurationNeeds design proposal 🔒This is a huge feature, some discussion should happen before a PR is proposed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions