Skip to content

Split full lint from local format - #2361

Open
karakanb wants to merge 2 commits into
mainfrom
profile-slow-golangci-linters
Open

Split full lint from local format#2361
karakanb wants to merge 2 commits into
mainfrom
profile-slow-golangci-linters

Conversation

@karakanb

@karakanb karakanb commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Speeds up local formatting by removing duplicate formatter work and deferring expensive linters. Keeps the complete lint suite in CI.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix 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 thread Makefile Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "propagate full lint failures" | Re-trigger Greptile

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