Split full lint from local format - #2361
Open
karakanb wants to merge 2 commits into
Open
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
Makefile:120-124
**`wait` with no arguments always returns exit code 0**, so `lint-full` will report success even when either `golangci-lint` invocation finds real issues. Per POSIX and bash specifications, `wait` with no jobspec waits for all children and unconditionally returns 0. The original CI ran the two linters as sequential steps with direct exit-code propagation — the parallel refactor breaks that guarantee. The fix is to capture each PID and wait for them individually.
```suggestion
lint-full:
@echo "$(OK_COLOR)>> [golangci-lint] running full lint suite$(NO_COLOR)"; \
golangci-lint run --timeout 10m60s --build-tags="no_duckdb_arrow" ./... & PID1=$$!; \
(cd semantic-engine && golangci-lint run --timeout 10m60s ./...) & PID2=$$!; \
wait $$PID1; R1=$$?; \
wait $$PID2; R2=$$?; \
exit $$((R1 + R2))
```
Reviews (1): Last reviewed commit: "split full lint from local format" | Re-trigger Greptile |
Comment on lines
120
to
124
| lint-full: | ||
| @echo "$(OK_COLOR)>> [golangci-lint] running full lint suite$(NO_COLOR)" & \ | ||
| golangci-lint run --timeout 10m60s --build-tags="no_duckdb_arrow" ./... & \ | ||
| cd semantic-engine && golangci-lint run --timeout 10m60s ./... & \ | ||
| wait |
Contributor
There was a problem hiding this comment.
wait with no arguments always returns exit code 0, so lint-full will report success even when either golangci-lint invocation finds real issues. Per POSIX and bash specifications, wait with no jobspec waits for all children and unconditionally returns 0. The original CI ran the two linters as sequential steps with direct exit-code propagation — the parallel refactor breaks that guarantee. The fix is to capture each PID and wait for them individually.
Suggested change
| lint-full: | |
| @echo "$(OK_COLOR)>> [golangci-lint] running full lint suite$(NO_COLOR)" & \ | |
| golangci-lint run --timeout 10m60s --build-tags="no_duckdb_arrow" ./... & \ | |
| cd semantic-engine && golangci-lint run --timeout 10m60s ./... & \ | |
| wait | |
| lint-full: | |
| @echo "$(OK_COLOR)>> [golangci-lint] running full lint suite$(NO_COLOR)"; \ | |
| golangci-lint run --timeout 10m60s --build-tags="no_duckdb_arrow" ./... & PID1=$$!; \ | |
| (cd semantic-engine && golangci-lint run --timeout 10m60s ./...) & PID2=$$!; \ | |
| wait $$PID1; R1=$$?; \ | |
| wait $$PID2; R2=$$?; \ | |
| exit $$((R1 + R2)) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: Makefile
Line: 120-124
Comment:
**`wait` with no arguments always returns exit code 0**, so `lint-full` will report success even when either `golangci-lint` invocation finds real issues. Per POSIX and bash specifications, `wait` with no jobspec waits for all children and unconditionally returns 0. The original CI ran the two linters as sequential steps with direct exit-code propagation — the parallel refactor breaks that guarantee. The fix is to capture each PID and wait for them individually.
```suggestion
lint-full:
@echo "$(OK_COLOR)>> [golangci-lint] running full lint suite$(NO_COLOR)"; \
golangci-lint run --timeout 10m60s --build-tags="no_duckdb_arrow" ./... & PID1=$$!; \
(cd semantic-engine && golangci-lint run --timeout 10m60s ./...) & PID2=$$!; \
wait $$PID1; R1=$$?; \
wait $$PID2; R2=$$?; \
exit $$((R1 + R2))
```
How can I resolve this? If you propose a fix, please make it concise.
Contributor
|
Reviews (2): Last reviewed commit: "propagate full lint failures" | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speeds up local formatting by removing duplicate formatter work and deferring expensive linters. Keeps the complete lint suite in CI.