Skip to content

Commit cf91430

Browse files
authored
CI: Update nolintlint config (#991)
* CI: Update nolintlint config `allow-leading-space: false` is not valid config anymore ``` $ golangci-lint config verify jsonschema: "linters-settings.nolintlint" does not validate with "/properties/linters-settings/properties/nolintlint/additionalProperties": additionalProperties 'allow-leading-space' not allowed Failed executing command with error: the configuration contains invalid elements ``` * Allow annotations * enable problem matches * Use setup-go * Update Go version
1 parent e8912f3 commit cf91430

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/ci.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: runTestsAndLinters
22
on: [push, pull_request]
33

4+
permissions:
5+
contents: read
6+
# Write is needed for golangci-lint annotations
7+
checks: write
8+
49
jobs:
510
test:
611
strategy:
712
matrix:
8-
go: [ "1.23", "1.22" ]
13+
go: [ "1.24", "1.23", "1.22" ]
914
os: [ ubuntu-24.04, ubuntu-22.04 ]
1015
name: Tests Go ${{ matrix.go }} on ${{ matrix.os }} # This name is used in main branch protection rules
1116
runs-on: ${{ matrix.os }}
@@ -17,11 +22,11 @@ jobs:
1722
echo -n "mysqldump -V: " ; mysqldump -V
1823
1924
echo -e '[mysqld]\nserver-id=1\nlog-bin=mysql\nbinlog-format=row\ngtid-mode=ON\nenforce_gtid_consistency=ON\n' | sudo tee /etc/mysql/conf.d/replication.cnf
20-
25+
2126
# bind to :: for dual-stack listening
2227
sudo sed -i 's/bind-address.*= 127.0.0.1/bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf
2328
sudo sed -i 's/mysqlx-bind-address.*= 127.0.0.1/mysqlx-bind-address = ::/' /etc/mysql/mysql.conf.d/mysqld.cnf
24-
29+
2530
sudo service mysql start
2631
2732
# apply this for mysql5 & mysql8 compatibility
@@ -78,7 +83,7 @@ jobs:
7883
- name: Install Go
7984
uses: actions/setup-go@v5
8085
with:
81-
go-version: "1.23"
86+
go-version: stable
8287
- name: Run tests
8388
run: |
8489
# separate test to avoid RESET MASTER conflict
@@ -91,6 +96,9 @@ jobs:
9196
runs-on: ubuntu-latest
9297
steps:
9398
- uses: actions/checkout@v4
99+
- uses: actions/setup-go@v5
100+
with:
101+
go-version: stable
94102
- name: golangci-lint
95103
uses: golangci/golangci-lint-action@v6
96104
with:
@@ -113,7 +121,7 @@ jobs:
113121
- name: Install Go
114122
uses: actions/setup-go@v5
115123
with:
116-
go-version: "1.23"
117-
124+
go-version: stable
125+
118126
- name: Build on ${{ matrix.os }}/${{ matrix.arch }}
119127
run: GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build ./...

.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ linters:
2121
linters-settings:
2222
nolintlint:
2323
allow-unused: false
24-
allow-leading-space: false
2524
require-specific: true
2625

2726
govet:

0 commit comments

Comments
 (0)