Skip to content

Commit

Permalink
website: regenerate checks JSON file
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh committed Jun 23, 2023
1 parent bb06369 commit 76bb609
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions website/data/checks.json
Expand Up @@ -1146,9 +1146,9 @@
},
"SA4008": {
"Title": "The variable in the loop condition never changes, are you incrementing the wrong variable?",
"Text": "For example:\n\n\tfor i := 0; i \u003c 10; j++ { ... }\n\nThis may also occur when a loop condition does not have a chance to increment.\nFor example, when a loop body contains an unconditional panic:\n\n\tfunc f() {\n\t\tpanic(\"oops\")\n\t}\n\tfunc g() {\n\t\tfor i := 0; i \u003c 10; i++ {\n\t\t\t// f unconditionally calls panic, which means \"i\" is\n\t\t\t// never incremented.\n\t\t\tf()\n\t\t}\n\t}",
"Text": "For example:\n\n\tfor i := 0; i \u003c 10; j++ { ... }\n\nThis may also occur when a loop can only execute once because of unconditional\ncontrol flow that terminates the loop. For example, when a loop body contains an\nunconditional break, return, or panic:\n\n\tfunc f() {\n\t\tpanic(\"oops\")\n\t}\n\tfunc g() {\n\t\tfor i := 0; i \u003c 10; i++ {\n\t\t\t// f unconditionally calls panic, which means \"i\" is\n\t\t\t// never incremented.\n\t\t\tf()\n\t\t}\n\t}",
"TitleMarkdown": "The variable in the loop condition never changes, are you incrementing the wrong variable?",
"TextMarkdown": "For example:\n\n\tfor i := 0; i \u003c 10; j++ { ... }\n\nThis may also occur when a loop condition does not have a chance to increment.\nFor example, when a loop body contains an unconditional panic:\n\n\tfunc f() {\n\t\tpanic(\"oops\")\n\t}\n\tfunc g() {\n\t\tfor i := 0; i \u003c 10; i++ {\n\t\t\t// f unconditionally calls panic, which means \"i\" is\n\t\t\t// never incremented.\n\t\t\tf()\n\t\t}\n\t}",
"TextMarkdown": "For example:\n\n\tfor i := 0; i \u003c 10; j++ { ... }\n\nThis may also occur when a loop can only execute once because of unconditional\ncontrol flow that terminates the loop. For example, when a loop body contains an\nunconditional break, return, or panic:\n\n\tfunc f() {\n\t\tpanic(\"oops\")\n\t}\n\tfunc g() {\n\t\tfor i := 0; i \u003c 10; i++ {\n\t\t\t// f unconditionally calls panic, which means \"i\" is\n\t\t\t// never incremented.\n\t\t\tf()\n\t\t}\n\t}",
"Before": "",
"After": "",
"Since": "2017.1",
Expand Down Expand Up @@ -1677,6 +1677,19 @@
"Severity": 3,
"MergeIf": 0
},
"SA6006": {
"Title": "Using io.WriteString to write []byte",
"Text": "Using io.WriteString to write a slice of bytes, as in\n\n```go\nio.WriteString(w, string(b))\n```\n\nis both unnecessary and inefficient. Converting from []byte to string\nhas to allocate and copy the data, and we could simply use w.Write(b)\ninstead.",
"TitleMarkdown": "Using io.WriteString to write `[]byte`",
"TextMarkdown": "Using io.WriteString to write a slice of bytes, as in\n\n```go\nio.WriteString(w, string(b))\n```\n\nis both unnecessary and inefficient. Converting from `[]byte` to `string`\nhas to allocate and copy the data, and we could simply use `w.Write(b)`\ninstead.",
"Before": "",
"After": "",
"Since": "Unreleased",
"NonDefault": false,
"Options": null,
"Severity": 0,
"MergeIf": 0
},
"SA9001": {
"Title": "Defers in range loops may not run when you expect them to",
"Text": "",
Expand Down Expand Up @@ -2166,7 +2179,8 @@
"SA6001",
"SA6002",
"SA6003",
"SA6005"
"SA6005",
"SA6006"
],
"SA9": [
"SA9001",
Expand Down

0 comments on commit 76bb609

Please sign in to comment.