github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/revive.toml (about) 1 # See this page for descriptions: 2 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md 3 4 ignoreGeneratedHeader = false 5 severity = "error" 6 confidence = 0.8 7 errorCode = 1 8 warningCode = 0 9 10 [directive.specify-disable-reason] 11 [rule.context-keys-type] 12 [rule.time-naming] 13 [rule.var-declaration] 14 [rule.unexported-return] 15 [rule.errorf] 16 [rule.blank-imports] 17 [rule.context-as-argument] 18 [rule.dot-imports] 19 [rule.error-return] 20 [rule.error-strings] 21 [rule.error-naming] 22 # [rule.exported] 23 [rule.if-return] 24 [rule.increment-decrement] 25 [rule.var-naming] 26 [rule.package-comments] 27 [rule.range] 28 [rule.receiver-naming] 29 [rule.indent-error-flow] 30 [rule.argument-limit] 31 arguments = [5] 32 [rule.max-public-structs] 33 arguments = [10] 34 [rule.empty-block] 35 [rule.superfluous-else] 36 # [rule.get-return] 37 [rule.modifies-parameter] 38 [rule.confusing-results] 39 [rule.deep-exit] 40 [rule.unused-parameter] 41 [rule.unreachable-code] 42 # [rule.add-constant] 43 # arguments = [{maxLitCount = "10",allowStrs ="\"\"",allowInts="0,1,2,3,4,5,6,7,8,9,16,24,32,40,48,56,64,128,256,0xff",allowFloats="0.0,0.,1.0,1.,2.0,2."}] 44 # [rule.flag-parameter] 45 [rule.unnecessary-stmt] 46 [rule.struct-tag] 47 [rule.modifies-value-receiver] 48 [rule.constant-logical-expr] 49 [rule.bool-literal-in-expr] 50 [rule.redefines-builtin-id] 51 [rule.function-result-limit] 52 arguments = [4] 53 [rule.imports-blacklist] 54 [rule.range-val-in-closure] 55 [rule.range-val-address] 56 [rule.waitgroup-by-value] 57 [rule.atomic] 58 [rule.empty-lines] 59 [rule.line-length-limit] 60 arguments = [180] 61 [rule.duplicated-imports] 62 [rule.import-shadowing] 63 [rule.bare-return] 64 [rule.unused-receiver] 65 [rule.string-of-int] 66 67 # Custom rules. We use a revive fork available here: https://github.com/pyroscope-io/revive 68 # See Makefile `lint` section for how to use the fork 69 #[rule.byte-array-limit] 70 # arguments = [7] 71 72 # These are pretty much disabled 73 [rule.cognitive-complexity] 74 arguments = [55] 75 76 [rule.cyclomatic] 77 arguments = [50] 78 79 # [rule.unhandled-error] 80 # arguments = ["sb.WriteString", "fmt.Fprintf", "fmt.Printf", "fmt.Println"]