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.
Current Behavior
omegaup-hook-toolsdoes not currently support a--stagedflag to restrict linting to only staged files. As a result, callers such asstuff/lint.shin the main omegaup repository cannot delegate staged-only linting and must lint all files.Expected Behavior
Add support for a
--stagedflag that usesgit diff --cached --name-onlyinternally to determine the file list. This will allow tools like./stuff/lint.sh --stagedto lint only staged files, improving pre-commit performance and developer workflow.