From 8cc81732366aa78eaa0ea8a89e28c8079ecf8405 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 3 Dec 2024 15:46:19 +0100 Subject: [PATCH] add gofmt --- .golangci.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.golangci.yaml b/.golangci.yaml index bc91ef33c..623f2f2f3 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -11,6 +11,20 @@ linters: - ineffassign - staticcheck - unused + - gofmt +linters-settings: + gofmt: + # Simplify code: gofmt with `-s` option. + # Default: true + simplify: false + # Apply the rewrite rules to the source before reformatting. + # https://pkg.go.dev/cmd/gofmt + # Default: [] + rewrite-rules: + #- pattern: 'interface{}' + # replacement: 'any' + - pattern: 'a[b:len(a)]' + replacement: 'a[b:]' issues: exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/ exclude: