Skip to content

Commit

Permalink
docs: add rule names validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 2, 2024
1 parent b3f1aba commit afce090
Show file tree
Hide file tree
Showing 2 changed files with 166 additions and 2 deletions.
84 changes: 83 additions & 1 deletion jsonschema/golangci.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,88 @@
"unusedwrite"
]
},
"revive-rules": {
"enum": [
"add-constant",
"argument-limit",
"atomic",
"banned-characters",
"bare-return",
"blank-imports",
"bool-literal-in-expr",
"call-to-gc",
"cognitive-complexity",
"comment-spacings",
"confusing-naming",
"confusing-results",
"constant-logical-expr",
"context-as-argument",
"context-keys-type",
"cyclomatic",
"datarace",
"deep-exit",
"defer",
"dot-imports",
"duplicated-imports",
"early-return",
"empty-block",
"empty-lines",
"enforce-map-style",
"enforce-repeated-arg-type-style",
"enforce-slice-style",
"error-naming",
"error-return",
"error-strings",
"errorf",
"exported",
"file-header",
"flag-parameter",
"function-length",
"function-result-limit",
"get-return",
"identical-branches",
"if-return",
"import-alias-naming",
"import-shadowing",
"imports-blocklist",
"increment-decrement",
"indent-error-flow",
"line-length-limit",
"max-control-nesting",
"max-public-structs",
"modifies-parameter",
"modifies-value-receiver",
"nested-structs",
"optimize-operands-order",
"package-comments",
"range",
"range-val-address",
"range-val-in-closure",
"receiver-naming",
"redefines-builtin-id",
"redundant-import-alias",
"string-format",
"string-of-int",
"struct-tag",
"superfluous-else",
"time-equal",
"time-naming",
"unchecked-type-assertion",
"unconditional-recursion",
"unexported-naming",
"unexported-return",
"unhandled-error",
"unnecessary-stmt",
"unreachable-code",
"unused-parameter",
"unused-receiver",
"use-any",
"useless-break",
"var-declaration",
"var-naming",
"waitgroup-by-value"
]
},
"linters": {
"$comment": "anyOf with enum is used to allow auto completion of non-custom linters",
"description": "Linters usable.",
Expand Down Expand Up @@ -2389,7 +2471,7 @@
"required": ["name"],
"properties": {
"name": {
"type": "string",
"$ref": "#/definitions/revive-rules",
"title": "The rule name"
},
"disabled": {
Expand Down
84 changes: 83 additions & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,88 @@
"unusedwrite"
]
},
"revive-rules": {
"enum": [
"add-constant",
"argument-limit",
"atomic",
"banned-characters",
"bare-return",
"blank-imports",
"bool-literal-in-expr",
"call-to-gc",
"cognitive-complexity",
"comment-spacings",
"confusing-naming",
"confusing-results",
"constant-logical-expr",
"context-as-argument",
"context-keys-type",
"cyclomatic",
"datarace",
"deep-exit",
"defer",
"dot-imports",
"duplicated-imports",
"early-return",
"empty-block",
"empty-lines",
"enforce-map-style",
"enforce-repeated-arg-type-style",
"enforce-slice-style",
"error-naming",
"error-return",
"error-strings",
"errorf",
"exported",
"file-header",
"flag-parameter",
"function-length",
"function-result-limit",
"get-return",
"identical-branches",
"if-return",
"import-alias-naming",
"import-shadowing",
"imports-blocklist",
"increment-decrement",
"indent-error-flow",
"line-length-limit",
"max-control-nesting",
"max-public-structs",
"modifies-parameter",
"modifies-value-receiver",
"nested-structs",
"optimize-operands-order",
"package-comments",
"range",
"range-val-address",
"range-val-in-closure",
"receiver-naming",
"redefines-builtin-id",
"redundant-import-alias",
"string-format",
"string-of-int",
"struct-tag",
"superfluous-else",
"time-equal",
"time-naming",
"unchecked-type-assertion",
"unconditional-recursion",
"unexported-naming",
"unexported-return",
"unhandled-error",
"unnecessary-stmt",
"unreachable-code",
"unused-parameter",
"unused-receiver",
"use-any",
"useless-break",
"var-declaration",
"var-naming",
"waitgroup-by-value"
]
},
"linters": {
"$comment": "anyOf with enum is used to allow auto completion of non-custom linters",
"description": "Linters usable.",
Expand Down Expand Up @@ -2389,7 +2471,7 @@
"required": ["name"],
"properties": {
"name": {
"type": "string",
"$ref": "#/definitions/revive-rules",
"title": "The rule name"
},
"disabled": {
Expand Down

0 comments on commit afce090

Please sign in to comment.