-
Notifications
You must be signed in to change notification settings - Fork 17
fix shellcheck and auto fix #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MCK 1.3.0 Release NotesNew FeaturesMulti-Architecture SupportWe've added comprehensive multi-architecture support for the kubernetes operator. This enhancement enables deployment on IBM Power (ppc64le) and IBM Z (s390x) architectures alongside Bug Fixes
Other Changes
|
.githooks/pre-commit
Outdated
@@ -202,7 +202,7 @@ wait_for_all_background_jobs() { | |||
for failure in "${failures[@]}"; do | |||
echo -e "$failure" | |||
done | |||
echo -e "${RED}To see the details look for the job's logs by it's prefixed name (e.g. \"shellcheck:\").${NO_COLOR}" | |||
echo -e "${RED}To see the details look for the job's logs by it's prefixed name (e.g. \"shellcheck failed\").${NO_COLOR}" |
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.
for better searching in the massive amount of logs
@@ -229,10 +229,17 @@ pre_commit() { | |||
# Function to run shellcheck on a single file | |||
run_shellcheck() { | |||
local file="$1" | |||
echo "Running shellcheck on $file" |
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.
no useful information printing that we are checking that file. Let's only echo on failure or when we fixed something
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.
Awesome! LGTM!
Co-authored-by: Łukasz Sierant <[email protected]>
Summary
This pull request focuses on improving shell script robustness and consistency across the codebase. The most significant change is an enhancement to the pre-commit hook's
shellcheck
integration, which now attempts to auto-fix issues and provides a clearer summary of failures.Shellcheck automation and reporting:
.githooks/pre-commit
script to attempt auto-fixing shellcheck issues, collect failed files, and display a summary of failures instead of exiting on the first error. This improves developer experience and code quality.Proof of Work
make precommit
locally - failing:Checklist
skip-changelog
label if not needed