github.com/olli-ai/jx/v2@v2.0.400-0.20210921045218-14731b4dd448/.golangci.yml (about) 1 linters-settings: 2 depguard: 3 list-type: blacklist 4 packages: 5 - github.com/jenkins-x/jx/v2/pkg/log/ 6 - github.com/satori/go.uuid 7 - github.com/pborman/uuid 8 packages-with-error-message: 9 - github.com/jenkins-x/jx/v2/pkg/log/: "use jenkins-x/jx-logging instead" 10 - github.com/satori/go.uuid: "use github.com/google/uuid instead" 11 - github.com/pborman/uuid: "use github.com/google/uuid instead" 12 dupl: 13 threshold: 100 14 exhaustive: 15 default-signifies-exhaustive: false 16 funlen: 17 lines: 200 18 statements: 150 19 goconst: 20 min-len: 3 21 min-occurrences: 3 22 gocritic: 23 enabled-tags: 24 - diagnostic 25 - experimental 26 - opinionated 27 - performance 28 - style 29 disabled-checks: 30 - dupImport # https://github.com/go-critic/go-critic/issues/845 31 - ifElseChain 32 - octalLiteral 33 - whyNoLint 34 - wrapperFunc 35 gocyclo: 36 min-complexity: 15 37 goimports: 38 golint: 39 min-confidence: 0 40 gofmt: 41 simplify: true 42 gomnd: 43 settings: 44 mnd: 45 # don't include the "operation" and "assign" 46 checks: argument,case,condition,return 47 govet: 48 check-shadowing: true 49 settings: 50 printf: 51 funcs: 52 - (github.com/jenkins-x/jx-logging/pkg/log/Logger()).Debugf 53 - (github.com/jenkins-x/jx-logging/pkg/log/Logger()).Infof 54 - (github.com/jenkins-x/jx-logging/pkg/log/Logger()).Warnf 55 - (github.com/jenkins-x/jx-logging/pkg/log/Logger()).Errorf 56 - (github.com/jenkins-x/jx-logging/pkg/log/Logger()).Fatalf 57 lll: 58 line-length: 140 59 maligned: 60 suggest-new: true 61 misspell: 62 nolintlint: 63 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 64 allow-unused: false # report any unused nolint directives 65 require-explanation: false # don't require an explanation for nolint directives 66 require-specific: false # don't require nolint directives to be specific about which linter is being skipped 67 linters: 68 # please, do not use `enable-all`: it's deprecated and will be removed soon. 69 # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint 70 disable-all: true 71 enable: 72 - asciicheck 73 # - bodyclose 74 - deadcode 75 - depguard 76 # - dogsled 77 # - dupl 78 - errcheck 79 # - funlen 80 # - goconst 81 - gofmt 82 - goimports 83 - goprintffuncname 84 - gosec 85 # - gosimple 86 # - ineffassign 87 - interfacer 88 - misspell 89 # - nakedret 90 # - rowserrcheck 91 # - staticcheck 92 - structcheck 93 - typecheck 94 - unconvert 95 # - unparam 96 - unused 97 # - varcheck 98 # - golint 99 # - gocritic 100 # - gocyclo 101 # - nestif 102 # don't enable: 103 # - testpackage 104 # - gochecknoinits 105 # - stylecheck 106 # - lll 107 # - govet 108 # - whitespace 109 # - exhaustive (TODO: enable after next release; current release at time of writing is v1.27) 110 # - gochecknoglobals 111 # - gocognit 112 # - godot 113 # - godox 114 # - goerr113 115 # - maligned 116 # - prealloc 117 # - wsl 118 # - nolintlint 119 # - gomnd 120 # - scopelint 121 issues: 122 # Excluding configuration per-path, per-linter, per-text and per-source 123 exclude-rules: 124 # - path: _test\.go 125 # linters: 126 # - gomnd 127 # https://github.com/go-critic/go-critic/issues/926 128 - linters: 129 - gocritic 130 text: "unnecessaryDefer:" 131 max-same-issues: 0 132 133 run: 134 skip-dirs: 135 - test/testdata_etc 136 - internal/cache 137 - internal/renameio 138 - internal/robustio 139 # golangci.com configuration 140 # https://github.com/golangci/golangci/wiki/Configuration 141 service: 142 golangci-lint-version: 1.27.x # use the fixed version to not introduce new linters unexpectedly 143 prepare: 144 - echo "here I can run custom commands, but no preparation needed for this repo"