github.com/cozy/cozy-stack@v0.0.0-20240327093429-939e4a21320e/.golangci.yaml (about) 1 # Options for analysis running. 2 run: 3 # Timeout for analysis, e.g. 30s, 5m. 4 # Default: 1m 5 timeout: 3m 6 # Which dirs to skip: issues from them won't be reported. 7 # Can use regexp here: `generated.*`, regexp is applied on full path. 8 # Default value is empty list, 9 # but default dirs are skipped independently of this option's value (see skip-dirs-use-default). 10 # "/" will be replaced by current OS file path separator to properly work on Windows. 11 skip-dirs: 12 # - src/external_libs 13 # - autogenerated_by_my_lib 14 # Enables skipping of directories: 15 # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ 16 # Default: true 17 skip-dirs-use-default: true 18 # Which files to skip: they will be analyzed, but issues from them won't be reported. 19 # Default value is empty list, 20 # but there is no need to include all autogenerated files, 21 # we confidently recognize autogenerated files. 22 # If it's not please let us know. 23 # "/" will be replaced by current OS file path separator to properly work on Windows. 24 skip-files: 25 # - ".*\\.my\\.go$" 26 # - lib/bad.go 27 linters: 28 # Disable all linters. 29 # Default: false 30 disable-all: true 31 # Enable specific linter 32 # https://golangci-lint.run/usage/linters/#enabled-by-default 33 enable: 34 - bidichk 35 - exportloopref 36 - errname 37 - forbidigo 38 - gocritic 39 - gofmt 40 - govet 41 - misspell 42 - nolintlint 43 - tenv 44 - unconvert 45 - unused 46 - whitespace 47 # Run only fast linters from enabled linters set (first run won't be fast) 48 # Default: false 49 fast: false 50 linters-settings: 51 forbidigo: 52 # Forbid fmt.Printf, as they are often used for debugging and they should 53 # not be commited. The good cases can be written fmt.Fprintf(os.Stdout, ). 54 forbid: 55 - fmt.Printf 56 gocritic: 57 disabled-checks: 58 - appendAssign 59 - ifElseChain 60 - argOrder 61 nolintlint: 62 # Disable to ensure that all nolint directives actually have an effect. 63 allow-unused: false 64 # Disable to ensure that nolint directives don't have a leading space. 65 allow-leading-space: false 66 # Exclude following linters from requiring an explanation. 67 allow-no-explanation: [] 68 # Enable to require an explanation of nonzero length after each nolint directive. 69 require-explanation: true 70 # Enable to require nolint directives to mention the specific linter being suppressed. 71 require-specific: true