Skip to content

Commit 0e53da9

Browse files
committed
Add minimal linter config to enforce gofumpt
1 parent d2ed205 commit 0e53da9

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

.github/workflows/lint.yaml

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+
pull_request:
4+
permissions:
5+
contents: read
6+
jobs:
7+
golangci:
8+
name: lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- uses: actions/setup-go@v3
14+
with:
15+
go-version: "1.18.10"
16+
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v3
19+
with:
20+
version: v1.53.3
21+
only-new-issues: true
22+
23+
- name: Check go.mod
24+
run: |
25+
go mod tidy && git diff --exit-code

.golangci.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[run]
2+
timeout = "1m"
3+
4+
[output]
5+
format = "colored-line-number"
6+
7+
[linters]
8+
disable-all = true
9+
enable = [
10+
"gofumpt",
11+
]
12+
13+
[issues]
14+
exclude-use-default = false

circle.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ jobs:
7272
executor: gopherjs
7373
steps:
7474
- setup_and_install_gopherjs
75-
- run:
76-
name: Check gofmt
77-
command: diff -u <(echo -n) <(gofmt -d .)
7875
- run:
7976
name: Check go vet
8077
command: |

0 commit comments

Comments
 (0)