Skip to content

Commit a74d047

Browse files
authored
Merge branch 'master' into adddefer
2 parents d7e6791 + 6bc5d1c commit a74d047

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+776
-572
lines changed

.github/workflows/post-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# ex:
1919
# - 1.18beta1 -> 1.18.0-beta.1
2020
# - 1.18rc1 -> 1.18.0-rc.1
21-
go-version: 1.19
21+
go-version: '1.20'
2222

2323
- name: Update GitHub action config
2424
run: make assets/github-action-config.json

.github/workflows/pr-extra.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# ex:
1818
# - 1.18beta1 -> 1.18.0-beta.1
1919
# - 1.18rc1 -> 1.18.0-rc.1
20-
go-version: 1.19
20+
go-version: '1.20'
2121
- name: Run go list
2222
run: go list -json -m all > go.list
2323
- name: Nancy

.github/workflows/pr.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77

88
env:
9-
GO_VERSION: 1.19
9+
GO_VERSION: '1.20'
1010

1111
jobs:
1212
# Check if there is any dirty change for go mod tidy
@@ -43,7 +43,7 @@ jobs:
4343
# - 1.18rc1 -> 1.18.0-rc.1
4444
go-version: ${{ env.GO_VERSION }}
4545
- name: lint
46-
uses: golangci/golangci-lint-action@v3.3.1
46+
uses: golangci/golangci-lint-action@v3.4.0
4747
with:
4848
version: latest
4949
# skip cache because of flaky behaviors
@@ -88,8 +88,8 @@ jobs:
8888
strategy:
8989
matrix:
9090
golang:
91-
- 1.18
9291
- 1.19
92+
- '1.20'
9393
steps:
9494
- uses: actions/checkout@v3
9595
- name: Install Go

.github/workflows/tag.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# ex:
1919
# - 1.18beta1 -> 1.18.0-beta.1
2020
# - 1.18rc1 -> 1.18.0-rc.1
21-
go-version: 1.19
21+
go-version: '1.20'
2222
- name: Unshallow
2323
run: git fetch --prune --unshallow
2424

@@ -48,7 +48,7 @@ jobs:
4848
# ex:
4949
# - 1.18beta1 -> 1.18.0-beta.1
5050
# - 1.18rc1 -> 1.18.0-rc.1
51-
go-version: 1.19
51+
go-version: '1.20'
5252

5353
- name: Unshallow
5454
run: git fetch --prune --unshallow
@@ -60,18 +60,18 @@ jobs:
6060
MAJOR=${TAG%.*}
6161
SHORT_COMMIT=${GITHUB_SHA::8}
6262
DATE=$(date '+%Y-%m-%dT%H:%M:%SZ')
63-
echo ::set-output name=tag_name::${TAG}
64-
echo ::set-output name=major_tag::${MAJOR}
65-
echo ::set-output name=short_commit::${SHORT_COMMIT}
66-
echo ::set-output name=date::${DATE}
63+
echo tag_name=${TAG} >> $GITHUB_OUTPUT
64+
echo major_tag=${MAJOR} >> $GITHUB_OUTPUT
65+
echo short_commit=${SHORT_COMMIT} >> $GITHUB_OUTPUT
66+
echo date=${DATE} >> $GITHUB_OUTPUT
6767
if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then
68-
echo ::set-output name=full_tag_name::${TAG}-alpine
69-
echo ::set-output name=full_major_tag::${MAJOR}-alpine
70-
echo ::set-output name=latest_tag::latest-alpine
68+
echo full_tag_name=${TAG}-alpine >> $GITHUB_OUTPUT
69+
echo full_major_tag=${MAJOR}-alpine >> $GITHUB_OUTPUT
70+
echo latest_tag=latest-alpine >> $GITHUB_OUTPUT
7171
else
72-
echo ::set-output name=full_tag_name::${TAG}
73-
echo ::set-output name=full_major_tag::${MAJOR}
74-
echo ::set-output name=latest_tag::latest
72+
echo full_tag_name=${TAG} >> $GITHUB_OUTPUT
73+
echo full_major_tag=${MAJOR} >> $GITHUB_OUTPUT
74+
echo latest_tag=latest >> $GITHUB_OUTPUT
7575
fi
7676
7777
- name: Set up QEMU
@@ -84,7 +84,7 @@ jobs:
8484
run: docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
8585

8686
- name: Build and publish ${{ matrix.target.Dockerfile }}
87-
uses: docker/build-push-action@v3
87+
uses: docker/build-push-action@v4
8888
with:
8989
context: .
9090
file: ${{ matrix.target.Dockerfile }}

