Skip to content

Generalise skip_ruff to support skipping linting only, or formatting only #20620

Closed
@huonw

Description

@huonw

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

Currently the skip_ruff field, e.g. python_sources(skip_ruff=True), on a target seems to skip both linting and formatting, but a user might want to only skip one. This is the skip-field version of #20545.

Describe the solution you'd like

Two separate skip fields, for the separate pants.backend.experimental.python.lint.ruff.check and pants.backend.experimental.python.lint.ruff.format backends/functionality:

python_sources(
  skip_ruff_format=True,
  skip_ruff_check=True,
)

Describe alternatives you've considered

N/A
Additional context

It might be nice to ship this in 2.20 if we can get to it soon, but probably not critical.

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions