Skip to content

Commit

Permalink
Makefile: add support for golang 1.18
Browse files Browse the repository at this point in the history
Fix a typo that caused the golang 1.18 bad linting workaround not to
work.
Even if linting is partially disabled, add 1.18 to the CI.

Signed-off-by: Adrian Moreno <[email protected]>
  • Loading branch information
amorenoz committed Jun 13, 2022
1 parent ddba882 commit 9530b6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17']
go: ['1.17', '1.18']

steps:
- name: install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17']
go: ['1.17', '1.18']

steps:
- name: install make
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ validate_go:
lint: $(GOLANGCI_LINT) ## Lint the code
@go mod vendor
@current_ver=$$(go version | { read _ _ v _; echo $${v#go}; }); \
if [[ "$$current_ver" == *"1.18."* ]]; then echo "Linting is not fully supported for golang 1.18. Consider using golang 1.17";\
if [[ "$$current_ver" == *"1.18"* ]]; then echo "Linting is not fully supported for golang 1.18. Consider using golang 1.17";\
$(GOLANGCI_LINT) run --disable-all --enable goimports --enable gofmt --enable ineffassign --timeout 5m; else \
$(GOLANGCI_LINT) run --enable goimports --timeout 5m; \
fi
Expand Down

0 comments on commit 9530b6b

Please sign in to comment.