-
-
Notifications
You must be signed in to change notification settings - Fork 155
Conversation
this PR addresses #707 and adjusts how our validation scripts behave during pre-commit checks.
Summary
at the moment, scripts like check-image-names.py, check.sh, and check-size.sh also pick up untracked local files. This can cause pre-commit to fail even when those files aren't part of the repository.
With this change, the scripts now only operate on files that are actually tracked by Git. Untracked local files are ignored.
Changes
check-image-names.pynow determines tracked files usinggit ls-filesand skips anything untracked.check.shandcheck-size.shhave been updated to validate only Git-tracked files.
This keeps the naming and size checks strict for repository content, while avoiding unnecessary failures caused by local development files.
Impact
- pre-commit no longer fails because of untracked local files.
- Naming and size rules are still enforced for all tracked content.
- The workflow becomes less frustrating for contributors without reducing repository standards.
Checklist
- I added a summary of any user-facing changes (compared to the last release) in the
changelog-entries/..md - I will remember to squash-and-merge, providing a useful summary of the changes of this PR.
|
@PranjalManhgaye thanks for the contribution! It looks like you included some commits from another branch that were not meant to be here. Could you please sort out the history and push again? |
|
sure , thanks @MakisH for pointing that out. I accidentally branched fix-precommit-hooks off fix-clean-scripts, so the pr included unrelated systemtest/cleaning commits. |
5ee20fe to
579ed2e
Compare
MakisH
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked locally for:
- markdown issues on untracked (and tracked) files
- image names on untracked (and tracked) images
- image size on untracked (and tracked) images
all work as expected. Thanks!
|
@MakisH looks like the pre-commit check failed due to markdownlint npm install (403). let me know if I should open a fix or re-run, |
|
All good, triggered it again, worked. |
|
This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there: https://precice.discourse.group/t/gsoc-2026-pranjal-manhgaye/2769/6 |