Skip to content

Commit 42bd4f6

Browse files
authored
use golangci replace reviewdog (#7426)
* use golangci replace reviewdog * Update golangci config
1 parent a9d2729 commit 42bd4f6

File tree

4 files changed

+33
-31
lines changed

4 files changed

+33
-31
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
jobs:
14+
golangci:
15+
name: lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: stable
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@v7
24+
with:
25+
version: v2.0

.github/workflows/reviewdog.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.golangci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
version: "2"
2+
13
linters:
4+
default: standard
25
enable:
36
- cyclop
4-
- exportloopref
57
- gocritic
68
- gosec
79
- ineffassign
810
- misspell
911
- prealloc
1012
- unconvert
1113
- unparam
12-
- goimports
1314
- whitespace
1415

15-
linters-settings:
16-
whitespace:
17-
multi-func: true
18-
goimports:
19-
local-prefixes: gorm.io/gorm
20-
16+
formatters:
17+
enable:
18+
- gofumpt
19+
- goimports

schema/index.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func parseFieldIndexes(field *Field) (indexes []Index, err error) {
122122
if composite, found := settings[key]; found {
123123
if len(composite) == 0 || composite == key {
124124
err = fmt.Errorf(
125-
"The composite tag of %s.%s cannot be empty",
125+
"the composite tag of %s.%s cannot be empty",
126126
field.Schema.Name,
127127
field.Name)
128128
return

0 commit comments

Comments
 (0)