# options for analysis running run: # default concurrency is a available CPU number concurrency: 4 # timeout for analysis, e.g. 30s, 5m, default is 1m deadline: 2m # which files to skip: they will be analyzed, but issues from them # won't be reported. Default value is empty list, but there is # no need to include all autogenerated files, we confidently recognize # autogenerated files. If it's not please let us know. skip-files: - ".*generated.*" - ".*_test.go" # all available settings of specific linters linters-settings: gocyclo: min-complexity: 20 lll: line-length: 200 linters: enable: - deadcode - errcheck - govet - ineffassign - staticcheck - structcheck - unused - varcheck - bodyclose - depguard - dupl - gocyclo - goimports - golint - gosec - misspell - stylecheck - unconvert disable-all: true fast: true issues: exclude-use-default: false # List of regexps of issue texts to exclude, empty list by default. # But independently from this option we use default exclude patterns, # it can be disabled by `exclude-use-default: false`. To list all # excluded by default patterns execute `golangci-lint run --help` exclude: # errcheck defer Close - error return value not checked \(defer .*\.Close()\) # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked # gosec: Duplicated errcheck checks - G104 # gosec: Expect file permissions to be 0600 or less - G302 # gosec: Use of weak random number generators - G404 # errcheck defer Close - error return value not checked \(defer .*\.Close()\) # gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)' - Potential file inclusion via variable