.golangci.reference.yml

+22-15
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ output:
8080
# Multiple can be specified by separating them by comma, output can be provided
8181
# for each of them by separating format name and path by colon symbol.
8282
# Output path can be either `stdout`, `stderr` or path to the file to write to.
83-
# Example: "checkstyle:report.json,colored-line-number"
83+
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
8484
#
8585
# Default: colored-line-number
8686
format: json
@@ -1394,6 +1394,13 @@ linters-settings:
13941394
severity: warning
13951395
disabled: false
13961396
arguments: [ 7 ]
1397+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comment-spacings
1398+
- name: comment-spacings
1399+
severity: warning
1400+
disabled: false
1401+
arguments:
1402+
- mypragma
1403+
- otherpragma
13971404
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
13981405
- name: confusing-naming
13991406
severity: warning
@@ -1800,7 +1807,7 @@ linters-settings:
18001807
# Suggest the use of rpc.DefaultXXPath.
18011808
# Default: false
18021809
default-rpc-path: true
1803-
# Suggest the use of os.DevNull.
1810+
# DEPRECATED Suggest the use of os.DevNull.
18041811
# Default: false
18051812
os-dev-null: true
18061813
# Suggest the use of sql.LevelXX.String().
@@ -1812,7 +1819,7 @@ linters-settings:
18121819
# Suggest the use of constant.Kind.String().
18131820
# Default: false
18141821
constant-kind: true
1815-
# Suggest the use of syslog.Priority.
1822+
# DEPRECATED Suggest the use of syslog.Priority.
18161823
# Default: false
18171824
syslog-priority: true
18181825

@@ -1924,48 +1931,48 @@ linters-settings:
19241931
# this is set to true - the append call must append either a variable
19251932
# assigned, called or used on the line above.
19261933
strict-append: true
1927-
1934+
19281935
# Allows assignments to be cuddled with variables used in calls on
19291936
# line above and calls to be cuddled with assignments of variables
19301937
# used in call on line above.
19311938
allow-assign-and-call: true
1932-
1939+
19331940
# Allows assignments to be cuddled with anything.
19341941
allow-assign-and-anything: false
1935-
1942+
19361943
# Allows cuddling to assignments even if they span over multiple lines.
19371944
allow-multiline-assign: true
1938-
1945+
19391946
# If the number of lines in a case block is equal to or lager than this
19401947
# number, the case *must* end white a newline.
19411948
force-case-trailing-whitespace: 0
1942-
1949+
19431950
# Allow blocks to end with comments.
19441951
allow-trailing-comment: false
1945-
1952+
19461953
# Allow multiple comments in the beginning of a block separated with newline.
19471954
allow-separated-leading-comment: false
1948-
1955+
19491956
# Allow multiple var/declaration statements to be cuddled.
19501957
allow-cuddle-declarations: false
1951-
1958+
19521959
# A list of call idents that everything can be cuddled with.
19531960
# Defaults to calls looking like locks.
19541961
allow-cuddle-with-calls: [ "Lock", "RLock" ]
1955-
1962+
19561963
# AllowCuddleWithRHS is a list of right hand side variables that is allowed
19571964
# to be cuddled with anything. Defaults to assignments or calls looking
19581965
# like unlocks.
19591966
allow-cuddle-with-rhs: [ "Unlock", "RUnlock" ]
1960-
1967+
19611968
# Causes an error when an If statement that checks an error variable doesn't
19621969
# cuddle with the assignment of that variable.
19631970
force-err-cuddling: false
1964-
1971+
19651972
# When force-err-cuddling is enabled this is a list of names
19661973
# used for error variables to check for in the conditional.
19671974
error-variable-names: [ "err" ]
1968-
1975+
19691976
# Causes an error if a short declaration (:=) cuddles with anything other than
19701977
# another short declaration.
19711978
# This logic overrides force-err-cuddling among others.

.golangci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ issues:
135135
text: "SA1019: settings.GoVersion is deprecated: use the global `run.go` instead."
136136
- path: pkg/lint/lintersdb/manager.go
137137
text: "SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead."
138+
- path: pkg/golinters/unused.go
139+
text: "rangeValCopy: each iteration copies 160 bytes \\(consider pointers or indexing\\)"
138140

139141
run:
140142
timeout: 5m

.goreleaser.yml

+4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ changelog:
7373
- Merge pull request
7474
- Merge branch
7575

