github.com/openfga/openfga@v1.5.4-rc1/.golangci.yaml (about) 1 run: 2 timeout: 3m 3 modules-download-mode: readonly 4 allow-parallel-runners: true 5 build-tags: 6 - docker 7 8 linters: 9 enable: 10 - errname 11 - gofmt 12 - goimports 13 - stylecheck 14 - importas 15 - errcheck 16 - gosimple 17 - govet 18 - ineffassign 19 - mirror 20 - misspell 21 - staticcheck 22 - tagalign 23 - testifylint 24 - typecheck 25 - unused 26 - unconvert 27 - unparam 28 - wastedassign 29 - whitespace 30 - protogetter 31 - revive 32 - godot 33 - bodyclose 34 - gocritic 35 - gocyclo 36 #- gosec Too many different issues. Needs to be tackled in a separate PR. 37 38 linters-settings: 39 gofmt: 40 simplify: true 41 staticcheck: 42 checks: [ "all" ] 43 gocyclo: 44 min-complexity: 58 # This is our baseline at the moment. 45 godot: 46 scope: declarations 47 capital: true 48 period: true 49 govet: 50 enable-all: true 51 disable: 52 - shadow 53 - fieldalignment 54 goimports: 55 local-prefixes: "github.com/openfga/openfga" 56 importas: 57 no-unaliased: true # Do not allow unaliased imports of aliased packages. 58 no-extra-aliases: false # Do not allow non-required aliases. 59 alias: 60 - pkg: github.com/openfga/api/proto/openfga/v1 61 alias: openfgav1 62 63 issues: 64 exclude-use-default: false 65 exclude-rules: 66 - path: "(.+)_test.go" 67 linters: 68 - bodyclose 69 exclude: 70 - "should have a package comment" # stylecheck | revive 71 - "exported (.+) should have comment" # revive 72 - "comment on exported (.+) should be of the form" # revive 73 - "(.+) name will be used as (.+) by other packages, and that stutters; consider calling this (.+)" # revive 74 - "Error return value of (.+) is not checked" # errcheck 75 - "unused-parameter" # revive 76 - "exported func (.+) returns unexported type (.+), which can be annoying to use" # revive