Closed
Description
golang-ci started from docker. v1.16.0
config:
# This file contains all available configuration options
# with their default values.
# options for analysis running
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 10m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
- gen
- sdk
# 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:
- pkg/shared/apperror/app-error-gen.go
# whether to hide "congrats" message if no issues were found,
# default is false (show "congrats" message by default).
# set this option to true to print nothing if no issues were found.
silent: true
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gas
- goconst
- golint
- ineffassign
- megacheck
- structcheck
- unconvert
- varcheck
- govet
- goimports
- nakedret
- misspell
fast: false
issues:
exclude-use-default: false
exclude:
- comment should not have
- should have comment
- comment on exported
- comment should be of the form
- file is not goimported
- should not use dot imports
- "don't use ((underscores)|(ALL_CAPS)) in Go names;"
#- "((field)|(var)|(const)|(method)|(func)|(parameter)|(result)) ([^\s]+)+ should be ([^\s]+)"
- "(comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)"
- "which can be annoying to use \\(golint\\)"
- "error strings should not be capitalized or end with punctuation or a newline \\(golint\\)"
- Potential file inclusion via variable #we do not execute code from file, for sure
- G104
- G107
- G404
- G505
- "File is not goimports-ed"
- "annoying to use"
- "error strings should not be capitalized or end with punctuation or a newline"
linters-settings:
govet:
# report about shadowed variables
check-shadowing: true
unclear message. may be an issue in a lambda-function
Status: Image is up to date for golangci/golangci-lint:latest
WARN [runner] Can't process result by autogenerated_exclude processor: can't filter issue result.Issue{FromLinter:"govet", Text:"nilness: nil dereference in load", Pos:token.Position{Filename:"", Offset:0, Line:0, Column:0}, LineRange:(*result.Range)(nil), HunkPos:0, SourceLines:[]string(nil), Replacement:(*result.Replacement)(nil)}: no file path for issue
WARN [runner] Can't process result by nolint processor: can't filter issue result.Issue{FromLinter:"govet", Text:"nilness: nil dereference in load", Pos:token.Position{Filename:"", Offset:0, Line:0, Column:0}, LineRange:(*result.Range)(nil), HunkPos:0, SourceLines:[]string(nil), Replacement:(*result.Replacement)(nil)}: no file path for issue
WARN [runner/source_code] Failed to get line 0 for file : failed to get file lines cache: can't get file bytes from cache: can't read file : open : no such file or directory
:0: nilness: nil dereference in load (govet)