Skip to content

Commit f1c8fcd

Browse files
committed
add formatter configuration in golangci-lint
1 parent 25cba15 commit f1c8fcd

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See for configurations: https://golangci-lint.run/usage/configuration/
2+
version: 2
3+
4+
# See: https://golangci-lint.run/usage/formatters/
5+
formatters:
6+
default: none
7+
enable:
8+
- gofmt # https://pkg.go.dev/cmd/gofmt
9+
- gofumpt # https://github.com/mvdan/gofumpt
10+
11+
settings:
12+
gofmt:
13+
simplify: true # Simplify code: gofmt with `-s` option.
14+
15+
gofumpt:
16+
# Module path which contains the source code being formatted.
17+
# Default: ""
18+
module-path: github.com/jackc/pgx/v5 # Should match with module in go.mod
19+
# Choose whether to use the extra rules.
20+
# Default: false
21+
extra-rules: true

0 commit comments

Comments
 (0)