Skip to content

Commit a44cde4

Browse files
committed
Merge branch 'main' into docs/upgrade-v1-to-v2
2 parents e280408 + c2a68c4 commit a44cde4

File tree

998 files changed

+22042
-8703
lines changed

Some content is hidden

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

998 files changed

+22042
-8703
lines changed

.custom-gcl.reference.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The golangci-lint version used to build the custom binary.
2-
# Require.
3-
version: v1.56.2
2+
# Required.
3+
version: v2.0.0
44

55
# The name of the custom binary.
66
# Optional.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,32 @@ body:
1818
- label: I agree to follow this project's [Code of Conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file)
1919
required: true
2020

21+
- type: dropdown
22+
id: install
23+
attributes:
24+
label: How did you install golangci-lint?
25+
options:
26+
- I don't know
27+
- Official GitHub Action
28+
- Official binary
29+
- Brew
30+
- MacPorts
31+
- Chocolatey
32+
- Scoop
33+
- Docker
34+
- go install
35+
- Tools pattern
36+
- go tool
37+
- AUR
38+
- Nix
39+
- Deb
40+
- RPM
41+
- Other Linux package manager
42+
- Via editor/IDE
43+
- Other
44+
validations:
45+
required: true
46+
2147
- type: textarea
2248
id: problem
2349
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,32 @@ body:
1313
- label: I agree to follow this project's [Code of Conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file)
1414
required: true
1515

16+
- type: dropdown
17+
id: install
18+
attributes:
19+
label: How did you install golangci-lint?
20+
options:
21+
- I don't know
22+
- Official GitHub Action
23+
- Official binary
24+
- Brew
25+
- MacPorts
26+
- Chocolatey
27+
- Scoop
28+
- Docker
29+
- go install
30+
- Tools pattern
31+
- go tool
32+
- AUR
33+
- Nix
34+
- Deb
35+
- RPM
36+
- Other Linux package manager
37+
- Via editor/IDE
38+
- Other
39+
validations:
40+
required: true
41+
1642
- type: textarea
1743
id: problem
1844
attributes:

.github/workflows/documentation.yml renamed to .github/workflows/deploy-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Documentation
1+
name: Deploy Documentation
22

33
on:
44
push:
Lines changed: 15 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Checks
22
on:
33
push:
44
branches:
@@ -28,68 +28,8 @@ jobs:
2828
git diff --exit-code go.mod
2929
git diff --exit-code go.sum
3030
31-
# We already run the current golangci-lint in tests, but here we test
32-
# our GitHub action with the latest stable golangci-lint.
33-
golangci-lint:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v4
37-
- uses: actions/setup-go@v5
38-
with:
39-
# https://github.com/actions/setup-go#supported-version-syntax
40-
# ex:
41-
# - 1.18beta1 -> 1.18.0-beta.1
42-
# - 1.18rc1 -> 1.18.0-rc.1
43-
go-version: ${{ env.GO_VERSION }}
44-
# TODO(ldez): must add uncommented when [email protected] (with golangci-lint v2 support) will be created.
45-
# - name: lint
46-
# uses: golangci/[email protected]
47-
# with:
48-
# version: latest
49-
50-
tests-on-windows:
51-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
52-
runs-on: windows-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
- uses: actions/setup-go@v5
56-
with:
57-
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
58-
- name: Run tests
59-
run: make.exe test
60-
61-
tests-on-macos:
62-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
63-
runs-on: macos-latest
64-
steps:
65-
- uses: actions/checkout@v4
66-
- uses: actions/setup-go@v5
67-
with:
68-
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
69-
- name: Run tests
70-
run: make test
71-
72-
tests-on-unix:
73-
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
74-
strategy:
75-
matrix:
76-
os:
77-
- ubuntu-latest
78-
- ubuntu-24.04-arm
79-
golang:
80-
- '1.23'
81-
- '1.24'
82-
runs-on: ${{ matrix.os }}
83-
steps:
84-
- uses: actions/checkout@v4
85-
- uses: actions/setup-go@v5
86-
with:
87-
go-version: ${{ matrix.golang }}
88-
- name: Run tests
89-
run: make test
90-
9131
# Checks: GitHub action assets
92-
check_generated:
32+
check-generated:
9333
runs-on: ubuntu-latest
9434
steps:
9535
- uses: actions/checkout@v4
@@ -115,9 +55,8 @@ jobs:
11555
- name: Check installation script
11656
run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint"
11757

