This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks-controller.git
The following commit(s) were added to refs/heads/unstable by this push:
new 46acfff ci: bump golangci-lint v1.63.4 (#244)
46acfff is described below
commit 46acfff9c8240d07cff1b5d9d6827a2a7ce8498c
Author: Aleks Lozovyuk <[email protected]>
AuthorDate: Mon Jan 6 03:46:04 2025 +0200
ci: bump golangci-lint v1.63.4 (#244)
---
.github/workflows/ci.yaml | 2 +-
.golangci.yml | 35 +++++++++++------------------------
2 files changed, 12 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 5845856..984c3c7 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -50,7 +50,7 @@ jobs:
run: |
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
- curl -sSfL
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh
-s -- -b $(go env GOPATH)/bin v1.62.0
+ curl -sSfL
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh
-s -- -b $(go env GOPATH)/bin v1.63.4
make lint
build-test:
diff --git a/.golangci.yml b/.golangci.yml
index e44b676..1c29278 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -42,10 +42,6 @@ run:
# from this option's value (see skip-dirs-use-default).
skip-dirs:
- # default is true. Enables skipping of directories:
- # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
- skip-dirs-use-default: true
-
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
@@ -56,7 +52,7 @@ run:
output:
#
colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
# 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: true
@@ -64,9 +60,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
-
# add a prefix to the output file references; default is no prefix
path-prefix: ""
@@ -289,15 +282,10 @@ linters-settings:
truncate: "32"
gosimple:
- # Select the Go version to target. The default is '1.13'.
- go: "1.19"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
govet:
- # report about shadowed variables
- check-shadowing: false
-
# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
@@ -344,10 +332,6 @@ linters-settings:
# Allow only slices initialized with a length of zero. Default is false.
always: false
- maligned:
- # print struct with more effective memory layout or not, false by default
- suggest-new: true
-
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
@@ -434,14 +418,10 @@ linters-settings:
severity: warning
staticcheck:
- # Select the Go version to target. The default is '1.13'.
- go: "1.19"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
stylecheck:
- # Select the Go version to target. The default is '1.13'.
- go: "1.19"
# https://staticcheck.io/docs/options#checks
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021",
"-ST1022" ]
# https://staticcheck.io/docs/options#dot_import_whitelist
@@ -504,15 +484,15 @@ linters:
- govet
- gofmt
- goimports
+ - gosimple
+ - staticcheck
+ - unused
- lll
- - megacheck
- misspell
- nilnil
- revive
disable:
- - maligned
- prealloc
- - scopelint
disable-all: false
presets:
- bugs
@@ -573,6 +553,13 @@ issues:
# The default value is false. If set to true exclude and exclude-rules
# regular expressions become case sensitive.
exclude-case-sensitive: false
+
+ # default is true. Enables skipping of directories:
+ # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
+ exclude-dirs-use-default: true
+
+ # make issues output unique by line, default is true
+ uniq-by-line: true
# The list of ids of default excludes to include or disable. By default it's
empty.
include: