Skip to content

Add make target to lint only staged files #2382

@mr-raj12

Description

@mr-raj12

The problem

Currently, running make lint executes uv run pre-commit run --all-files, which lints the entire codebase. While this is useful for comprehensive checks, it can be slow during active development when developers only want to lint their staged changes.

Although developers can run uv run pre-commit run directly to lint only staged files, this command is not documented in the Makefile help and is less discoverable for contributors.

Requested Solution

Add a new make lint-staged target to the Makefile:

lint-staged:  ## Run linting on staged files only
	uv run pre-commit run --show-diff-on-failure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions