Skip to content

Commit

Permalink
bump linter to v1.64.6
Browse files Browse the repository at this point in the history
Signed-off-by: Tiger Kaovilai <[email protected]>
  • Loading branch information
kaovilai committed Mar 7, 2025
1 parent c36882c commit c6b28dc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pr-linter-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ jobs:
- name: Linter check
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
version: v1.64.6
args: --verbose
verify: false # don't verify jsonschema
39 changes: 16 additions & 23 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ run:
# exit code when at least one issue was found, default is 1
issues-exit-code: 1


# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
Expand Down Expand Up @@ -46,10 +41,6 @@ output:
# print linter name in the end of issue text, default is true
print-linter-name: true

# make issues output unique by line, default is true
uniq-by-line: true


# all available settings of specific linters
linters-settings:
dogsled:
Expand Down Expand Up @@ -121,9 +112,6 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
godot:
# check all top-level comments, not only declarations
check-all: false
godox:
# report any comments starting with keywords, this is useful for TODO or FIXME comments that
# might be left in the code accidentally and should be resolved before merging
Expand Down Expand Up @@ -160,6 +148,9 @@ linters-settings:
# - github.com/mitchellh/go-homedir: # Blocked module with version constraint
# version: "< 1.1.0" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
# reason: "testing if blocked version constraint works." # Reason why the version constraint exists. (Optional)
gosec:
excludes:
- G115
govet:
# report about shadowed variables
# check-shadowing: true
Expand Down Expand Up @@ -231,7 +222,7 @@ linters-settings:
rules:
- name: unexported-return
disabled: true

rowserrcheck:
packages:
- github.com/jmoiron/sqlx
Expand Down Expand Up @@ -287,21 +278,21 @@ linters:
- asciicheck
- bidichk
- bodyclose
# - copyloopvar
- dogsled
- durationcheck
- dupword
- errcheck
- exportloopref
- errchkjson
- goconst
- gofmt
- goheader
- goimports
- goprintffuncname
- gosec
- gosimple
# - gosimple
- govet
- ginkgolinter
# - ginkgolinter
- importas
- ineffassign
- misspell
Expand All @@ -311,9 +302,9 @@ linters:
- noctx
- nolintlint
- revive
- staticcheck
# - staticcheck
- stylecheck
- testifylint
# - testifylint
- thelper
- typecheck
- unconvert
Expand All @@ -325,6 +316,8 @@ linters:


issues:
exclude-dirs-use-default: true
uniq-by-line: true
exclude-rules:
- linters:
- staticcheck
Expand Down Expand Up @@ -376,22 +369,22 @@ issues:

severity:
# Default value is empty string.
# Set the default severity for issues. If severity rules are defined and the issues
# do not match or no severity is provided to the rule this will be the default
# severity applied. Severities should match the supported severity names of the
# Set the default severity for issues. If severity rules are defined and the issues
# do not match or no severity is provided to the rule this will be the default
# severity applied. Severities should match the supported severity names of the
# selected out format.
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
# - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
default-severity: error

# The default value is false.
# The default value is false.
# If set to true severity-rules regular expressions become case sensitive.
case-sensitive: false

# Default value is empty list.
# When a list of severity rules are provided, severity information will be added to lint
# issues. Severity rules have the same filtering capability as exclude rules except you
# issues. Severity rules have the same filtering capability as exclude rules except you
# are allowed to specify one matcher per severity rule.
# Only affects out formats that support setting severity information.
rules:
Expand Down
4 changes: 2 additions & 2 deletions hack/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ RUN ARCH=$(go env GOARCH) && \
chmod +x /usr/bin/goreleaser

# get golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.6

# install kubectl
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/$(go env GOARCH)/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin

# Fix the "dubious ownership" issue from git when running goreleaser.sh
RUN echo "[safe] \n\t directory = *" > /.gitconfig
RUN echo "[safe] \n\t directory = *" > /.gitconfig
2 changes: 1 addition & 1 deletion test/util/k8s/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func WaitForPods(ctx context.Context, client TestClient, namespace string, pods
}
// If any pod is still waiting we don't need to check any more so return and wait for next poll interval
if checkPod.Status.Phase != corev1.PodRunning {
fmt.Printf("Pod %s is in state %s waiting for it to be %s\n", podName, checkPod.Status.Phase, corev1.PodRunning)
fmt.Printf("Pod %s is in state %s waiting for it to be %s, pod status %+v\n", podName, checkPod.Status.Phase, corev1.PodRunning, checkPod.Status) // TODO: remove after debug?
return false, nil
}
}
Expand Down

0 comments on commit c6b28dc

Please sign in to comment.