Skip to content
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

Propagate pre-commit errors when running go commands #933

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

tateexon
Copy link
Collaborator

@tateexon tateexon commented Apr 29, 2024

Stuff happening inside of the bash -c "..." doesn't push the exit code outside so we weren't actually getting the errors. Changed these to loops instead.


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

These changes enhance development tooling and workflow automation by refining the execution of Go-related hooks, adding typo detection, and updating tool versions. This improves code quality and consistency across the project.

What

  • .githooks/go-lint, .githooks/go-mod-tidy, .githooks/go-test-build
    • Replaced xargs command with a while loop to iterate over files. This change improves the readability and reliability of the script execution.
    • Fixed missing variable assignments and command substitutions, ensuring the correct directory is used for each operation.
    • Added cd - to return to the original directory, maintaining the expected working directory state after script execution.

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@tateexon tateexon merged commit dff640d into main Apr 29, 2024
17 checks passed
@tateexon tateexon deleted the propagate-go-issues-in-pre-commit branch April 29, 2024 22:03
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.

None yet

2 participants