Skip to content

Potential fixes for 2 code quality findings#87

Merged
ethanyzhang merged 3 commits into
mainfrom
ai-findings-autofix/githooks-pre-commit
Apr 13, 2026
Merged

Potential fixes for 2 code quality findings#87
ethanyzhang merged 3 commits into
mainfrom
ai-findings-autofix/githooks-pre-commit

Conversation

@ethanyzhang
Copy link
Copy Markdown
Collaborator

This PR applies 2/3 suggestions from code quality AI findings. 1 suggestion was skipped to avoid creating conflicts.

ethanyzhang and others added 3 commits April 13, 2026 14:38
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Two improvements to the pre-commit hook:

1. Merge the two 'go test ./...' invocations into one with -race and
   -coverprofile together. The test suite was running twice on every
   commit; combining roughly halves hook runtime. -race mandates
   -covermode=atomic, which the coverage run already used.

2. Treat empty COVERAGE as a failure rather than silently passing.
   Previously, if 'go tool cover -func' emitted nothing (e.g. the test
   run above had already aborted), the outer -n guard skipped the
   threshold check entirely, so a broken coverage profile looked like
   a clean run.
@ethanyzhang ethanyzhang force-pushed the ai-findings-autofix/githooks-pre-commit branch from 8f04cab to 1fc50e8 Compare April 13, 2026 19:39
@ethanyzhang ethanyzhang marked this pull request as ready for review April 13, 2026 19:39
@ethanyzhang ethanyzhang merged commit 4bcd1d6 into main Apr 13, 2026
8 of 9 checks passed
@ethanyzhang ethanyzhang deleted the ai-findings-autofix/githooks-pre-commit branch April 13, 2026 19:41
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.

1 participant