Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,28 @@ jobs:
test:
strategy:
matrix:
go: ["1.18.x", "1.22.x", "1.23.x"]
go: ["1.18.x", "oldstable", "stable"]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Test
run: go test -v ./...
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: Lint
run: |
docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \
golangci/golangci-lint:v1.62.2 golangci-lint run -v \
-E gofmt \
-E misspell \
-E revive
golangci/golangci-lint:v2.8-alpine golangci-lint run -v
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# if you want to ignore files created by your editor/tools, consider using a
# global .gitignore or .git/info/exclude see https://help.github.com/articles/ignoring-files
.*
!.github
!.gitignore
profile.out
# support running go modules in vendor mode for local development
vendor/
29 changes: 29 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "2"

linters:
enable:
- errorlint
- gosec
- misspell
- revive
- unconvert
- unparam
exclusions:
generated: disable
presets:
- comments
- std-error-handling
settings:
staticcheck:
# Enable all options, with some exceptions.
# For defaults, see https://golangci-lint.run/usage/linters/#staticcheck
checks:
- all
- -QF1008 # Omit embedded fields from selector expression; https://staticcheck.dev/docs/checks/#QF1008
- -ST1003 # Poorly chosen identifier; https://staticcheck.dev/docs/checks/#ST1003

formatters:
enable:
- gofumpt
exclusions:
generated: disable
2 changes: 1 addition & 1 deletion ascii.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ next:
if key == "DEL" {
codes = append(codes, 127)
} else {
return nil, fmt.Errorf("Unknown character: '%s'", key)
return nil, fmt.Errorf("unknown character: '%s'", key)
}
} else {
codes = append(codes, key[0])
Expand Down
Loading