Skip to content

Add a hook to run shellcheck on all "runs" steps in melange pipelines#2

Merged
dannf merged 17 commits intomainfrom
shellcheck
May 20, 2025
Merged

Add a hook to run shellcheck on all "runs" steps in melange pipelines#2
dannf merged 17 commits intomainfrom
shellcheck

Conversation

@dannf
Copy link
Copy Markdown
Contributor

@dannf dannf commented May 20, 2025

Also include pre-commit configuration for the files in this repo.

dannf added 15 commits May 8, 2025 11:58
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
This is really intended to be an example for other repos. Rename it
to make that more obvious, and also make room for us to add a working
.pre-commit-config.yaml to this repo.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@techalchemy says this is the what the cool kids are doing.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Stolen from upstream pre-commit-hooks repo.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Allow users to override the shellcheck executable.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Requires that temp files live in the current directory, as that
is what will be mounted within the container.

We should replace this with a guarded container.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
We can pass all run steps to one instance of shellcheck. This
should be faster.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
For easier debugging.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Fewer lines, and clearer.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@dannf dannf changed the title shellcheck support Add a hook to run shellcheck on all "runs" steps in melange pipelines May 20, 2025
@dannf dannf requested review from AmberArcadia and smoser May 20, 2025 10:08
Signed-off-by: Amber Arcadia <amber.arcadia@chainguard.dev>
Signed-off-by: Amber Arcadia <amber.arcadia@chainguard.dev>
Comment thread ruff.toml
Comment thread .pre-commit-config.yaml
Copy link
Copy Markdown
Member

@AmberArcadia AmberArcadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I made a few minor tweaks and notes.

@dannf dannf merged commit 71fca50 into main May 20, 2025
3 checks passed
@dannf dannf deleted the shellcheck branch May 20, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants