Skip to content

Commit c99aa98

Browse files
authored
Merge pull request #52 from thaJeztah/update_gha
update actions, golangci-lint, and test against go1.18, oldstable, and stable
2 parents c658a26 + 48deb7e commit c99aa98

File tree

4 files changed

+35
-12
lines changed

4 files changed

+35
-12
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,28 @@ jobs:
1919
test:
2020
strategy:
2121
matrix:
22-
go: ["1.18.x", "1.22.x", "1.23.x"]
22+
go: ["1.18.x", "oldstable", "stable"]
2323
platform: [ubuntu-latest, windows-latest, macos-latest]
2424
runs-on: ${{ matrix.platform }}
2525
steps:
2626
- name: Install Go ${{ matrix.go }}
27-
uses: actions/setup-go@v5
27+
uses: actions/setup-go@v6
2828
with:
2929
go-version: ${{ matrix.go }}
3030
- name: Checkout code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3232
- name: Test
3333
run: go test -v ./...
3434
lint:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Checkout code
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939
- name: go mod tidy
4040
run: |
4141
go mod tidy
4242
git diff --exit-code
4343
- name: Lint
4444
run: |
4545
docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \
46-
golangci/golangci-lint:v1.62.2 golangci-lint run -v \
47-
-E gofmt \
48-
-E misspell \
49-
-E revive
46+
golangci/golangci-lint:v2.8-alpine golangci-lint run -v

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# if you want to ignore files created by your editor/tools, consider using a
22
# global .gitignore or .git/info/exclude see https://help.github.com/articles/ignoring-files
3-
.*
4-
!.github
5-
!.gitignore
63
profile.out
74
# support running go modules in vendor mode for local development
85
vendor/

.golangci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "2"
2+
3+
linters:
4+
enable:
5+
- errorlint
6+
- gosec
7+
- misspell
8+
- revive
9+
- unconvert
10+
- unparam
11+
exclusions:
12+
generated: disable
13+
presets:
14+
- comments
15+
- std-error-handling
16+
settings:
17+
staticcheck:
18+
# Enable all options, with some exceptions.
19+
# For defaults, see https://golangci-lint.run/usage/linters/#staticcheck
20+
checks:
21+
- all
22+
- -QF1008 # Omit embedded fields from selector expression; https://staticcheck.dev/docs/checks/#QF1008
23+
- -ST1003 # Poorly chosen identifier; https://staticcheck.dev/docs/checks/#ST1003
24+
25+
formatters:
26+
enable:
27+
- gofumpt
28+
exclusions:
29+
generated: disable

ascii.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ next:
5656
if key == "DEL" {
5757
codes = append(codes, 127)
5858
} else {
59-
return nil, fmt.Errorf("Unknown character: '%s'", key)
59+
return nil, fmt.Errorf("unknown character: '%s'", key)
6060
}
6161
} else {
6262
codes = append(codes, key[0])

0 commit comments

Comments
 (0)