118-
# Note: the command `run` is tested by the previous steps (`make test`).
119-
commands:
120-
needs: golangci-lint
58+
# Note: the command `run` is tested by the other workflows (`make test`).
59+
check-commands:
12160
runs-on: ubuntu-latest
12261
steps:
12362
- uses: actions/checkout@v4
@@ -148,10 +87,21 @@ jobs:
14887

14988
- run: ./golangci-lint config
15089
- run: ./golangci-lint config path
90+
- run: ./golangci-lint config path --json
15191
# TODO(ldez) after v2: golangci.next.jsonschema.json -> golangci.jsonschema.json
15292
- run: ./golangci-lint config verify --schema jsonschema/golangci.next.jsonschema.json
15393

15494
- run: ./golangci-lint help
15595
- run: ./golangci-lint help linters
96+
- run: ./golangci-lint help linters --json
97+
- run: ./golangci-lint help formatters
98+
- run: ./golangci-lint help formatters --json
15699
- run: ./golangci-lint linters
100+
- run: ./golangci-lint linters --json
101+
- run: ./golangci-lint formatters
102+
- run: ./golangci-lint formatters --json
157103
- run: ./golangci-lint version
104+
- run: ./golangci-lint version --short
105+
- run: ./golangci-lint version --debug
106+
- run: ./golangci-lint version --json
107+
- run: ./golangci-lint version --json --debug

.github/workflows/pr-tests.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
pull_request:
8+
9+
env:
10+
# https://github.com/actions/setup-go#supported-version-syntax
11+
# ex:
12+
# - 1.18beta1 -> 1.18.0-beta.1
13+
# - 1.18rc1 -> 1.18.0-rc.1
14+
GO_VERSION: '1.24'
15+
16+
jobs:
17+
# Check if there is any dirty change for go mod tidy
18+
go-mod:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version: ${{ env.GO_VERSION }}
25+
- name: Check go mod
26+
run: |
27+
go mod tidy
28+
git diff --exit-code go.mod
29+
git diff --exit-code go.sum
30+
31+
# We already run the current golangci-lint in tests, but here we test
32+
# our GitHub action with the latest stable golangci-lint.
33+
golangci-lint:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-go@v5
38+
with:
39+
# https://github.com/actions/setup-go#supported-version-syntax
40+
# ex:
41+
# - 1.18beta1 -> 1.18.0-beta.1
42+
# - 1.18rc1 -> 1.18.0-rc.1
43+
go-version: ${{ env.GO_VERSION }}
44+
# TODO(ldez): must add uncommented when [email protected] (with golangci-lint v2 support) will be created.
45+
# - name: lint
46+
# uses: golangci/[email protected]
47+
# with:
48+
# version: latest
49+
50+
tests-on-windows:
51+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
52+
runs-on: windows-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: actions/setup-go@v5
56+
with:
57+
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
58+
- name: Run tests
59+
run: make.exe test
60+
61+
tests-on-macos:
62+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
63+
runs-on: macos-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-go@v5
67+
with:
68+
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
69+
- name: Run tests
70+
run: make test
71+
72+
tests-on-unix:
73+
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
74+
strategy:
75+
matrix:
76+
os:
77+
- ubuntu-latest
78+
- ubuntu-24.04-arm
79+
golang:
80+
- '1.23'
81+
- '1.24'
82+
runs-on: ${{ matrix.os }}
83+
steps:
84+
- uses: actions/checkout@v4
85+
- uses: actions/setup-go@v5
86+
with:
87+
go-version: ${{ matrix.golang }}
88+
- name: Run tests
89+
run: make test
File renamed without changes.

0 commit comments

Comments
 (0)