# See this page for descriptions:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md

# got from here: https://github.com/pyroscope-io/pyroscope/blob/main/revive.toml

ignoreGeneratedHeader = false
severity = "error"
confidence = 0.8
errorCode = -1
warningCode = -1

[directive.specify-disable-reason]
[rule.context-keys-type]
[rule.time-naming]
[rule.var-declaration]
[rule.unexported-return]
[rule.errorf]
[rule.blank-imports]
[rule.context-as-argument]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
#[rule.exported]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.indent-error-flow]
[rule.argument-limit]
arguments = [5]
[rule.cyclomatic]
arguments = [10]
[rule.empty-block]
[rule.superfluous-else]
[rule.confusing-naming]
[rule.get-return]
[rule.modifies-parameter]
[rule.confusing-results]
[rule.deep-exit]
[rule.unused-parameter]
[rule.unreachable-code]
#[rule.add-constant]
arguments = [{ maxLitCount = "3", allowStrs = "\"\"", allowInts = "0,1,2,3,4,5,6,7,8,9,10,16,24,32,40,48,56,64,128,256,512,0xff,1000,0o666,0o700", allowFloats = "0.0,0.,1.0,1.,2.0,2." }]
[rule.flag-parameter]
[rule.unnecessary-stmt]
[rule.struct-tag]
[rule.modifies-value-receiver]
[rule.constant-logical-expr]
[rule.bool-literal-in-expr]
[rule.redefines-builtin-id]
[rule.function-result-limit]
arguments = [4]
[rule.imports-blacklist]
[rule.range-val-in-closure]
[rule.range-val-address]
[rule.waitgroup-by-value]
[rule.atomic]
[rule.empty-lines]
[rule.line-length-limit]
arguments = [160]
[rule.call-to-gc]
[rule.duplicated-imports]
[rule.import-shadowing]
[rule.bare-return]
[rule.unused-receiver]
# we already have errcheck in place to do this check and ignore rules works better
#[rule.unhandled-error]
#arguments = ["sb.WriteString", "fmt.Printf", "fmt.Println", "fmt.Print"]
severity = "error"
[rule.cognitive-complexity]
arguments = [15]
[rule.string-of-int]
