Skip to content

[FEATURE] Add support for --staged flag to lint only staged files #50

Description

@PrasannaMishra001

Current Behavior

omegaup-hook-tools does not currently support a --staged flag to restrict linting to only staged files. As a result, callers such as stuff/lint.sh in the main omegaup repository cannot delegate staged-only linting and must lint all files.

Expected Behavior

Add support for a --staged flag that uses git diff --cached --name-only internally to determine the file list. This will allow tools like ./stuff/lint.sh --staged to lint only staged files, improving pre-commit performance and developer workflow.

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

    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