Source
xxxxxxxxxx
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# configuration options for golangci-lint analyzer
run
# default concurrency is a available CPU number
concurrency4
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout 1m
# exit code when at least one issue was found, default is 1
issues-exit-code1
# include test files or not, default is true
teststrue
# which dirs to skip: issues from them won't be reported;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but default dirs are skipped independently
# from this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-dirs
# - src/external_libs
# - autogenerated_by_my_lib
build-tags
golint_check
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-defaulttrue
# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runnersfalse
# output configuration options
output
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format colored-line-number
# print lines of code with issue, default is true
print-issued-linestrue
# print linter name in the end of issue text, default is true
print-linter-nametrue
# make issues output unique by line, default is true
uniq-by-linetrue
# add a prefix to the output file references; default is no prefix
path-prefix""
# all available settings of specific linters
linters-settings
dupl
# tokens count to trigger issue, 150 by default
threshold1000
errcheck
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertionsfalse
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blankfalse
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore fmt .*,io/ioutil ^Read.*
# path to a file containing a list of functions to exclude from checking
# see https://github.com/kisielk/errcheck#excluding-functions for details
# exclude: /path/to/file.txt
exhaustive
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustivetrue
funlen
lines120
statements70
gci
# put imports beginning with prefix after 3rd-party packages;
# only support one prefix
# if not set, use goimports.local-prefixes
local-prefixes github.com/org/project
gocognit
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity30
nestif