76+
source:
77+
enabled: true
78+
name_template: '{{ .ProjectName }}-{{ .Version }}-source'
79+
7680
brews:
7781
- tap:
7882
owner: golangci

CHANGELOG.md

+78
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,84 @@
11
Follow the news and releases on our [twitter](https://twitter.com/golangci) and our [blog](https://medium.com/golangci).
22
There is the most valuable changes log:
33

4+
### v1.51.2
5+
6+
1. updated linters
7+
* `forbidigo`: from 1.3.0 to 1.4.0
8+
* `gci`: from 0.9.0 to 0.9.1
9+
* `go-critic`: from 0.6.5 to 0.6.7
10+
* `go-errorlint`: from 1.0.6 to 1.1.0
11+
* `gosec`: from 2.14.0 to 2.15.0
12+
* `musttag`: from 0.4.4 to 0.4.5
13+
* `staticcheck`: from 0.4.0 to 0.4.2
14+
* `tools`: from 0.5.0 to 0.6.0
15+
* `usestdlibvars`: from 1.21.1 to 1.23.0
16+
* `wsl`: from 3.3.0 to 3.4.0
17+
* `govet`: enable `timeformat` by default
18+
2. misc.
19+
* fix: cache status size calculation
20+
* add new source archive
21+
3. Documentation
22+
* Improve installation section
23+
* Replace links to godoc.org with pkg.go.dev
24+
25+
### v1.51.1
26+
27+
1. updated linters
28+
* `ginkgolinter`: from 0.7.1 to 0.8.1
29+
* `ineffassign`: bump to HEAD
30+
* `musttag`: from 0.4.3 to 0.4.4
31+
* `sqlclosecheck`: from 0.3.0 to 0.4.0
32+
* `staticcheck`: bump to v0.4.0
33+
* `wastedassign`: from 2.0.6 to 2.0.7
34+
* `wrapcheck`: from 2.7.0 to 2.8.0
35+
36+
### v1.51.0
37+
38+
1. new linters
39+
* `ginkgolinter`: https://github.com/nunnatsa/ginkgolinter
40+
* `musttag`: https://github.com/junk1tm/musttag
41+
* `gocheckcompilerdirectives`: https://github.com/leighmcculloch/gocheckcompilerdirectives
42+
2. updated linters
43+
* `bodyclose`: to HEAD
44+
* `dupword`: from 0.0.7 to 0.0.9
45+
* `errcheck`: from 1.6.2 to 1.6.3
46+
* `exhaustive`: from 0.8.3 to 0.9.5
47+
* `exportloopref`: from 0.1.8 to 0.1.11
48+
* `gci`: from 0.8.1 to 0.9.0
49+
* `ginkgolinter`: from 0.6.0 to 0.7.1
50+
* `go-errorlint`: from 1.0.5 to 1.0.6
51+
* `go-ruleguard`: from 0.3.21 to 0.3.22
52+
* `gocheckcompilerdirectives`: from 1.1.0 to 1.2.1
53+
* `gochecknoglobals`: from 0.1.0 to 0.2.1
54+
* `gomodguard`: from 1.2.4 to 1.3.0
55+
* `gosec`: from 2.13.1 to 2.14.0
56+
* `govet`: Add `timeformat` to analysers
57+
* `grouper`: from 1.1.0 to 1.1.1
58+
* `musttag`: from 0.4.1 to 0.4.3
59+
* `revive`: from 1.2.4 to 1.2.5
60+
* `tagliatelle`: from 0.3.1 to 0.4.0
61+
* `tenv`: from 1.7.0 to 1.7.1
62+
* `unparam`: bump to HEAD
63+
* `usestdlibvars`: from 1.20.0 to 1.21.1
64+
* `wsl`: fix `force-err-cuddling` flag
65+
3. misc.
66+
* go1.20 support
67+
* remove deprecated linters from presets
68+
* Build NetBSD binaries
69+
* Build loong64 binaries
70+
4. Documentation
71+
* `goimport`: improve documentation for local-prefixes
72+
* `gomnd`: add missing always ignored functions
73+
* `nolint`: fix typo
74+
* `tagliatelle` usage typo
75+
* add note about binary requirement for plugin
76+
* cache preserving and colored output on docker runs
77+
* improve documentation about debugging.
78+
* improve Editor Integration section
79+
* More specific default cache directory
80+
* update output example to use valid checkstyle example; add json example
81+
482
### v1.50.1
583

684
1. updated linters

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at idenx@yandex.com. All
58+
reported by contacting the project team at info@golangci.com. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

0 commit comments

Comments
 (0)