git.lukeshu.com/go/lowmemjson@v0.3.9-0.20230723050957-72f6d13f6fb2/.golangci.yml (about) 1 # Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> 2 # 3 # SPDX-License-Identifier: GPL-2.0-or-later 4 5 linters: 6 enable-all: true 7 disable: 8 # Deprecated 9 - deadcode # deprecated, replaced by 'unused' 10 - exhaustivestruct # deprecated, replaced by 'exhauststruct' 11 - golint # deprecated, replaced by 'revive' 12 - ifshort # deprecated 13 - interfacer # deprecated 14 - maligned # deprecated, replaced by 'govet fieldalignement' 15 - nosnakecase # deprecated, replaced by 'revive var-naming' 16 - scopelint # deprecated, replaced by 'exportloopref' 17 - structcheck # deprecated, replaced by 'unused' 18 - varcheck # deprecated, replaced by 'unused' 19 20 # Don't support Go 1.18 generics yet 21 - rowserrcheck 22 - sqlclosecheck 23 - wastedassign 24 25 # Style 26 - nlreturn 27 - nonamedreturns # I name returns for godoc purposes. 28 - tagliatelle 29 - wsl 30 - whitespace 31 32 # Complexity; sometimes code is just complex. 33 - cyclop 34 - funlen 35 - gocognit 36 - gocyclo 37 - maintidx 38 - nestif 39 40 # Miscellaneous 41 - asciicheck # it's fine to include Unicode 42 - godox # there are a few known TODOs, and that's OK 43 - goerr113 # forbids fmt.Errorf(%w), which is just silly 44 45 # These are disabled not because I think they're bad, but because 46 # they currently don't pass, and I haven't really evaluated them 47 # yet. 48 - errorlint 49 - exhaustive 50 - exhaustruct 51 - forcetypeassert 52 - gochecknoglobals 53 - gochecknoinits 54 - gomnd 55 - ireturn 56 - lll 57 - revive 58 - testpackage 59 - thelper 60 - varnamelen 61 - wrapcheck 62 linters-settings: 63 gci: 64 sections: 65 - standard 66 - default 67 - prefix(git.lukeshu.com/go/lowmemjson) 68 gofmt: 69 simplify: true 70 gosec: 71 excludes: 72 - G104 # duplicates errcheck 73 nolintlint: 74 require-explanation: true 75 require-specific: true 76 issues: 77 exclude-use-default: false 78 exclude-rules: 79 - path: "borrowed_.*_test\\.go" 80 linters: 81 - errcheck 82 - godot 83 - gofumpt 84 - gosec 85 - musttag 86 - noctx 87 - stylecheck 88 - path: "borrowed_.*_test\\.go" 89 linters: [gocritic] 90 text: "commentFormatting: put a space between `//` and comment text" 91 - path: "borrowed_.*_test\\.go" 92 linters: [gocritic] 93 text: "ifElseChain: rewrite if-else to switch statement" 94 - path: "internal/" 95 linters: [stylecheck] 96 text: "ST1000" # package doc comment 97 max-issues-per-linter: 0 98 max-same-issues: 0