Standing-Man opened a new issue, #3181:
URL: https://github.com/apache/iggy/issues/3181

   ### Bug description
   
   1. `markdownlint` passes `--staged`, but `scripts/ci/markdownlint.sh` 
ignores it
   However, `markdownlint.sh` only parses the first argument (`--check` or 
`--fix`) and ignores any following arguments. As a result, once the hook is 
triggered by a staged Markdown file, it runs against all `**/*.md` files 
instead of only staged Markdown files.
   
   2. `shellcheck` passes --staged, but `scripts/ci/shellcheck.sh` ignores it
   But `shellcheck.sh` also only parses the first argument and then scans all 
shell scripts in the repository using find. So staging one shell script can 
cause every shell script in the repository to be checked.
   
   3. Hook trigger scope and execution scope differ
   Because these hooks use pass_filenames: false, pre-commit only uses staged 
files to decide whether the hook should run. After the hook starts, the script 
decides what to check. For markdownlint and shellcheck, that currently means 
full-repo scans.
   This is surprising because the config includes --staged, which suggests 
staged-only behavior.
   
   4. `trailing-whitespace.sh` --fix may fail on macOS
   BSD/macOS sed -i requires a backup suffix argument, so this can fail during 
local pre-commit runs on macOS.
   
   5. .....
   
   ### Expected behavior
   - [ ] `markdownlint` --staged should only check/fix staged Markdown files.
   - [ ] `shellcheck` --staged should only check staged shell scripts.
   - [ ] `CI/default` full-repository checks should remain available via the 
existing default or an explicit --all.
   - [ ] `trailing-whitespace.sh` --fix should work on both `GNU/Linux` and 
`macOS`.
   
   ### Deployment
   
   None
   
   ### Versions
   
   _No response_
   
   ### Hardware / environment
   
   _No response_
   
   ### Sample code
   
   _No response_
   
   ### Logs
   
   _No response_
   
   ### Iggy server config
   
   _No response_
   
   ### Reproduction
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to