github.com/blong14/gache@v0.0.0-20240124023949-89416fd8bbfa/.golangci.yml (about) 1 issues: 2 # List of regexps of issue texts to exclude, empty list by default. 3 # But independently from this option we use default exclude patterns, 4 # it can be disabled by `exclude-use-default: false`. To list all 5 # excluded by default patterns execute `golangci-lint run --help` 6 7 exclude-rules: [] 8 9 # Maximum issues count per one linter. Set to 0 to disable. Default is 50. 10 max-issues-per-linter: 0 11 12 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. 13 max-same-issues: 0 14 15 linters: 16 disable-all: true 17 enable: 18 - bodyclose 19 - errcheck 20 - gocritic 21 # - gocyclo 22 - goimports 23 - gosimple 24 - govet 25 - ineffassign 26 - loggercheck 27 - noctx 28 - prealloc 29 - staticcheck 30 - stylecheck 31 - unconvert 32 - unused 33 fast: true 34 35 # options for analysis running 36 run: 37 # default concurrency is a available CPU number 38 concurrency: 4 39 40 # timeout for analysis, e.g. 30s, 5m, default is 1m 41 timeout: 10m 42 43 # exit code when at least one issue was found, default is 1 44 issues-exit-code: 1 45 46 # include test files or not, default is true 47 tests: true 48 49 # list of build tags, all linters use it. Default is empty list. 50 #build-tags: 51 # - mytag 52 53 # which dirs to skip: issues from them won't be reported; 54 # can use regexp here: generated.*, regexp is applied on full path; 55 # default value is empty list, but default dirs are skipped independently 56 # from this option's value (see skip-dirs-use-default). 57 #skip-dirs: 58 # - src/external_libs 59 # - autogenerated_by_my_lib 60 61 # default is true. Enables skipping of directories: 62 # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ 63 skip-dirs-use-default: true 64 65 # which files to skip: they will be analyzed, but issues from them 66 # won't be reported. Default value is empty list, but there is 67 # no need to include all autogenerated files, we confidently recognize 68 # autogenerated files. If it's not please let us know. 69 skip-files: 70 - ".*\\.hcl2spec\\.go$" 71 # - lib/bad.go 72 73 # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": 74 # If invoked with -mod=readonly, the go command is disallowed from the implicit 75 # automatic updating of go.mod described above. Instead, it fails when any changes 76 # to go.mod are needed. This setting is most useful to check that go.mod does 77 # not need updates, such as in a continuous integration and testing system. 78 # If invoked with -mod=vendor, the go command assumes that the vendor 79 # directory holds the correct copies of dependencies and ignores 80 # the dependency descriptions in go.mod. 81 modules-download-mode: readonly 82 83 # output configuration options 84 output: 85 # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" 86 format: colored-line-number 87 88 # print lines of code with issue, default is true 89 print-issued-lines: true 90 91 # print linter name in the end of issue text, default is true 92 print-linter-name: true 93 94 # make issues output unique by line, default is true 95 uniq-by-line: true 96 97 98 # all available settings of specific linters 99 linters-settings: 100 errcheck: 101 # report about not checking of errors in type assetions: `a := b.(MyStruct)`; 102 # default is false: such cases aren't reported by default. 103 check-type-assertions: false 104 105 # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; 106 # default is false: such cases aren't reported by default. 107 check-blank: false 108 109 # [deprecated] comma-separated list of pairs of the form pkg:regex 110 # the regex is used to ignore names within pkg. (default "fmt:.*"). 111 # see https://github.com/kisielk/errcheck#the-deprecated-method for details 112 ignore: fmt:.*,io/ioutil:^Read.*,io:Close 113 114 # path to a file containing a list of functions to exclude from checking 115 # see https://github.com/kisielk/errcheck#excluding-functions for details 116 #exclude: /path/to/file.txt