Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 74 additions & 82 deletions tools/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,78 @@
version: "2"
linters:
enable-all: true
default: all
disable:
# WARN [runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming).
- nosnakecase
# WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref.
- scopelint
# WARN [runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.
- ifshort
# WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- varcheck
# WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- deadcode
# WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive.
- golint
# WARN [runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct.
- exhaustivestruct
# WARN [runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'.
- maligned
# WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- structcheck
# WARN [runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.
- interfacer

# Long line lengths are a presentation issue.
- lll
linters-settings:
cyclop:
# Default: 10
max-complexity: 12
depguard:
rules:
main:
allow:
- $gostd
- github.com/grafana/killercoda/tools/transformer/goldmark
- github.com/grafana/killercoda/tools/transformer/killercoda
- github.com/grafana/killercoda/tools/transformer/parser
- github.com/yuin/goldmark
- github.com/yuin/goldmark/ast
- github.com/yuin/goldmark-meta
- github.com/yuin/goldmark/extension
- github.com/yuin/goldmark/parser
- github.com/yuin/goldmark/renderer
- github.com/yuin/goldmark/renderer/html
- github.com/yuin/goldmark/text
- github.com/yuin/goldmark/util
- mvdan.cc/xurls/v2
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/require
funlen:
# Default: false
ignore-comments: true
ireturn:
allow:
- anon
- error
- empty
- stdlib
- NodeRenderer
tagliatelle:
case:
settings:
cyclop:
max-complexity: 12
depguard:
rules:
json: snake
yaml: snake
varnamelen:
ignore-names:
# Common name for bytes variables.
- b
- err
- fi
# Common name for File variables.
- f
# Common names for iterator variables.
- i
- j
# Short for Markdown and avoids conflict with package name markdown.
- md
# Common name for number variables.
- n
# Common name for test cases.
- tc
# Short for URL and avoids conflict with the package name url.
- u
# Common name for io.Writer.
- w
main:
allow:
- $gostd
- github.com/grafana/killercoda/tools/transformer/goldmark
- github.com/grafana/killercoda/tools/transformer/killercoda
- github.com/grafana/killercoda/tools/transformer/parser
- github.com/yuin/goldmark
- github.com/yuin/goldmark/ast
- github.com/yuin/goldmark-meta
n - github.com/yuin/goldmark/extension
- github.com/yuin/goldmark/parser
- github.com/yuin/goldmark/renderer
- github.com/yuin/goldmark/renderer/html
- github.com/yuin/goldmark/text
- github.com/yuin/goldmark/util
- mvdan.cc/xurls/v2
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/require
funlen:
ignore-comments: true
ireturn:
allow:
- anon
- error
- empty
- stdlib
- NodeRenderer
tagliatelle:
case:
rules:
json: snake
yaml: snake
varnamelen:
ignore-names:
- b
- err
- fi
- f
- i
- j
- md
- "n"
- tc
- u
- w
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading