Skip to content

Commit 4181658

Browse files
committed
revert golang.mk
Signed-off-by: JaredforReal <[email protected]>
1 parent 789fc47 commit 4181658

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

tools/make/golang.mk

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,15 @@
88
go-lint:
99
@$(LOG_TARGET)
1010
@echo "Running golangci-lint for src/semantic-router..."
11-
@set -e; \
12-
BIN=$$(command -v golangci-lint || true); \
13-
if [ -z "$$BIN" ] && [ -x "/snap/bin/golangci-lint" ]; then BIN="/snap/bin/golangci-lint"; fi; \
14-
if [ -z "$$BIN" ]; then \
15-
if command -v go >/dev/null 2>&1; then \
16-
echo "Installing golangci-lint via 'go install'..."; \
17-
GOPATH_DIR=$$(go env GOPATH); \
18-
BIN="$$GOPATH_DIR/bin/golangci-lint"; \
19-
go install github.com/golangci/golangci-lint/cmd/[email protected]; \
20-
else \
21-
echo "ERROR: golangci-lint not found. Add /snap/bin to PATH or install via 'go install'." >&2; \
22-
echo "Hint: export PATH=\$$PATH:/snap/bin" >&2; \
23-
exit 127; \
24-
fi; \
25-
fi; \
26-
cd src/semantic-router/ && "$$BIN" run ./... --config ../../tools/linter/go/.golangci.yml
11+
@cd src/semantic-router/ && golangci-lint run ./... --config ../../tools/linter/go/.golangci.yml
2712
@echo "✅ src/semantic-router go module lint passed"
2813

2914
# golangci-lint fix for Go modules
3015
# Tips: only fix src/semantic-router and some files may need manual fix.
3116
go-lint-fix:
3217
@$(LOG_TARGET)
3318
@echo "Running golangci-lint fix for src/semantic-router..."
34-
@set -e; \
35-
BIN=$$(command -v golangci-lint || true); \
36-
if [ -z "$$BIN" ] && [ -x "/snap/bin/golangci-lint" ]; then BIN="/snap/bin/golangci-lint"; fi; \
37-
if [ -z "$$BIN" ]; then \
38-
if command -v go >/dev/null 2>&1; then \
39-
echo "Installing golangci-lint via 'go install'..."; \
40-
GOPATH_DIR=$$(go env GOPATH); \
41-
BIN="$$GOPATH_DIR/bin/golangci-lint"; \
42-
go install github.com/golangci/golangci-lint/cmd/[email protected]; \
43-
else \
44-
echo "ERROR: golangci-lint not found. Add /snap/bin to PATH or install via 'go install'." >&2; \
45-
echo "Hint: export PATH=\$$PATH:/snap/bin" >&2; \
46-
exit 127; \
47-
fi; \
48-
fi; \
49-
cd src/semantic-router/ && "$$BIN" run ./... --fix --config ../../tools/linter/go/.golangci.yml
19+
@cd src/semantic-router/ && golangci-lint run ./... --fix --config ../../tools/linter/go/.golangci.yml
5020
@echo "✅ src/semantic-router go module lint fix applied"
5121

5222
# Run go vet for all Go modules

0 commit comments

Comments
 (0)