Skip to content

Commit cd289ea

Browse files
authored
Merge pull request #57 from troyhantech/ht/dev
chore: 修改 github action
2 parents 52b3c86 + a57e8e3 commit cd289ea

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

.github/workflows/go.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
uses: golangci/golangci-lint-action@v3.1.0
1818
with:
1919
working-directory: .
20-
# Pin golangci-lint to a pre-1.49 version to avoid deprecated/removed linters in current .golangci.yml
21-
version: v1.48.0
22-
# Avoid deprecated output format warning
23-
args: --out-format=colored-line-number
24-
20+
# Use latest version to fix go-critic panic in v1.48.0
21+
version: latest
22+
2523
skip-build-cache: true
2624
skip-pkg-cache: true
2725

.golangci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
linters:
22
disable-all: true
33
enable:
4-
- deadcode # Finds unused code
54
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
65
- gosimple # Linter for Go source code that specializes in simplifying a code
76
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
87
- ineffassign # Detects when assignments to existing variables are not used
98
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
10-
- structcheck # Finds unused struct fields
119
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
1210
- unused # Checks Go code for unused constants, variables, functions and types
13-
- varcheck # Finds unused global variables and constants
1411

1512
# 比较常用的可选项
1613
- gofmt # Gofmt checks whether code was gofmt-ed.
@@ -20,7 +17,7 @@ linters:
2017

2118
linters-settings:
2219
govet:
23-
check-shadowing: true
20+
# Removed deprecated check-shadowing option, use shadow linter instead
2421
check-unreachable: true
2522
check-rangeloops: true
2623
check-copylocks: true

0 commit comments

Comments
 (0)