Skip to content

Commit

Permalink
chore: rollback to go1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
hedon954 committed Aug 22, 2024
1 parent b9cd37a commit c710e60
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
version: v1.59
- name: Cache Go modules
uses: actions/cache@v4
with:
Expand Down
29 changes: 29 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ linters-settings:
line-length: 140
misspell:
locale: US
mnd:
checks: # "argument", "case", "condition", "operation", "return", "assign"
- case
- return
- assign
- condition
- operation
stylecheck:
checks:
- ST1000
- ST1001
- ST1002
# 不要启用 ST1003
- ST1004
- ST1005
- ST1006
Expand Down Expand Up @@ -65,6 +73,7 @@ linters:
- gocyclo
- gofmt
- goimports
- mnd
- goprintffuncname
- gosec
- gosimple
Expand All @@ -82,3 +91,23 @@ linters:
- unparam
- unused
- whitespace

# don't enable:
# - gochecknoglobals
# - gocognit
# - godox
# - maligned
# - prealloc

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
linters:
- gomnd
- funlen
exclude-dirs:
- vendor
new: true
new-from-rev: "HEAD~1"
whole-files: false
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ repos:
files: \.go$
- id: check-yaml # fix yaml format file.
- id: check-added-large-files # let you know which file has large file size.
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-mod-tidy # run go mod tidy -v.
- repo: local
hooks:
- id: golangci-lint
name: golangci-lint
description: run golangci-lint
entry: golangci-lint run -v
entry: golangci-lint run -v ./...
language: golang
files: \.*$
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hedon954/gmm

go 1.20
go 1.22

require (
github.com/dolthub/go-mysql-server v0.18.1
Expand Down

0 comments on commit c710e60

Please sign in to comment.