Skip to content

Commit 347dc18

Browse files
committed
Fix lint-timezone find pattern to match cmd/main.go
The glob pattern '*/cmd/*/main.go' requires a subdirectory between cmd/ and main.go, so it never matches ./cmd/main.go (the actual entrypoint). Changed to '*/cmd/*' which, combined with -name main.go, correctly matches main.go at any depth under cmd/.
1 parent 0a1e795 commit 347dc18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ lint: bin/golangci-lint lint-timezone
3737
# time.Now() always returns UTC.
3838
lint-timezone:
3939
@fail=0; \
40-
for f in $$(find . -name main.go -path '*/cmd/*/main.go'); do \
40+
for f in $$(find . -name main.go -path '*/cmd/*'); do \
4141
if ! grep -q 'time\.Local = time\.UTC' "$$f"; then \
4242
echo "ERROR: $$f missing 'time.Local = time.UTC' in init()"; \
4343
fail=1; \

0 commit comments

Comments
 (0)