Skip to content

Document --skip-<tool> options in lint/fix/fmt help-text #18274

Open
@danxmoran

Description

@danxmoran

Is your feature request related to a problem? Please describe.

lint/fix/fmt support the (repeatable) --only flag to specify the tools that should run, but there isn't an easy way to say "run every tool except for XYZ". You can achieve the result you want by passing every tool name except for the one you'd like to exclude via --only, but that's tough to maintain over time as subsystems are added/removed.

Describe the solution you'd like

Support for excluding tools by name. The filter goal/flags support this via a prefix of -, which we could possibly replicate here (i.e. pants lint --only=-pylint). Alternatively we could add a new flag (i.e. pants lint --not=pylint).

Describe alternatives you've considered

We've been working around this by listing out every tool via --only, and have discovered multiple times that we're accidentally skipping a linter in CI because we forgot to update one list or another.

Additional context

lint already has --skip-formatters and --skip-fixers so maybe --skip would make sense for a new option name?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions