Skip to content

Commit

Permalink
Update to go 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-carlton committed Sep 13, 2024
1 parent e433903 commit 7144d62
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [[ "$OSTYPE" == "darwin"* ]]; then
export realpath="grealpath"
else
export realpath="realpath"
fi
17 changes: 9 additions & 8 deletions golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# options for analysis running
run:
go: "1.21"
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 1m

Expand All @@ -20,7 +21,7 @@ run:
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
exclude-dirs:
- vendor$
- cache$
- build$
Expand All @@ -47,7 +48,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: false
Expand Down Expand Up @@ -77,7 +78,7 @@ linters-settings:
#exclude: /path/to/file.txt
govet:
# report about shadowed variables
check-shadowing: true
shadow: true

# settings per analyzer
settings:
Expand Down Expand Up @@ -185,20 +186,20 @@ linters:
- exportloopref
- funlen
- gochecknoglobals
- gochecknoinits
#- gci
# - gochecknoinits
# - gci
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- err113
- gofmt
- goheader
- goimports
- revive
- gomnd
- mnd
- gomodguard
- goprintffuncname
- gosec
Expand All @@ -225,7 +226,7 @@ linters:
- unparam
- whitespace
- wsl
#disable:
disable:
# - gochecknoglobals
# - gochecknoinits

Expand Down
2 changes: 1 addition & 1 deletion makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ${LINT_ARTIFACT}: ${MAKEFILE_PATH}/golangci-lint.yml ${GO_SOURCES}
golangci-lint run \
--config ${MAKEFILE_PATH}/golangci-lint.yml \
--concurrency=$${procs} \
--path-prefix "$$(realpath --relative-to ${MAKEFILE_PATH} ${CURDIR})/." \
--path-prefix "$$($$realpath --relative-to ${MAKEFILE_PATH} ${CURDIR})/." \
.) && \
touch $@ && \
cd ${MAKEFILE_PATH}
Expand Down
1 change: 0 additions & 1 deletion pkg/mocks/kubectl/mockExecProvider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/mocks/kubectl/mockKubectl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/mocks/logr/mockLogger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7144d62

Please sign in to comment.