Add Go autoformatting to the 'autoformat' make target and to CI

Existing gofmt complaints are fixed, and files that specifically test queries that relate to badly formatting code are tagged as such.
This commit is contained in:
Chris Smowton
2020-07-08 12:37:15 +01:00
parent 26eeb3c658
commit ce94c68e0a
24 changed files with 1110 additions and 1083 deletions

View File

@@ -33,8 +33,8 @@ jobs:
- name: Build
run: env PATH=$PATH:$HOME/codeql make
- name: Check that all QL code is autoformatted
run: env PATH=$PATH:$HOME/codeql make AUTOFORMAT=--check-only autoformat
- name: Check that all QL and Go code is autoformatted
run: env PATH=$PATH:$HOME/codeql make QL_AUTOFORMAT=--check-only GO_AUTOFORMAT=-d autoformat
- name: Test
run: env PATH=$PATH:$HOME/codeql make test

View File

@@ -27,12 +27,14 @@ clean:
rm -rf tools/bin tools/linux64 tools/osx64 tools/win64 tools/net tools/opencsv
rm -rf $(EXTRACTOR_PACK_OUT) build/stats build/testdb
AUTOFORMAT=-qq -i
QL_AUTOFORMAT=-qq -i
GO_AUTOFORMAT=-w # Update files in-place
DATAFLOW_BRANCH=master
autoformat:
find ql/src -name *.ql -or -name *.qll | xargs codeql query format $(AUTOFORMAT)
find ql/src -name "*.ql" -or -name "*.qll" | xargs codeql query format $(QL_AUTOFORMAT)
git ls-files | grep \\.go$ | xargs grep -L "//\s*autoformat-ignore" | xargs gofmt $(GO_AUTOFORMAT)
tools: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))) tools/tokenizer.jar

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (gofmt chokes on invalid programs)
// Example file with a syntax error to demonstrate use of "expect frontend errors" directive
// codeql test: expect frontend errors

View File

@@ -1,9 +1,9 @@
| tst.go:4:7:4:12 | 0b1011 | 11 | 11 |
| tst.go:5:7:5:12 | 0B1011 | 11 | 11 |
| tst.go:6:7:6:11 | 0o660 | 432 | 432 |
| tst.go:7:7:7:11 | 0O660 | 432 | 432 |
| tst.go:8:7:8:16 | 0x1.p-1021 | 0x1.p-1021 | 1/22471164185778948846616314884862809170224712236778832159178760144716584475687620391588559665300942002640014234983924169707348721101802077811605928829934265547220986678108185659537777450155761764931635369010625721104768835292807860184239138817603404645418813835573287279993405742309964538104419541203028017152 |
| tst.go:9:7:9:16 | 0X1.p-1021 | 0X1.p-1021 | 1/22471164185778948846616314884862809170224712236778832159178760144716584475687620391588559665300942002640014234983924169707348721101802077811605928829934265547220986678108185659537777450155761764931635369010625721104768835292807860184239138817603404645418813835573287279993405742309964538104419541203028017152 |
| tst.go:10:7:10:15 | 1_000_000 | 1000000 | 1000000 |
| tst.go:11:7:11:18 | 0b_0101_0110 | 86 | 86 |
| tst.go:12:7:12:17 | 3.1415_9265 | 3.1415_9265 | 62831853/20000000 |
| tst.go:6:7:6:12 | 0b1011 | 11 | 11 |
| tst.go:7:7:7:12 | 0B1011 | 11 | 11 |
| tst.go:8:7:8:11 | 0o660 | 432 | 432 |
| tst.go:9:7:9:11 | 0O660 | 432 | 432 |
| tst.go:10:7:10:16 | 0x1.p-1021 | 0x1.p-1021 | 1/22471164185778948846616314884862809170224712236778832159178760144716584475687620391588559665300942002640014234983924169707348721101802077811605928829934265547220986678108185659537777450155761764931635369010625721104768835292807860184239138817603404645418813835573287279993405742309964538104419541203028017152 |
| tst.go:11:7:11:16 | 0X1.p-1021 | 0X1.p-1021 | 1/22471164185778948846616314884862809170224712236778832159178760144716584475687620391588559665300942002640014234983924169707348721101802077811605928829934265547220986678108185659537777450155761764931635369010625721104768835292807860184239138817603404645418813835573287279993405742309964538104419541203028017152 |
| tst.go:12:7:12:15 | 1_000_000 | 1000000 | 1000000 |
| tst.go:13:7:13:18 | 0b_0101_0110 | 86 | 86 |
| tst.go:14:7:14:17 | 3.1415_9265 | 3.1415_9265 | 62831853/20000000 |

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (we intentionally test unusual capitalisations of 0B, 0O and other such prefixes)
const (
b1 = 0b1011
b2 = 0B1011

View File

@@ -3,5 +3,7 @@ package main
// This file tests that the extractor does not crash on files that do not
// end in a newline, so it is important not to autoformat this file.
// autoformat-ignore
func main() {
}

View File

@@ -27,48 +27,48 @@
| consts.go:47:16:47:18 | 1.0 | 1.0 |
| consts.go:48:16:48:19 | "hi" | "hi" |
| literals.go:3:8:3:12 | "fmt" | "fmt" |
| literals.go:6:2:6:10 | "decimal" | "decimal" |
| literals.go:6:17:6:18 | 42 | 42 |
| literals.go:7:2:7:8 | "octal" | "octal" |
| literals.go:7:17:7:20 | 0600 | 0600 |
| literals.go:8:2:8:14 | "hexadecimal" | "hexadecimal" |
| literals.go:8:17:8:24 | 0xcaffee | 0xcaffee |
| literals.go:12:2:12:3 | 0. | 0. |
| literals.go:13:2:13:6 | 72.40 | 72.40 |
| literals.go:14:2:14:7 | 072.40 | 072.40 |
| literals.go:15:2:15:8 | 2.71828 | 2.71828 |
| literals.go:16:2:16:6 | 1.e+0 | 1.e+0 |
| literals.go:17:2:17:12 | 6.67428e-11 | 6.67428e-11 |
| literals.go:18:2:18:4 | 1E6 | 1E6 |
| literals.go:19:2:19:4 | .25 | .25 |
| literals.go:20:2:20:10 | .12345E+5 | .12345E+5 |
| literals.go:24:2:24:3 | 0i | 0i |
| literals.go:25:2:25:5 | 011i | 011i |
| literals.go:26:2:26:4 | 0.i | 0.i |
| literals.go:27:2:27:9 | 2.71828i | 2.71828i |
| literals.go:28:2:28:7 | 1.e+0i | 1.e+0i |
| literals.go:29:2:29:13 | 6.67428e-11i | 6.67428e-11i |
| literals.go:30:2:30:5 | 1E6i | 1E6i |
| literals.go:31:2:31:5 | .25i | .25i |
| literals.go:32:2:32:11 | .12345E+5i | .12345E+5i |
| literals.go:36:2:36:4 | 'a' | 'a' |
| literals.go:37:2:37:5 | '\u00e4' | '\u00e4' |
| literals.go:38:2:38:6 | '\u672c' | '\u672c' |
| literals.go:39:2:39:5 | '\\t' | '\\t' |
| literals.go:40:2:40:7 | '\\007' | '\\007' |
| literals.go:41:2:41:7 | '\\377' | '\\377' |
| literals.go:42:2:42:7 | '\\x07' | '\\x07' |
| literals.go:43:2:43:7 | '\\xff' | '\\xff' |
| literals.go:44:2:44:9 | '\\u12e4' | '\\u12e4' |
| literals.go:45:2:45:13 | '\\U00101234' | '\\U00101234' |
| literals.go:46:2:46:5 | '\\'' | '\\'' |
| literals.go:50:2:50:6 | `abc` | `abc` |
| literals.go:51:2:52:3 | `\\n,\n\\n` | `\\n,\n\\n` |
| literals.go:53:2:53:5 | "\\n" | "\\n" |
| literals.go:54:2:54:5 | "\\"" | "\\"" |
| literals.go:55:2:55:18 | "Hello, world!\\n" | "Hello, world!\\n" |
| literals.go:56:2:56:12 | "\u65e5\u672c\u8a9e" | "\u65e5\u672c\u8a9e" |
| literals.go:57:2:57:22 | "\\u65e5\u672c\\U00008a9e" | "\\u65e5\u672c\\U00008a9e" |
| literals.go:58:2:58:13 | "\\xff\\u00FF" | "\\xff\\u00FF" |
| literals.go:67:22:67:27 | "\ud83d\udcff" | "\ud83d\udcff" |
| literals.go:67:31:67:32 | "" | "" |
| literals.go:8:2:8:10 | "decimal" | "decimal" |
| literals.go:8:17:8:18 | 42 | 42 |
| literals.go:9:2:9:8 | "octal" | "octal" |
| literals.go:9:17:9:20 | 0600 | 0600 |
| literals.go:10:2:10:14 | "hexadecimal" | "hexadecimal" |
| literals.go:10:17:10:24 | 0xcaffee | 0xcaffee |
| literals.go:14:2:14:3 | 0. | 0. |
| literals.go:15:2:15:6 | 72.40 | 72.40 |
| literals.go:16:2:16:7 | 072.40 | 072.40 |
| literals.go:17:2:17:8 | 2.71828 | 2.71828 |
| literals.go:18:2:18:6 | 1.e+0 | 1.e+0 |
| literals.go:19:2:19:12 | 6.67428e-11 | 6.67428e-11 |
| literals.go:20:2:20:4 | 1E6 | 1E6 |
| literals.go:21:2:21:4 | .25 | .25 |
| literals.go:22:2:22:10 | .12345E+5 | .12345E+5 |
| literals.go:26:2:26:3 | 0i | 0i |
| literals.go:27:2:27:5 | 011i | 011i |
| literals.go:28:2:28:4 | 0.i | 0.i |
| literals.go:29:2:29:9 | 2.71828i | 2.71828i |
| literals.go:30:2:30:7 | 1.e+0i | 1.e+0i |
| literals.go:31:2:31:13 | 6.67428e-11i | 6.67428e-11i |
| literals.go:32:2:32:5 | 1E6i | 1E6i |
| literals.go:33:2:33:5 | .25i | .25i |
| literals.go:34:2:34:11 | .12345E+5i | .12345E+5i |
| literals.go:38:2:38:4 | 'a' | 'a' |
| literals.go:39:2:39:5 | '\u00e4' | '\u00e4' |
| literals.go:40:2:40:6 | '\u672c' | '\u672c' |
| literals.go:41:2:41:5 | '\\t' | '\\t' |
| literals.go:42:2:42:7 | '\\007' | '\\007' |
| literals.go:43:2:43:7 | '\\377' | '\\377' |
| literals.go:44:2:44:7 | '\\x07' | '\\x07' |
| literals.go:45:2:45:7 | '\\xff' | '\\xff' |
| literals.go:46:2:46:9 | '\\u12e4' | '\\u12e4' |
| literals.go:47:2:47:13 | '\\U00101234' | '\\U00101234' |
| literals.go:48:2:48:5 | '\\'' | '\\'' |
| literals.go:52:2:52:6 | `abc` | `abc` |
| literals.go:53:2:54:3 | `\\n,\n\\n` | `\\n,\n\\n` |
| literals.go:55:2:55:5 | "\\n" | "\\n" |
| literals.go:56:2:56:5 | "\\"" | "\\"" |
| literals.go:57:2:57:18 | "Hello, world!\\n" | "Hello, world!\\n" |
| literals.go:58:2:58:12 | "\u65e5\u672c\u8a9e" | "\u65e5\u672c\u8a9e" |
| literals.go:59:2:59:22 | "\\u65e5\u672c\\U00008a9e" | "\\u65e5\u672c\\U00008a9e" |
| literals.go:60:2:60:13 | "\\xff\\u00FF" | "\\xff\\u00FF" |
| literals.go:69:22:69:27 | "\ud83d\udcff" | "\ud83d\udcff" |
| literals.go:69:31:69:32 | "" | "" |

View File

@@ -27,48 +27,48 @@
| consts.go:47:16:47:18 | 1.0 | 1.0 |
| consts.go:48:16:48:19 | "hi" | hi |
| literals.go:3:8:3:12 | "fmt" | fmt |
| literals.go:6:2:6:10 | "decimal" | decimal |
| literals.go:6:17:6:18 | 42 | 42 |
| literals.go:7:2:7:8 | "octal" | octal |
| literals.go:7:17:7:20 | 0600 | 384 |
| literals.go:8:2:8:14 | "hexadecimal" | hexadecimal |
| literals.go:8:17:8:24 | 0xcaffee | 13303790 |
| literals.go:12:2:12:3 | 0. | 0. |
| literals.go:13:2:13:6 | 72.40 | 72.40 |
| literals.go:14:2:14:7 | 072.40 | 072.40 |
| literals.go:15:2:15:8 | 2.71828 | 2.71828 |
| literals.go:16:2:16:6 | 1.e+0 | 1.e+0 |
| literals.go:17:2:17:12 | 6.67428e-11 | 6.67428e-11 |
| literals.go:18:2:18:4 | 1E6 | 1E6 |
| literals.go:19:2:19:4 | .25 | .25 |
| literals.go:20:2:20:10 | .12345E+5 | .12345E+5 |
| literals.go:24:2:24:3 | 0i | 0i |
| literals.go:25:2:25:5 | 011i | 011i |
| literals.go:26:2:26:4 | 0.i | 0.i |
| literals.go:27:2:27:9 | 2.71828i | 2.71828i |
| literals.go:28:2:28:7 | 1.e+0i | 1.e+0i |
| literals.go:29:2:29:13 | 6.67428e-11i | 6.67428e-11i |
| literals.go:30:2:30:5 | 1E6i | 1E6i |
| literals.go:31:2:31:5 | .25i | .25i |
| literals.go:32:2:32:11 | .12345E+5i | .12345E+5i |
| literals.go:36:2:36:4 | 'a' | a |
| literals.go:37:2:37:5 | '\u00e4' | \u00e4 |
| literals.go:38:2:38:6 | '\u672c' | \u672c |
| literals.go:39:2:39:5 | '\\t' | \t |
| literals.go:40:2:40:7 | '\\007' | \u0007 |
| literals.go:41:2:41:7 | '\\377' | \ufffd |
| literals.go:42:2:42:7 | '\\x07' | \u0007 |
| literals.go:43:2:43:7 | '\\xff' | \ufffd |
| literals.go:44:2:44:9 | '\\u12e4' | \u12e4 |
| literals.go:45:2:45:13 | '\\U00101234' | \udbc4\ude34 |
| literals.go:46:2:46:5 | '\\'' | ' |
| literals.go:50:2:50:6 | `abc` | abc |
| literals.go:51:2:52:3 | `\\n,\n\\n` | \\n,\n\\n |
| literals.go:53:2:53:5 | "\\n" | \n |
| literals.go:54:2:54:5 | "\\"" | " |
| literals.go:55:2:55:18 | "Hello, world!\\n" | Hello, world!\n |
| literals.go:56:2:56:12 | "\u65e5\u672c\u8a9e" | \u65e5\u672c\u8a9e |
| literals.go:57:2:57:22 | "\\u65e5\u672c\\U00008a9e" | \u65e5\u672c\u8a9e |
| literals.go:58:2:58:13 | "\\xff\\u00FF" | \ufffd\u00ff |
| literals.go:67:22:67:27 | "\ud83d\udcff" | \ud83d\udcff |
| literals.go:67:31:67:32 | "" | |
| literals.go:8:2:8:10 | "decimal" | decimal |
| literals.go:8:17:8:18 | 42 | 42 |
| literals.go:9:2:9:8 | "octal" | octal |
| literals.go:9:17:9:20 | 0600 | 384 |
| literals.go:10:2:10:14 | "hexadecimal" | hexadecimal |
| literals.go:10:17:10:24 | 0xcaffee | 13303790 |
| literals.go:14:2:14:3 | 0. | 0. |
| literals.go:15:2:15:6 | 72.40 | 72.40 |
| literals.go:16:2:16:7 | 072.40 | 072.40 |
| literals.go:17:2:17:8 | 2.71828 | 2.71828 |
| literals.go:18:2:18:6 | 1.e+0 | 1.e+0 |
| literals.go:19:2:19:12 | 6.67428e-11 | 6.67428e-11 |
| literals.go:20:2:20:4 | 1E6 | 1E6 |
| literals.go:21:2:21:4 | .25 | .25 |
| literals.go:22:2:22:10 | .12345E+5 | .12345E+5 |
| literals.go:26:2:26:3 | 0i | 0i |
| literals.go:27:2:27:5 | 011i | 011i |
| literals.go:28:2:28:4 | 0.i | 0.i |
| literals.go:29:2:29:9 | 2.71828i | 2.71828i |
| literals.go:30:2:30:7 | 1.e+0i | 1.e+0i |
| literals.go:31:2:31:13 | 6.67428e-11i | 6.67428e-11i |
| literals.go:32:2:32:5 | 1E6i | 1E6i |
| literals.go:33:2:33:5 | .25i | .25i |
| literals.go:34:2:34:11 | .12345E+5i | .12345E+5i |
| literals.go:38:2:38:4 | 'a' | a |
| literals.go:39:2:39:5 | '\u00e4' | \u00e4 |
| literals.go:40:2:40:6 | '\u672c' | \u672c |
| literals.go:41:2:41:5 | '\\t' | \t |
| literals.go:42:2:42:7 | '\\007' | \u0007 |
| literals.go:43:2:43:7 | '\\377' | \ufffd |
| literals.go:44:2:44:7 | '\\x07' | \u0007 |
| literals.go:45:2:45:7 | '\\xff' | \ufffd |
| literals.go:46:2:46:9 | '\\u12e4' | \u12e4 |
| literals.go:47:2:47:13 | '\\U00101234' | \udbc4\ude34 |
| literals.go:48:2:48:5 | '\\'' | ' |
| literals.go:52:2:52:6 | `abc` | abc |
| literals.go:53:2:54:3 | `\\n,\n\\n` | \\n,\n\\n |
| literals.go:55:2:55:5 | "\\n" | \n |
| literals.go:56:2:56:5 | "\\"" | " |
| literals.go:57:2:57:18 | "Hello, world!\\n" | Hello, world!\n |
| literals.go:58:2:58:12 | "\u65e5\u672c\u8a9e" | \u65e5\u672c\u8a9e |
| literals.go:59:2:59:22 | "\\u65e5\u672c\\U00008a9e" | \u65e5\u672c\u8a9e |
| literals.go:60:2:60:13 | "\\xff\\u00FF" | \ufffd\u00ff |
| literals.go:69:22:69:27 | "\ud83d\udcff" | \ud83d\udcff |
| literals.go:69:31:69:32 | "" | |

View File

@@ -1,43 +1,43 @@
| literals.go:5:15:9:1 | map literal | 0 | key | literals.go:6:2:6:10 | "decimal" |
| literals.go:5:15:9:1 | map literal | 0 | value | literals.go:6:17:6:18 | 42 |
| literals.go:5:15:9:1 | map literal | 1 | key | literals.go:7:2:7:8 | "octal" |
| literals.go:5:15:9:1 | map literal | 1 | value | literals.go:7:17:7:20 | 0600 |
| literals.go:5:15:9:1 | map literal | 2 | key | literals.go:8:2:8:14 | "hexadecimal" |
| literals.go:5:15:9:1 | map literal | 2 | value | literals.go:8:17:8:24 | 0xcaffee |
| literals.go:11:17:21:1 | slice literal | 0 | value | literals.go:12:2:12:3 | 0. |
| literals.go:11:17:21:1 | slice literal | 1 | value | literals.go:13:2:13:6 | 72.40 |
| literals.go:11:17:21:1 | slice literal | 2 | value | literals.go:14:2:14:7 | 072.40 |
| literals.go:11:17:21:1 | slice literal | 3 | value | literals.go:15:2:15:8 | 2.71828 |
| literals.go:11:17:21:1 | slice literal | 4 | value | literals.go:16:2:16:6 | 1.e+0 |
| literals.go:11:17:21:1 | slice literal | 5 | value | literals.go:17:2:17:12 | 6.67428e-11 |
| literals.go:11:17:21:1 | slice literal | 6 | value | literals.go:18:2:18:4 | 1E6 |
| literals.go:11:17:21:1 | slice literal | 7 | value | literals.go:19:2:19:4 | .25 |
| literals.go:11:17:21:1 | slice literal | 8 | value | literals.go:20:2:20:10 | .12345E+5 |
| literals.go:23:16:33:1 | slice literal | 0 | value | literals.go:24:2:24:3 | 0i |
| literals.go:23:16:33:1 | slice literal | 1 | value | literals.go:25:2:25:5 | 011i |
| literals.go:23:16:33:1 | slice literal | 2 | value | literals.go:26:2:26:4 | 0.i |
| literals.go:23:16:33:1 | slice literal | 3 | value | literals.go:27:2:27:9 | 2.71828i |
| literals.go:23:16:33:1 | slice literal | 4 | value | literals.go:28:2:28:7 | 1.e+0i |
| literals.go:23:16:33:1 | slice literal | 5 | value | literals.go:29:2:29:13 | 6.67428e-11i |
| literals.go:23:16:33:1 | slice literal | 6 | value | literals.go:30:2:30:5 | 1E6i |
| literals.go:23:16:33:1 | slice literal | 7 | value | literals.go:31:2:31:5 | .25i |
| literals.go:23:16:33:1 | slice literal | 8 | value | literals.go:32:2:32:11 | .12345E+5i |
| literals.go:35:16:47:1 | slice literal | 0 | value | literals.go:36:2:36:4 | 'a' |
| literals.go:35:16:47:1 | slice literal | 1 | value | literals.go:37:2:37:5 | '\u00e4' |
| literals.go:35:16:47:1 | slice literal | 2 | value | literals.go:38:2:38:6 | '\u672c' |
| literals.go:35:16:47:1 | slice literal | 3 | value | literals.go:39:2:39:5 | '\\t' |
| literals.go:35:16:47:1 | slice literal | 4 | value | literals.go:40:2:40:7 | '\\007' |
| literals.go:35:16:47:1 | slice literal | 5 | value | literals.go:41:2:41:7 | '\\377' |
| literals.go:35:16:47:1 | slice literal | 6 | value | literals.go:42:2:42:7 | '\\x07' |
| literals.go:35:16:47:1 | slice literal | 7 | value | literals.go:43:2:43:7 | '\\xff' |
| literals.go:35:16:47:1 | slice literal | 8 | value | literals.go:44:2:44:9 | '\\u12e4' |
| literals.go:35:16:47:1 | slice literal | 9 | value | literals.go:45:2:45:13 | '\\U00101234' |
| literals.go:35:16:47:1 | slice literal | 10 | value | literals.go:46:2:46:5 | '\\'' |
| literals.go:49:15:59:1 | slice literal | 0 | value | literals.go:50:2:50:6 | `abc` |
| literals.go:49:15:59:1 | slice literal | 1 | value | literals.go:51:2:52:3 | `\\n,\n\\n` |
| literals.go:49:15:59:1 | slice literal | 2 | value | literals.go:53:2:53:5 | "\\n" |
| literals.go:49:15:59:1 | slice literal | 3 | value | literals.go:54:2:54:5 | "\\"" |
| literals.go:49:15:59:1 | slice literal | 4 | value | literals.go:55:2:55:18 | "Hello, world!\\n" |
| literals.go:49:15:59:1 | slice literal | 5 | value | literals.go:56:2:56:12 | "\u65e5\u672c\u8a9e" |
| literals.go:49:15:59:1 | slice literal | 6 | value | literals.go:57:2:57:22 | "\\u65e5\u672c\\U00008a9e" |
| literals.go:49:15:59:1 | slice literal | 7 | value | literals.go:58:2:58:13 | "\\xff\\u00FF" |
| literals.go:7:15:11:1 | map literal | 0 | key | literals.go:8:2:8:10 | "decimal" |
| literals.go:7:15:11:1 | map literal | 0 | value | literals.go:8:17:8:18 | 42 |
| literals.go:7:15:11:1 | map literal | 1 | key | literals.go:9:2:9:8 | "octal" |
| literals.go:7:15:11:1 | map literal | 1 | value | literals.go:9:17:9:20 | 0600 |
| literals.go:7:15:11:1 | map literal | 2 | key | literals.go:10:2:10:14 | "hexadecimal" |
| literals.go:7:15:11:1 | map literal | 2 | value | literals.go:10:17:10:24 | 0xcaffee |
| literals.go:13:17:23:1 | slice literal | 0 | value | literals.go:14:2:14:3 | 0. |
| literals.go:13:17:23:1 | slice literal | 1 | value | literals.go:15:2:15:6 | 72.40 |
| literals.go:13:17:23:1 | slice literal | 2 | value | literals.go:16:2:16:7 | 072.40 |
| literals.go:13:17:23:1 | slice literal | 3 | value | literals.go:17:2:17:8 | 2.71828 |
| literals.go:13:17:23:1 | slice literal | 4 | value | literals.go:18:2:18:6 | 1.e+0 |
| literals.go:13:17:23:1 | slice literal | 5 | value | literals.go:19:2:19:12 | 6.67428e-11 |
| literals.go:13:17:23:1 | slice literal | 6 | value | literals.go:20:2:20:4 | 1E6 |
| literals.go:13:17:23:1 | slice literal | 7 | value | literals.go:21:2:21:4 | .25 |
| literals.go:13:17:23:1 | slice literal | 8 | value | literals.go:22:2:22:10 | .12345E+5 |
| literals.go:25:16:35:1 | slice literal | 0 | value | literals.go:26:2:26:3 | 0i |
| literals.go:25:16:35:1 | slice literal | 1 | value | literals.go:27:2:27:5 | 011i |
| literals.go:25:16:35:1 | slice literal | 2 | value | literals.go:28:2:28:4 | 0.i |
| literals.go:25:16:35:1 | slice literal | 3 | value | literals.go:29:2:29:9 | 2.71828i |
| literals.go:25:16:35:1 | slice literal | 4 | value | literals.go:30:2:30:7 | 1.e+0i |
| literals.go:25:16:35:1 | slice literal | 5 | value | literals.go:31:2:31:13 | 6.67428e-11i |
| literals.go:25:16:35:1 | slice literal | 6 | value | literals.go:32:2:32:5 | 1E6i |
| literals.go:25:16:35:1 | slice literal | 7 | value | literals.go:33:2:33:5 | .25i |
| literals.go:25:16:35:1 | slice literal | 8 | value | literals.go:34:2:34:11 | .12345E+5i |
| literals.go:37:16:49:1 | slice literal | 0 | value | literals.go:38:2:38:4 | 'a' |
| literals.go:37:16:49:1 | slice literal | 1 | value | literals.go:39:2:39:5 | '\u00e4' |
| literals.go:37:16:49:1 | slice literal | 2 | value | literals.go:40:2:40:6 | '\u672c' |
| literals.go:37:16:49:1 | slice literal | 3 | value | literals.go:41:2:41:5 | '\\t' |
| literals.go:37:16:49:1 | slice literal | 4 | value | literals.go:42:2:42:7 | '\\007' |
| literals.go:37:16:49:1 | slice literal | 5 | value | literals.go:43:2:43:7 | '\\377' |
| literals.go:37:16:49:1 | slice literal | 6 | value | literals.go:44:2:44:7 | '\\x07' |
| literals.go:37:16:49:1 | slice literal | 7 | value | literals.go:45:2:45:7 | '\\xff' |
| literals.go:37:16:49:1 | slice literal | 8 | value | literals.go:46:2:46:9 | '\\u12e4' |
| literals.go:37:16:49:1 | slice literal | 9 | value | literals.go:47:2:47:13 | '\\U00101234' |
| literals.go:37:16:49:1 | slice literal | 10 | value | literals.go:48:2:48:5 | '\\'' |
| literals.go:51:15:61:1 | slice literal | 0 | value | literals.go:52:2:52:6 | `abc` |
| literals.go:51:15:61:1 | slice literal | 1 | value | literals.go:53:2:54:3 | `\\n,\n\\n` |
| literals.go:51:15:61:1 | slice literal | 2 | value | literals.go:55:2:55:5 | "\\n" |
| literals.go:51:15:61:1 | slice literal | 3 | value | literals.go:56:2:56:5 | "\\"" |
| literals.go:51:15:61:1 | slice literal | 4 | value | literals.go:57:2:57:18 | "Hello, world!\\n" |
| literals.go:51:15:61:1 | slice literal | 5 | value | literals.go:58:2:58:12 | "\u65e5\u672c\u8a9e" |
| literals.go:51:15:61:1 | slice literal | 6 | value | literals.go:59:2:59:22 | "\\u65e5\u672c\\U00008a9e" |
| literals.go:51:15:61:1 | slice literal | 7 | value | literals.go:60:2:60:13 | "\\xff\\u00FF" |

View File

@@ -59,22 +59,22 @@
| consts.go:48:2:48:2 | m |
| consts.go:48:4:48:11 | mystring |
| literals.go:1:9:1:12 | main |
| literals.go:5:5:5:11 | intlits |
| literals.go:5:19:5:24 | string |
| literals.go:5:26:5:28 | int |
| literals.go:11:5:11:13 | floatlits |
| literals.go:11:19:11:25 | float64 |
| literals.go:23:5:23:12 | imaglits |
| literals.go:23:18:23:26 | complex64 |
| literals.go:35:5:35:12 | runelits |
| literals.go:35:18:35:20 | int |
| literals.go:49:5:49:11 | strlits |
| literals.go:49:17:49:22 | string |
| literals.go:61:6:61:13 | literals |
| literals.go:62:6:62:6 | _ |
| literals.go:62:9:62:11 | str |
| literals.go:62:22:62:28 | strlits |
| literals.go:63:3:63:5 | fmt |
| literals.go:63:7:63:13 | Println |
| literals.go:63:15:63:17 | str |
| literals.go:67:5:67:18 | non_bmp_strlit |
| literals.go:7:5:7:11 | intlits |
| literals.go:7:19:7:24 | string |
| literals.go:7:26:7:28 | int |
| literals.go:13:5:13:13 | floatlits |
| literals.go:13:19:13:25 | float64 |
| literals.go:25:5:25:12 | imaglits |
| literals.go:25:18:25:26 | complex64 |
| literals.go:37:5:37:12 | runelits |
| literals.go:37:18:37:20 | int |
| literals.go:51:5:51:11 | strlits |
| literals.go:51:17:51:22 | string |
| literals.go:63:6:63:13 | literals |
| literals.go:64:6:64:6 | _ |
| literals.go:64:9:64:11 | str |
| literals.go:64:22:64:28 | strlits |
| literals.go:65:3:65:5 | fmt |
| literals.go:65:7:65:13 | Println |
| literals.go:65:15:65:17 | str |
| literals.go:69:5:69:18 | non_bmp_strlit |

View File

@@ -2,6 +2,8 @@ package main
import "fmt"
// autoformat-ignore (we intentionally test unconventional capitalisation of literals like 1E1i)
var intlits = map[string]int{
"decimal": 42,
"octal": 0600,

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,8 @@ import "fmt"
// NOTE: after auto-formatting this file, make sure to put back the empty statement on line 15 below
// autoformat-ignore (in line with the NOTE above)
// simple statements and for loops
func test5(b bool) {
{

View File

@@ -933,297 +933,297 @@
| stmts8.go:13:2:13:13 | return statement | stmts8.go:14:1:14:1 | exit |
| stmts8.go:13:9:13:13 | false | stmts8.go:13:2:13:13 | return statement |
| stmts.go:0:0:0:0 | entry | stmts.go:3:1:3:12 | skip |
| stmts.go:3:1:3:12 | skip | stmts.go:8:6:8:10 | skip |
| stmts.go:8:1:8:1 | entry | stmts.go:8:12:8:12 | argument corresponding to b |
| stmts.go:8:1:41:1 | function declaration | stmts.go:44:6:44:10 | skip |
| stmts.go:8:6:8:10 | skip | stmts.go:8:1:41:1 | function declaration |
| stmts.go:8:12:8:12 | argument corresponding to b | stmts.go:8:12:8:12 | initialization of b |
| stmts.go:8:12:8:12 | initialization of b | stmts.go:10:7:10:7 | b |
| stmts.go:10:6:10:7 | !... | stmts.go:10:7:10:7 | !... is false |
| stmts.go:10:6:10:7 | !... | stmts.go:10:7:10:7 | !... is true |
| stmts.go:10:7:10:7 | !... is false | stmts.go:13:3:14:3 | skip |
| stmts.go:10:7:10:7 | !... is true | stmts.go:11:4:11:13 | skip |
| stmts.go:10:7:10:7 | b | stmts.go:10:6:10:7 | !... |
| stmts.go:11:4:11:13 | skip | stmts.go:21:6:21:9 | true |
| stmts.go:13:3:14:3 | skip | stmts.go:15:3:15:3 | skip |
| stmts.go:15:3:15:3 | skip | stmts.go:18:2:18:12 | selection of Println |
| stmts.go:18:2:18:12 | selection of Println | stmts.go:18:14:18:17 | "Hi" |
| stmts.go:18:2:18:18 | call to Println | stmts.go:21:6:21:9 | true |
| stmts.go:18:2:18:18 | call to Println | stmts.go:41:1:41:1 | exit |
| stmts.go:18:14:18:17 | "Hi" | stmts.go:18:2:18:18 | call to Println |
| stmts.go:21:6:21:9 | true | stmts.go:21:9:21:9 | true is true |
| stmts.go:21:9:21:9 | true is false | stmts.go:37:2:37:2 | skip |
| stmts.go:21:9:21:9 | true is true | stmts.go:22:7:22:7 | skip |
| stmts.go:22:7:22:7 | assignment to i | stmts.go:22:15:22:15 | i |
| stmts.go:22:7:22:7 | skip | stmts.go:22:12:22:12 | 0 |
| stmts.go:22:12:22:12 | 0 | stmts.go:22:7:22:7 | assignment to i |
| stmts.go:22:15:22:15 | i | stmts.go:22:19:22:20 | 10 |
| stmts.go:22:15:22:20 | ...<... | stmts.go:22:20:22:20 | ...<... is false |
| stmts.go:22:15:22:20 | ...<... | stmts.go:22:20:22:20 | ...<... is true |
| stmts.go:22:19:22:20 | 10 | stmts.go:22:15:22:20 | ...<... |
| stmts.go:22:20:22:20 | ...<... is false | stmts.go:21:6:21:9 | true |
| stmts.go:22:20:22:20 | ...<... is true | stmts.go:23:7:23:7 | skip |
| stmts.go:22:23:22:23 | i | stmts.go:22:23:22:25 | 1 |
| stmts.go:22:23:22:25 | 1 | stmts.go:22:23:22:25 | rhs of increment statement |
| stmts.go:22:23:22:25 | increment statement | stmts.go:22:15:22:15 | i |
| stmts.go:22:23:22:25 | rhs of increment statement | stmts.go:22:23:22:25 | increment statement |
| stmts.go:23:7:23:7 | assignment to j | stmts.go:23:19:23:19 | j |
| stmts.go:23:7:23:7 | skip | stmts.go:23:12:23:12 | i |
| stmts.go:23:12:23:12 | i | stmts.go:23:16:23:16 | 1 |
| stmts.go:23:12:23:16 | ...-... | stmts.go:23:7:23:7 | assignment to j |
| stmts.go:23:16:23:16 | 1 | stmts.go:23:12:23:16 | ...-... |
| stmts.go:23:19:23:19 | j | stmts.go:23:23:23:23 | 5 |
| stmts.go:23:19:23:23 | ...>... | stmts.go:23:23:23:23 | ...>... is false |
| stmts.go:23:19:23:23 | ...>... | stmts.go:23:23:23:23 | ...>... is true |
| stmts.go:23:23:23:23 | 5 | stmts.go:23:19:23:23 | ...>... |
| stmts.go:23:23:23:23 | ...>... is false | stmts.go:25:14:25:14 | i |
| stmts.go:23:23:23:23 | ...>... is true | stmts.go:24:5:24:15 | skip |
| stmts.go:24:5:24:15 | skip | stmts.go:37:2:37:2 | skip |
| stmts.go:25:14:25:14 | i | stmts.go:25:18:25:18 | 3 |
| stmts.go:25:14:25:18 | ...<... | stmts.go:25:18:25:18 | ...<... is false |
| stmts.go:25:14:25:18 | ...<... | stmts.go:25:18:25:18 | ...<... is true |
| stmts.go:25:18:25:18 | 3 | stmts.go:25:14:25:18 | ...<... |
| stmts.go:25:18:25:18 | ...<... is false | stmts.go:27:14:27:14 | i |
| stmts.go:25:18:25:18 | ...<... is true | stmts.go:26:5:26:9 | skip |
| stmts.go:26:5:26:9 | skip | stmts.go:21:6:21:9 | true |
| stmts.go:27:14:27:14 | i | stmts.go:27:19:27:19 | 9 |
| stmts.go:27:14:27:19 | ...!=... | stmts.go:27:19:27:19 | ...!=... is false |
| stmts.go:27:14:27:19 | ...!=... | stmts.go:27:19:27:19 | ...!=... is true |
| stmts.go:27:14:27:19 | ...!=... | stmts.go:41:1:41:1 | exit |
| stmts.go:27:19:27:19 | 9 | stmts.go:27:14:27:19 | ...!=... |
| stmts.go:27:19:27:19 | ...!=... is false | stmts.go:29:14:29:14 | i |
| stmts.go:27:19:27:19 | ...!=... is true | stmts.go:28:5:28:18 | skip |
| stmts.go:28:5:28:18 | skip | stmts.go:21:6:21:9 | true |
| stmts.go:29:14:29:14 | i | stmts.go:29:19:29:19 | 4 |
| stmts.go:29:14:29:19 | ...>=... | stmts.go:29:19:29:19 | ...>=... is false |
| stmts.go:29:14:29:19 | ...>=... | stmts.go:29:19:29:19 | ...>=... is true |
| stmts.go:29:19:29:19 | 4 | stmts.go:29:14:29:19 | ...>=... |
| stmts.go:29:19:29:19 | ...>=... is false | stmts.go:32:5:32:12 | skip |
| stmts.go:29:19:29:19 | ...>=... is true | stmts.go:30:5:30:14 | skip |
| stmts.go:30:5:30:14 | skip | stmts.go:21:6:21:9 | true |
| stmts.go:32:5:32:12 | skip | stmts.go:22:23:22:23 | i |
| stmts.go:37:2:37:2 | assignment to k | stmts.go:39:3:39:12 | skip |
| stmts.go:37:2:37:2 | skip | stmts.go:37:7:37:7 | 9 |
| stmts.go:37:7:37:7 | 9 | stmts.go:37:2:37:2 | assignment to k |
| stmts.go:38:10:38:10 | k | stmts.go:38:10:38:12 | 1 |
| stmts.go:38:10:38:12 | 1 | stmts.go:38:10:38:12 | rhs of increment statement |
| stmts.go:38:10:38:12 | increment statement | stmts.go:39:3:39:12 | skip |
| stmts.go:38:10:38:12 | rhs of increment statement | stmts.go:38:10:38:12 | increment statement |
| stmts.go:39:3:39:12 | skip | stmts.go:21:6:21:9 | true |
| stmts.go:44:1:44:1 | entry | stmts.go:44:12:44:14 | argument corresponding to ch1 |
| stmts.go:44:1:60:1 | function declaration | stmts.go:63:6:63:10 | skip |
| stmts.go:44:6:44:10 | skip | stmts.go:44:1:60:1 | function declaration |
| stmts.go:44:12:44:14 | argument corresponding to ch1 | stmts.go:44:12:44:14 | initialization of ch1 |
| stmts.go:44:12:44:14 | initialization of ch1 | stmts.go:44:26:44:28 | argument corresponding to ch2 |
| stmts.go:44:26:44:28 | argument corresponding to ch2 | stmts.go:44:26:44:28 | initialization of ch2 |
| stmts.go:44:26:44:28 | initialization of ch2 | stmts.go:45:6:45:6 | skip |
| stmts.go:45:6:45:6 | assignment to a | stmts.go:46:6:46:6 | skip |
| stmts.go:45:6:45:6 | skip | stmts.go:45:6:45:6 | zero value for a |
| stmts.go:45:6:45:6 | zero value for a | stmts.go:45:6:45:6 | assignment to a |
| stmts.go:46:6:46:6 | assignment to w | stmts.go:49:9:49:11 | ch1 |
| stmts.go:46:6:46:6 | skip | stmts.go:46:6:46:6 | zero value for w |
| stmts.go:46:6:46:6 | zero value for w | stmts.go:46:6:46:6 | assignment to w |
| stmts.go:48:2:57:2 | select statement | stmts.go:49:7:49:11 | <-... |
| stmts.go:48:2:57:2 | select statement | stmts.go:51:17:51:21 | <-... |
| stmts.go:48:2:57:2 | select statement | stmts.go:55:3:55:13 | selection of Println |
| stmts.go:48:2:57:2 | select statement | stmts.go:56:7:56:15 | send statement |
| stmts.go:49:7:49:11 | <-... | stmts.go:50:3:50:13 | selection of Println |
| stmts.go:49:9:49:11 | ch1 | stmts.go:51:19:51:21 | ch2 |
| stmts.go:50:3:50:13 | selection of Println | stmts.go:50:15:50:30 | "Heard from ch1" |
| stmts.go:50:3:50:31 | call to Println | stmts.go:59:2:59:10 | select statement |
| stmts.go:50:3:50:31 | call to Println | stmts.go:60:1:60:1 | exit |
| stmts.go:50:15:50:30 | "Heard from ch1" | stmts.go:50:3:50:31 | call to Println |
| stmts.go:51:7:51:7 | a | stmts.go:51:9:51:9 | 0 |
| stmts.go:51:7:51:10 | assignment to element | stmts.go:51:7:51:21 | ... = ...[1] |
| stmts.go:51:7:51:10 | skip | stmts.go:51:13:51:13 | skip |
| stmts.go:51:7:51:10 | skip | stmts.go:60:1:60:1 | exit |
| stmts.go:51:7:51:21 | ... = ...[0] | stmts.go:51:7:51:10 | assignment to element |
| stmts.go:51:7:51:21 | ... = ...[1] | stmts.go:51:13:51:13 | assignment to w |
| stmts.go:51:9:51:9 | 0 | stmts.go:51:7:51:10 | skip |
| stmts.go:51:13:51:13 | assignment to w | stmts.go:52:3:52:13 | selection of Println |
| stmts.go:51:13:51:13 | skip | stmts.go:51:7:51:21 | ... = ...[0] |
| stmts.go:51:17:51:21 | <-... | stmts.go:51:7:51:7 | a |
| stmts.go:51:19:51:21 | ch2 | stmts.go:56:7:56:9 | ch1 |
| stmts.go:52:3:52:13 | selection of Println | stmts.go:52:15:52:15 | a |
| stmts.go:52:3:52:16 | call to Println | stmts.go:53:3:53:13 | selection of Println |
| stmts.go:52:3:52:16 | call to Println | stmts.go:60:1:60:1 | exit |
| stmts.go:52:15:52:15 | a | stmts.go:52:3:52:16 | call to Println |
| stmts.go:53:3:53:13 | selection of Println | stmts.go:53:15:53:15 | w |
| stmts.go:53:3:53:16 | call to Println | stmts.go:59:2:59:10 | select statement |
| stmts.go:53:3:53:16 | call to Println | stmts.go:60:1:60:1 | exit |
| stmts.go:53:15:53:15 | w | stmts.go:53:3:53:16 | call to Println |
| stmts.go:55:3:55:13 | selection of Println | stmts.go:55:3:55:15 | call to Println |
| stmts.go:55:3:55:15 | call to Println | stmts.go:59:2:59:10 | select statement |
| stmts.go:55:3:55:15 | call to Println | stmts.go:60:1:60:1 | exit |
| stmts.go:56:2:56:16 | skip | stmts.go:59:2:59:10 | select statement |
| stmts.go:56:7:56:9 | ch1 | stmts.go:56:14:56:15 | 42 |
| stmts.go:56:7:56:15 | send statement | stmts.go:56:2:56:16 | skip |
| stmts.go:56:7:56:15 | send statement | stmts.go:60:1:60:1 | exit |
| stmts.go:56:14:56:15 | 42 | stmts.go:48:2:57:2 | select statement |
| stmts.go:63:1:63:1 | entry | stmts.go:63:12:63:12 | argument corresponding to x |
| stmts.go:63:1:70:1 | function declaration | stmts.go:73:6:73:10 | skip |
| stmts.go:63:6:63:10 | skip | stmts.go:63:1:70:1 | function declaration |
| stmts.go:63:12:63:12 | argument corresponding to x | stmts.go:63:12:63:12 | initialization of x |
| stmts.go:63:12:63:12 | initialization of x | stmts.go:64:5:64:5 | x |
| stmts.go:64:5:64:5 | x | stmts.go:64:9:64:9 | 0 |
| stmts.go:64:5:64:9 | ...>... | stmts.go:64:9:64:9 | ...>... is false |
| stmts.go:64:5:64:9 | ...>... | stmts.go:64:9:64:9 | ...>... is true |
| stmts.go:64:9:64:9 | 0 | stmts.go:64:5:64:9 | ...>... |
| stmts.go:64:9:64:9 | ...>... is false | stmts.go:67:9:67:34 | function literal |
| stmts.go:64:9:64:9 | ...>... is true | stmts.go:65:9:65:33 | function literal |
| stmts.go:65:3:65:35 | defer statement | stmts.go:69:9:69:10 | 42 |
| stmts.go:65:9:65:9 | entry | stmts.go:65:18:65:28 | selection of Println |
| stmts.go:65:9:65:33 | function literal | stmts.go:65:3:65:35 | defer statement |
| stmts.go:65:9:65:35 | function call | stmts.go:70:1:70:1 | exit |
| stmts.go:65:18:65:28 | selection of Println | stmts.go:65:30:65:30 | x |
| stmts.go:65:18:65:31 | call to Println | stmts.go:65:33:65:33 | exit |
| stmts.go:65:30:65:30 | x | stmts.go:65:18:65:31 | call to Println |
| stmts.go:67:3:67:36 | defer statement | stmts.go:69:9:69:10 | 42 |
| stmts.go:3:1:3:12 | skip | stmts.go:10:6:10:10 | skip |
| stmts.go:10:1:10:1 | entry | stmts.go:10:12:10:12 | argument corresponding to b |
| stmts.go:10:1:43:1 | function declaration | stmts.go:46:6:46:10 | skip |
| stmts.go:10:6:10:10 | skip | stmts.go:10:1:43:1 | function declaration |
| stmts.go:10:12:10:12 | argument corresponding to b | stmts.go:10:12:10:12 | initialization of b |
| stmts.go:10:12:10:12 | initialization of b | stmts.go:12:7:12:7 | b |
| stmts.go:12:6:12:7 | !... | stmts.go:12:7:12:7 | !... is false |
| stmts.go:12:6:12:7 | !... | stmts.go:12:7:12:7 | !... is true |
| stmts.go:12:7:12:7 | !... is false | stmts.go:15:3:16:3 | skip |
| stmts.go:12:7:12:7 | !... is true | stmts.go:13:4:13:13 | skip |
| stmts.go:12:7:12:7 | b | stmts.go:12:6:12:7 | !... |
| stmts.go:13:4:13:13 | skip | stmts.go:23:6:23:9 | true |
| stmts.go:15:3:16:3 | skip | stmts.go:17:3:17:3 | skip |
| stmts.go:17:3:17:3 | skip | stmts.go:20:2:20:12 | selection of Println |
| stmts.go:20:2:20:12 | selection of Println | stmts.go:20:14:20:17 | "Hi" |
| stmts.go:20:2:20:18 | call to Println | stmts.go:23:6:23:9 | true |
| stmts.go:20:2:20:18 | call to Println | stmts.go:43:1:43:1 | exit |
| stmts.go:20:14:20:17 | "Hi" | stmts.go:20:2:20:18 | call to Println |
| stmts.go:23:6:23:9 | true | stmts.go:23:9:23:9 | true is true |
| stmts.go:23:9:23:9 | true is false | stmts.go:39:2:39:2 | skip |
| stmts.go:23:9:23:9 | true is true | stmts.go:24:7:24:7 | skip |
| stmts.go:24:7:24:7 | assignment to i | stmts.go:24:15:24:15 | i |
| stmts.go:24:7:24:7 | skip | stmts.go:24:12:24:12 | 0 |
| stmts.go:24:12:24:12 | 0 | stmts.go:24:7:24:7 | assignment to i |
| stmts.go:24:15:24:15 | i | stmts.go:24:19:24:20 | 10 |
| stmts.go:24:15:24:20 | ...<... | stmts.go:24:20:24:20 | ...<... is false |
| stmts.go:24:15:24:20 | ...<... | stmts.go:24:20:24:20 | ...<... is true |
| stmts.go:24:19:24:20 | 10 | stmts.go:24:15:24:20 | ...<... |
| stmts.go:24:20:24:20 | ...<... is false | stmts.go:23:6:23:9 | true |
| stmts.go:24:20:24:20 | ...<... is true | stmts.go:25:7:25:7 | skip |
| stmts.go:24:23:24:23 | i | stmts.go:24:23:24:25 | 1 |
| stmts.go:24:23:24:25 | 1 | stmts.go:24:23:24:25 | rhs of increment statement |
| stmts.go:24:23:24:25 | increment statement | stmts.go:24:15:24:15 | i |
| stmts.go:24:23:24:25 | rhs of increment statement | stmts.go:24:23:24:25 | increment statement |
| stmts.go:25:7:25:7 | assignment to j | stmts.go:25:19:25:19 | j |
| stmts.go:25:7:25:7 | skip | stmts.go:25:12:25:12 | i |
| stmts.go:25:12:25:12 | i | stmts.go:25:16:25:16 | 1 |
| stmts.go:25:12:25:16 | ...-... | stmts.go:25:7:25:7 | assignment to j |
| stmts.go:25:16:25:16 | 1 | stmts.go:25:12:25:16 | ...-... |
| stmts.go:25:19:25:19 | j | stmts.go:25:23:25:23 | 5 |
| stmts.go:25:19:25:23 | ...>... | stmts.go:25:23:25:23 | ...>... is false |
| stmts.go:25:19:25:23 | ...>... | stmts.go:25:23:25:23 | ...>... is true |
| stmts.go:25:23:25:23 | 5 | stmts.go:25:19:25:23 | ...>... |
| stmts.go:25:23:25:23 | ...>... is false | stmts.go:27:14:27:14 | i |
| stmts.go:25:23:25:23 | ...>... is true | stmts.go:26:5:26:15 | skip |
| stmts.go:26:5:26:15 | skip | stmts.go:39:2:39:2 | skip |
| stmts.go:27:14:27:14 | i | stmts.go:27:18:27:18 | 3 |
| stmts.go:27:14:27:18 | ...<... | stmts.go:27:18:27:18 | ...<... is false |
| stmts.go:27:14:27:18 | ...<... | stmts.go:27:18:27:18 | ...<... is true |
| stmts.go:27:18:27:18 | 3 | stmts.go:27:14:27:18 | ...<... |
| stmts.go:27:18:27:18 | ...<... is false | stmts.go:29:14:29:14 | i |
| stmts.go:27:18:27:18 | ...<... is true | stmts.go:28:5:28:9 | skip |
| stmts.go:28:5:28:9 | skip | stmts.go:23:6:23:9 | true |
| stmts.go:29:14:29:14 | i | stmts.go:29:19:29:19 | 9 |
| stmts.go:29:14:29:19 | ...!=... | stmts.go:29:19:29:19 | ...!=... is false |
| stmts.go:29:14:29:19 | ...!=... | stmts.go:29:19:29:19 | ...!=... is true |
| stmts.go:29:14:29:19 | ...!=... | stmts.go:43:1:43:1 | exit |
| stmts.go:29:19:29:19 | 9 | stmts.go:29:14:29:19 | ...!=... |
| stmts.go:29:19:29:19 | ...!=... is false | stmts.go:31:14:31:14 | i |
| stmts.go:29:19:29:19 | ...!=... is true | stmts.go:30:5:30:18 | skip |
| stmts.go:30:5:30:18 | skip | stmts.go:23:6:23:9 | true |
| stmts.go:31:14:31:14 | i | stmts.go:31:19:31:19 | 4 |
| stmts.go:31:14:31:19 | ...>=... | stmts.go:31:19:31:19 | ...>=... is false |
| stmts.go:31:14:31:19 | ...>=... | stmts.go:31:19:31:19 | ...>=... is true |
| stmts.go:31:19:31:19 | 4 | stmts.go:31:14:31:19 | ...>=... |
| stmts.go:31:19:31:19 | ...>=... is false | stmts.go:34:5:34:12 | skip |
| stmts.go:31:19:31:19 | ...>=... is true | stmts.go:32:5:32:14 | skip |
| stmts.go:32:5:32:14 | skip | stmts.go:23:6:23:9 | true |
| stmts.go:34:5:34:12 | skip | stmts.go:24:23:24:23 | i |
| stmts.go:39:2:39:2 | assignment to k | stmts.go:41:3:41:12 | skip |
| stmts.go:39:2:39:2 | skip | stmts.go:39:7:39:7 | 9 |
| stmts.go:39:7:39:7 | 9 | stmts.go:39:2:39:2 | assignment to k |
| stmts.go:40:10:40:10 | k | stmts.go:40:10:40:12 | 1 |
| stmts.go:40:10:40:12 | 1 | stmts.go:40:10:40:12 | rhs of increment statement |
| stmts.go:40:10:40:12 | increment statement | stmts.go:41:3:41:12 | skip |
| stmts.go:40:10:40:12 | rhs of increment statement | stmts.go:40:10:40:12 | increment statement |
| stmts.go:41:3:41:12 | skip | stmts.go:23:6:23:9 | true |
| stmts.go:46:1:46:1 | entry | stmts.go:46:12:46:14 | argument corresponding to ch1 |
| stmts.go:46:1:62:1 | function declaration | stmts.go:65:6:65:10 | skip |
| stmts.go:46:6:46:10 | skip | stmts.go:46:1:62:1 | function declaration |
| stmts.go:46:12:46:14 | argument corresponding to ch1 | stmts.go:46:12:46:14 | initialization of ch1 |
| stmts.go:46:12:46:14 | initialization of ch1 | stmts.go:46:26:46:28 | argument corresponding to ch2 |
| stmts.go:46:26:46:28 | argument corresponding to ch2 | stmts.go:46:26:46:28 | initialization of ch2 |
| stmts.go:46:26:46:28 | initialization of ch2 | stmts.go:47:6:47:6 | skip |
| stmts.go:47:6:47:6 | assignment to a | stmts.go:48:6:48:6 | skip |
| stmts.go:47:6:47:6 | skip | stmts.go:47:6:47:6 | zero value for a |
| stmts.go:47:6:47:6 | zero value for a | stmts.go:47:6:47:6 | assignment to a |
| stmts.go:48:6:48:6 | assignment to w | stmts.go:51:9:51:11 | ch1 |
| stmts.go:48:6:48:6 | skip | stmts.go:48:6:48:6 | zero value for w |
| stmts.go:48:6:48:6 | zero value for w | stmts.go:48:6:48:6 | assignment to w |
| stmts.go:50:2:59:2 | select statement | stmts.go:51:7:51:11 | <-... |
| stmts.go:50:2:59:2 | select statement | stmts.go:53:17:53:21 | <-... |
| stmts.go:50:2:59:2 | select statement | stmts.go:57:3:57:13 | selection of Println |
| stmts.go:50:2:59:2 | select statement | stmts.go:58:7:58:15 | send statement |
| stmts.go:51:7:51:11 | <-... | stmts.go:52:3:52:13 | selection of Println |
| stmts.go:51:9:51:11 | ch1 | stmts.go:53:19:53:21 | ch2 |
| stmts.go:52:3:52:13 | selection of Println | stmts.go:52:15:52:30 | "Heard from ch1" |
| stmts.go:52:3:52:31 | call to Println | stmts.go:61:2:61:10 | select statement |
| stmts.go:52:3:52:31 | call to Println | stmts.go:62:1:62:1 | exit |
| stmts.go:52:15:52:30 | "Heard from ch1" | stmts.go:52:3:52:31 | call to Println |
| stmts.go:53:7:53:7 | a | stmts.go:53:9:53:9 | 0 |
| stmts.go:53:7:53:10 | assignment to element | stmts.go:53:7:53:21 | ... = ...[1] |
| stmts.go:53:7:53:10 | skip | stmts.go:53:13:53:13 | skip |
| stmts.go:53:7:53:10 | skip | stmts.go:62:1:62:1 | exit |
| stmts.go:53:7:53:21 | ... = ...[0] | stmts.go:53:7:53:10 | assignment to element |
| stmts.go:53:7:53:21 | ... = ...[1] | stmts.go:53:13:53:13 | assignment to w |
| stmts.go:53:9:53:9 | 0 | stmts.go:53:7:53:10 | skip |
| stmts.go:53:13:53:13 | assignment to w | stmts.go:54:3:54:13 | selection of Println |
| stmts.go:53:13:53:13 | skip | stmts.go:53:7:53:21 | ... = ...[0] |
| stmts.go:53:17:53:21 | <-... | stmts.go:53:7:53:7 | a |
| stmts.go:53:19:53:21 | ch2 | stmts.go:58:7:58:9 | ch1 |
| stmts.go:54:3:54:13 | selection of Println | stmts.go:54:15:54:15 | a |
| stmts.go:54:3:54:16 | call to Println | stmts.go:55:3:55:13 | selection of Println |
| stmts.go:54:3:54:16 | call to Println | stmts.go:62:1:62:1 | exit |
| stmts.go:54:15:54:15 | a | stmts.go:54:3:54:16 | call to Println |
| stmts.go:55:3:55:13 | selection of Println | stmts.go:55:15:55:15 | w |
| stmts.go:55:3:55:16 | call to Println | stmts.go:61:2:61:10 | select statement |
| stmts.go:55:3:55:16 | call to Println | stmts.go:62:1:62:1 | exit |
| stmts.go:55:15:55:15 | w | stmts.go:55:3:55:16 | call to Println |
| stmts.go:57:3:57:13 | selection of Println | stmts.go:57:3:57:15 | call to Println |
| stmts.go:57:3:57:15 | call to Println | stmts.go:61:2:61:10 | select statement |
| stmts.go:57:3:57:15 | call to Println | stmts.go:62:1:62:1 | exit |
| stmts.go:58:2:58:16 | skip | stmts.go:61:2:61:10 | select statement |
| stmts.go:58:7:58:9 | ch1 | stmts.go:58:14:58:15 | 42 |
| stmts.go:58:7:58:15 | send statement | stmts.go:58:2:58:16 | skip |
| stmts.go:58:7:58:15 | send statement | stmts.go:62:1:62:1 | exit |
| stmts.go:58:14:58:15 | 42 | stmts.go:50:2:59:2 | select statement |
| stmts.go:65:1:65:1 | entry | stmts.go:65:12:65:12 | argument corresponding to x |
| stmts.go:65:1:72:1 | function declaration | stmts.go:75:6:75:10 | skip |
| stmts.go:65:6:65:10 | skip | stmts.go:65:1:72:1 | function declaration |
| stmts.go:65:12:65:12 | argument corresponding to x | stmts.go:65:12:65:12 | initialization of x |
| stmts.go:65:12:65:12 | initialization of x | stmts.go:66:5:66:5 | x |
| stmts.go:66:5:66:5 | x | stmts.go:66:9:66:9 | 0 |
| stmts.go:66:5:66:9 | ...>... | stmts.go:66:9:66:9 | ...>... is false |
| stmts.go:66:5:66:9 | ...>... | stmts.go:66:9:66:9 | ...>... is true |
| stmts.go:66:9:66:9 | 0 | stmts.go:66:5:66:9 | ...>... |
| stmts.go:66:9:66:9 | ...>... is false | stmts.go:69:9:69:34 | function literal |
| stmts.go:66:9:66:9 | ...>... is true | stmts.go:67:9:67:33 | function literal |
| stmts.go:67:3:67:35 | defer statement | stmts.go:71:9:71:10 | 42 |
| stmts.go:67:9:67:9 | entry | stmts.go:67:18:67:28 | selection of Println |
| stmts.go:67:9:67:34 | function literal | stmts.go:67:3:67:36 | defer statement |
| stmts.go:67:9:67:36 | function call | stmts.go:70:1:70:1 | exit |
| stmts.go:67:18:67:28 | selection of Println | stmts.go:67:31:67:31 | x |
| stmts.go:67:18:67:32 | call to Println | stmts.go:67:34:67:34 | exit |
| stmts.go:67:30:67:31 | -... | stmts.go:67:18:67:32 | call to Println |
| stmts.go:67:31:67:31 | x | stmts.go:67:30:67:31 | -... |
| stmts.go:69:2:69:10 | return statement | stmts.go:65:9:65:35 | function call |
| stmts.go:69:2:69:10 | return statement | stmts.go:67:9:67:36 | function call |
| stmts.go:69:9:69:10 | 42 | stmts.go:69:2:69:10 | return statement |
| stmts.go:73:1:73:1 | entry | stmts.go:73:12:73:12 | argument corresponding to x |
| stmts.go:73:1:107:1 | function declaration | stmts.go:110:6:110:10 | skip |
| stmts.go:73:6:73:10 | skip | stmts.go:73:1:107:1 | function declaration |
| stmts.go:73:12:73:12 | argument corresponding to x | stmts.go:73:12:73:12 | initialization of x |
| stmts.go:73:12:73:12 | initialization of x | stmts.go:74:9:74:9 | x |
| stmts.go:74:9:74:9 | x | stmts.go:77:9:77:9 | skip |
| stmts.go:77:9:77:9 | assignment to y | stmts.go:77:17:77:17 | y |
| stmts.go:77:9:77:9 | skip | stmts.go:77:14:77:14 | x |
| stmts.go:77:14:77:14 | x | stmts.go:77:9:77:9 | assignment to y |
| stmts.go:77:17:77:17 | y | stmts.go:77:21:77:22 | 19 |
| stmts.go:77:17:77:22 | ...-... | stmts.go:79:3:79:7 | test5 |
| stmts.go:77:21:77:22 | 19 | stmts.go:77:17:77:22 | ...-... |
| stmts.go:79:3:79:7 | test5 | stmts.go:79:9:79:13 | false |
| stmts.go:79:3:79:14 | call to test5 | stmts.go:107:1:107:1 | exit |
| stmts.go:79:9:79:13 | false | stmts.go:79:3:79:14 | call to test5 |
| stmts.go:82:9:82:9 | x | stmts.go:83:7:83:7 | 1 |
| stmts.go:82:9:82:9 | x | stmts.go:88:9:88:9 | x |
| stmts.go:83:2:83:8 | skip | stmts.go:88:9:88:9 | x |
| stmts.go:83:7:83:7 | 1 | stmts.go:83:7:83:7 | case 1 |
| stmts.go:83:7:83:7 | case 1 | stmts.go:83:2:83:8 | skip |
| stmts.go:83:7:83:7 | case 1 | stmts.go:84:7:84:7 | 2 |
| stmts.go:84:7:84:7 | 2 | stmts.go:84:7:84:7 | case 2 |
| stmts.go:84:7:84:7 | case 2 | stmts.go:84:10:84:10 | 3 |
| stmts.go:84:7:84:7 | case 2 | stmts.go:85:3:85:7 | test5 |
| stmts.go:84:10:84:10 | 3 | stmts.go:84:10:84:10 | case 3 |
| stmts.go:84:10:84:10 | case 3 | stmts.go:85:3:85:7 | test5 |
| stmts.go:84:10:84:10 | case 3 | stmts.go:88:9:88:9 | x |
| stmts.go:85:3:85:7 | test5 | stmts.go:85:9:85:12 | true |
| stmts.go:85:9:85:12 | true | stmts.go:85:3:85:13 | call to test5 |
| stmts.go:88:9:88:9 | x | stmts.go:89:7:89:7 | 1 |
| stmts.go:88:9:88:9 | x | stmts.go:96:9:96:9 | x |
| stmts.go:89:7:89:7 | 1 | stmts.go:89:7:89:7 | case 1 |
| stmts.go:89:7:89:7 | case 1 | stmts.go:90:3:90:7 | test5 |
| stmts.go:89:7:89:7 | case 1 | stmts.go:92:7:92:11 | ...-... |
| stmts.go:90:3:90:7 | test5 | stmts.go:90:9:90:13 | false |
| stmts.go:90:9:90:13 | false | stmts.go:90:3:90:14 | call to test5 |
| stmts.go:91:3:91:13 | skip | stmts.go:93:3:93:7 | test5 |
| stmts.go:92:7:92:11 | ...-... | stmts.go:92:7:92:11 | case ...-... |
| stmts.go:92:7:92:11 | case ...-... | stmts.go:93:3:93:7 | test5 |
| stmts.go:92:7:92:11 | case ...-... | stmts.go:96:9:96:9 | x |
| stmts.go:93:3:93:7 | test5 | stmts.go:93:9:93:12 | true |
| stmts.go:93:9:93:12 | true | stmts.go:93:3:93:13 | call to test5 |
| stmts.go:96:9:96:9 | x | stmts.go:98:7:98:7 | 2 |
| stmts.go:97:2:97:9 | skip | stmts.go:102:2:102:2 | true |
| stmts.go:98:7:98:7 | 2 | stmts.go:98:7:98:7 | case 2 |
| stmts.go:98:7:98:7 | case 2 | stmts.go:97:2:97:9 | skip |
| stmts.go:98:7:98:7 | case 2 | stmts.go:99:3:99:7 | test5 |
| stmts.go:99:3:99:7 | test5 | stmts.go:99:9:99:12 | true |
| stmts.go:99:9:99:12 | true | stmts.go:99:3:99:13 | call to test5 |
| stmts.go:102:2:102:2 | true | stmts.go:105:7:105:10 | true |
| stmts.go:105:7:105:10 | case true | stmts.go:105:10:105:10 | true is false |
| stmts.go:105:7:105:10 | case true | stmts.go:105:10:105:10 | true is true |
| stmts.go:105:7:105:10 | true | stmts.go:105:7:105:10 | case true |
| stmts.go:105:10:105:10 | true is false | stmts.go:104:3:104:7 | skip |
| stmts.go:105:10:105:10 | true is true | stmts.go:105:2:105:11 | skip |
| stmts.go:110:1:110:1 | entry | stmts.go:110:12:110:12 | argument corresponding to x |
| stmts.go:110:1:123:1 | function declaration | stmts.go:126:6:126:11 | skip |
| stmts.go:110:6:110:10 | skip | stmts.go:110:1:123:1 | function declaration |
| stmts.go:110:12:110:12 | argument corresponding to x | stmts.go:110:12:110:12 | initialization of x |
| stmts.go:110:12:110:12 | initialization of x | stmts.go:111:9:111:9 | skip |
| stmts.go:111:9:111:9 | assignment to y | stmts.go:112:7:112:11 | case error |
| stmts.go:111:9:111:9 | assignment to y | stmts.go:119:9:119:9 | skip |
| stmts.go:111:9:111:9 | skip | stmts.go:111:14:111:14 | x |
| stmts.go:111:14:111:14 | x | stmts.go:111:14:111:21 | type assertion |
| stmts.go:111:14:111:21 | type assertion | stmts.go:111:9:111:9 | assignment to y |
| stmts.go:112:7:112:11 | case error | stmts.go:112:14:112:19 | case string |
| stmts.go:112:7:112:11 | case error | stmts.go:113:3:113:13 | selection of Println |
| stmts.go:112:14:112:19 | case string | stmts.go:113:3:113:13 | selection of Println |
| stmts.go:112:14:112:19 | case string | stmts.go:114:7:114:13 | case float32 |
| stmts.go:113:3:113:13 | selection of Println | stmts.go:113:15:113:15 | y |
| stmts.go:113:3:113:16 | call to Println | stmts.go:119:9:119:9 | skip |
| stmts.go:113:3:113:16 | call to Println | stmts.go:123:1:123:1 | exit |
| stmts.go:113:15:113:15 | y | stmts.go:113:3:113:16 | call to Println |
| stmts.go:114:7:114:13 | case float32 | stmts.go:115:3:115:7 | test5 |
| stmts.go:114:7:114:13 | case float32 | stmts.go:119:9:119:9 | skip |
| stmts.go:115:3:115:7 | test5 | stmts.go:115:9:115:12 | true |
| stmts.go:115:3:115:13 | call to test5 | stmts.go:123:1:123:1 | exit |
| stmts.go:115:9:115:12 | true | stmts.go:115:3:115:13 | call to test5 |
| stmts.go:116:3:116:7 | test5 | stmts.go:116:9:116:13 | false |
| stmts.go:116:9:116:13 | false | stmts.go:116:3:116:14 | call to test5 |
| stmts.go:119:9:119:9 | assignment to y | stmts.go:119:17:119:17 | y |
| stmts.go:119:9:119:9 | skip | stmts.go:119:14:119:14 | x |
| stmts.go:119:14:119:14 | x | stmts.go:119:9:119:9 | assignment to y |
| stmts.go:119:17:119:17 | y | stmts.go:119:17:119:24 | type assertion |
| stmts.go:119:17:119:24 | type assertion | stmts.go:121:3:121:7 | test5 |
| stmts.go:121:3:121:7 | test5 | stmts.go:121:9:121:13 | false |
| stmts.go:121:3:121:14 | call to test5 | stmts.go:123:1:123:1 | exit |
| stmts.go:121:9:121:13 | false | stmts.go:121:3:121:14 | call to test5 |
| stmts.go:126:1:126:1 | entry | stmts.go:126:13:126:13 | argument corresponding to f |
| stmts.go:126:1:128:1 | function declaration | stmts.go:131:6:131:11 | skip |
| stmts.go:126:6:126:11 | skip | stmts.go:126:1:128:1 | function declaration |
| stmts.go:126:13:126:13 | argument corresponding to f | stmts.go:126:13:126:13 | initialization of f |
| stmts.go:126:13:126:13 | initialization of f | stmts.go:127:5:127:5 | f |
| stmts.go:127:2:127:7 | go statement | stmts.go:128:1:128:1 | exit |
| stmts.go:127:5:127:5 | f | stmts.go:127:2:127:7 | go statement |
| stmts.go:131:1:131:1 | entry | stmts.go:131:13:131:14 | argument corresponding to xs |
| stmts.go:131:1:145:1 | function declaration | stmts.go:0:0:0:0 | exit |
| stmts.go:131:6:131:11 | skip | stmts.go:131:1:145:1 | function declaration |
| stmts.go:131:13:131:14 | argument corresponding to xs | stmts.go:131:13:131:14 | initialization of xs |
| stmts.go:131:13:131:14 | initialization of xs | stmts.go:132:17:132:18 | xs |
| stmts.go:132:2:137:2 | range statement[0] | stmts.go:132:6:132:6 | assignment to x |
| stmts.go:132:6:132:6 | assignment to x | stmts.go:133:6:133:6 | x |
| stmts.go:132:6:132:6 | skip | stmts.go:132:2:137:2 | range statement[0] |
| stmts.go:132:17:132:18 | next key-value pair in range | stmts.go:132:6:132:6 | skip |
| stmts.go:132:17:132:18 | next key-value pair in range | stmts.go:139:20:139:21 | xs |
| stmts.go:132:17:132:18 | xs | stmts.go:132:17:132:18 | next key-value pair in range |
| stmts.go:133:6:133:6 | x | stmts.go:133:10:133:10 | 5 |
| stmts.go:133:6:133:10 | ...>... | stmts.go:133:10:133:10 | ...>... is false |
| stmts.go:133:6:133:10 | ...>... | stmts.go:133:10:133:10 | ...>... is true |
| stmts.go:133:10:133:10 | 5 | stmts.go:133:6:133:10 | ...>... |
| stmts.go:133:10:133:10 | ...>... is false | stmts.go:136:3:136:11 | selection of Print |
| stmts.go:133:10:133:10 | ...>... is true | stmts.go:134:4:134:11 | skip |
| stmts.go:134:4:134:11 | skip | stmts.go:132:17:132:18 | next key-value pair in range |
| stmts.go:136:3:136:11 | selection of Print | stmts.go:136:13:136:13 | x |
| stmts.go:136:3:136:14 | call to Print | stmts.go:132:17:132:18 | next key-value pair in range |
| stmts.go:136:3:136:14 | call to Print | stmts.go:145:1:145:1 | exit |
| stmts.go:136:13:136:13 | x | stmts.go:136:3:136:14 | call to Print |
| stmts.go:139:2:141:2 | range statement[0] | stmts.go:139:2:141:2 | range statement[1] |
| stmts.go:139:2:141:2 | range statement[1] | stmts.go:139:6:139:6 | assignment to i |
| stmts.go:139:6:139:6 | assignment to i | stmts.go:139:9:139:9 | assignment to v |
| stmts.go:139:6:139:6 | skip | stmts.go:139:9:139:9 | skip |
| stmts.go:139:9:139:9 | assignment to v | stmts.go:140:3:140:11 | selection of Print |
| stmts.go:139:9:139:9 | skip | stmts.go:139:2:141:2 | range statement[0] |
| stmts.go:139:20:139:21 | next key-value pair in range | stmts.go:139:6:139:6 | skip |
| stmts.go:139:20:139:21 | next key-value pair in range | stmts.go:143:12:143:13 | xs |
| stmts.go:139:20:139:21 | xs | stmts.go:139:20:139:21 | next key-value pair in range |
| stmts.go:140:3:140:11 | selection of Print | stmts.go:140:13:140:13 | i |
| stmts.go:140:3:140:17 | call to Print | stmts.go:139:20:139:21 | next key-value pair in range |
| stmts.go:140:3:140:17 | call to Print | stmts.go:145:1:145:1 | exit |
| stmts.go:140:13:140:13 | i | stmts.go:140:16:140:16 | v |
| stmts.go:140:16:140:16 | v | stmts.go:140:3:140:17 | call to Print |
| stmts.go:143:12:143:13 | next key-value pair in range | stmts.go:143:15:144:2 | skip |
| stmts.go:143:12:143:13 | next key-value pair in range | stmts.go:145:1:145:1 | exit |
| stmts.go:143:12:143:13 | xs | stmts.go:143:12:143:13 | next key-value pair in range |
| stmts.go:143:15:144:2 | skip | stmts.go:143:12:143:13 | next key-value pair in range |
| stmts.go:67:9:67:33 | function literal | stmts.go:67:3:67:35 | defer statement |
| stmts.go:67:9:67:35 | function call | stmts.go:72:1:72:1 | exit |
| stmts.go:67:18:67:28 | selection of Println | stmts.go:67:30:67:30 | x |
| stmts.go:67:18:67:31 | call to Println | stmts.go:67:33:67:33 | exit |
| stmts.go:67:30:67:30 | x | stmts.go:67:18:67:31 | call to Println |
| stmts.go:69:3:69:36 | defer statement | stmts.go:71:9:71:10 | 42 |
| stmts.go:69:9:69:9 | entry | stmts.go:69:18:69:28 | selection of Println |
| stmts.go:69:9:69:34 | function literal | stmts.go:69:3:69:36 | defer statement |
| stmts.go:69:9:69:36 | function call | stmts.go:72:1:72:1 | exit |
| stmts.go:69:18:69:28 | selection of Println | stmts.go:69:31:69:31 | x |
| stmts.go:69:18:69:32 | call to Println | stmts.go:69:34:69:34 | exit |
| stmts.go:69:30:69:31 | -... | stmts.go:69:18:69:32 | call to Println |
| stmts.go:69:31:69:31 | x | stmts.go:69:30:69:31 | -... |
| stmts.go:71:2:71:10 | return statement | stmts.go:67:9:67:35 | function call |
| stmts.go:71:2:71:10 | return statement | stmts.go:69:9:69:36 | function call |
| stmts.go:71:9:71:10 | 42 | stmts.go:71:2:71:10 | return statement |
| stmts.go:75:1:75:1 | entry | stmts.go:75:12:75:12 | argument corresponding to x |
| stmts.go:75:1:109:1 | function declaration | stmts.go:112:6:112:10 | skip |
| stmts.go:75:6:75:10 | skip | stmts.go:75:1:109:1 | function declaration |
| stmts.go:75:12:75:12 | argument corresponding to x | stmts.go:75:12:75:12 | initialization of x |
| stmts.go:75:12:75:12 | initialization of x | stmts.go:76:9:76:9 | x |
| stmts.go:76:9:76:9 | x | stmts.go:79:9:79:9 | skip |
| stmts.go:79:9:79:9 | assignment to y | stmts.go:79:17:79:17 | y |
| stmts.go:79:9:79:9 | skip | stmts.go:79:14:79:14 | x |
| stmts.go:79:14:79:14 | x | stmts.go:79:9:79:9 | assignment to y |
| stmts.go:79:17:79:17 | y | stmts.go:79:21:79:22 | 19 |
| stmts.go:79:17:79:22 | ...-... | stmts.go:81:3:81:7 | test5 |
| stmts.go:79:21:79:22 | 19 | stmts.go:79:17:79:22 | ...-... |
| stmts.go:81:3:81:7 | test5 | stmts.go:81:9:81:13 | false |
| stmts.go:81:3:81:14 | call to test5 | stmts.go:109:1:109:1 | exit |
| stmts.go:81:9:81:13 | false | stmts.go:81:3:81:14 | call to test5 |
| stmts.go:84:9:84:9 | x | stmts.go:85:7:85:7 | 1 |
| stmts.go:84:9:84:9 | x | stmts.go:90:9:90:9 | x |
| stmts.go:85:2:85:8 | skip | stmts.go:90:9:90:9 | x |
| stmts.go:85:7:85:7 | 1 | stmts.go:85:7:85:7 | case 1 |
| stmts.go:85:7:85:7 | case 1 | stmts.go:85:2:85:8 | skip |
| stmts.go:85:7:85:7 | case 1 | stmts.go:86:7:86:7 | 2 |
| stmts.go:86:7:86:7 | 2 | stmts.go:86:7:86:7 | case 2 |
| stmts.go:86:7:86:7 | case 2 | stmts.go:86:10:86:10 | 3 |
| stmts.go:86:7:86:7 | case 2 | stmts.go:87:3:87:7 | test5 |
| stmts.go:86:10:86:10 | 3 | stmts.go:86:10:86:10 | case 3 |
| stmts.go:86:10:86:10 | case 3 | stmts.go:87:3:87:7 | test5 |
| stmts.go:86:10:86:10 | case 3 | stmts.go:90:9:90:9 | x |
| stmts.go:87:3:87:7 | test5 | stmts.go:87:9:87:12 | true |
| stmts.go:87:9:87:12 | true | stmts.go:87:3:87:13 | call to test5 |
| stmts.go:90:9:90:9 | x | stmts.go:91:7:91:7 | 1 |
| stmts.go:90:9:90:9 | x | stmts.go:98:9:98:9 | x |
| stmts.go:91:7:91:7 | 1 | stmts.go:91:7:91:7 | case 1 |
| stmts.go:91:7:91:7 | case 1 | stmts.go:92:3:92:7 | test5 |
| stmts.go:91:7:91:7 | case 1 | stmts.go:94:7:94:11 | ...-... |
| stmts.go:92:3:92:7 | test5 | stmts.go:92:9:92:13 | false |
| stmts.go:92:9:92:13 | false | stmts.go:92:3:92:14 | call to test5 |
| stmts.go:93:3:93:13 | skip | stmts.go:95:3:95:7 | test5 |
| stmts.go:94:7:94:11 | ...-... | stmts.go:94:7:94:11 | case ...-... |
| stmts.go:94:7:94:11 | case ...-... | stmts.go:95:3:95:7 | test5 |
| stmts.go:94:7:94:11 | case ...-... | stmts.go:98:9:98:9 | x |
| stmts.go:95:3:95:7 | test5 | stmts.go:95:9:95:12 | true |
| stmts.go:95:9:95:12 | true | stmts.go:95:3:95:13 | call to test5 |
| stmts.go:98:9:98:9 | x | stmts.go:100:7:100:7 | 2 |
| stmts.go:99:2:99:9 | skip | stmts.go:104:2:104:2 | true |
| stmts.go:100:7:100:7 | 2 | stmts.go:100:7:100:7 | case 2 |
| stmts.go:100:7:100:7 | case 2 | stmts.go:99:2:99:9 | skip |
| stmts.go:100:7:100:7 | case 2 | stmts.go:101:3:101:7 | test5 |
| stmts.go:101:3:101:7 | test5 | stmts.go:101:9:101:12 | true |
| stmts.go:101:9:101:12 | true | stmts.go:101:3:101:13 | call to test5 |
| stmts.go:104:2:104:2 | true | stmts.go:107:7:107:10 | true |
| stmts.go:107:7:107:10 | case true | stmts.go:107:10:107:10 | true is false |
| stmts.go:107:7:107:10 | case true | stmts.go:107:10:107:10 | true is true |
| stmts.go:107:7:107:10 | true | stmts.go:107:7:107:10 | case true |
| stmts.go:107:10:107:10 | true is false | stmts.go:106:3:106:7 | skip |
| stmts.go:107:10:107:10 | true is true | stmts.go:107:2:107:11 | skip |
| stmts.go:112:1:112:1 | entry | stmts.go:112:12:112:12 | argument corresponding to x |
| stmts.go:112:1:125:1 | function declaration | stmts.go:128:6:128:11 | skip |
| stmts.go:112:6:112:10 | skip | stmts.go:112:1:125:1 | function declaration |
| stmts.go:112:12:112:12 | argument corresponding to x | stmts.go:112:12:112:12 | initialization of x |
| stmts.go:112:12:112:12 | initialization of x | stmts.go:113:9:113:9 | skip |
| stmts.go:113:9:113:9 | assignment to y | stmts.go:114:7:114:11 | case error |
| stmts.go:113:9:113:9 | assignment to y | stmts.go:121:9:121:9 | skip |
| stmts.go:113:9:113:9 | skip | stmts.go:113:14:113:14 | x |
| stmts.go:113:14:113:14 | x | stmts.go:113:14:113:21 | type assertion |
| stmts.go:113:14:113:21 | type assertion | stmts.go:113:9:113:9 | assignment to y |
| stmts.go:114:7:114:11 | case error | stmts.go:114:14:114:19 | case string |
| stmts.go:114:7:114:11 | case error | stmts.go:115:3:115:13 | selection of Println |
| stmts.go:114:14:114:19 | case string | stmts.go:115:3:115:13 | selection of Println |
| stmts.go:114:14:114:19 | case string | stmts.go:116:7:116:13 | case float32 |
| stmts.go:115:3:115:13 | selection of Println | stmts.go:115:15:115:15 | y |
| stmts.go:115:3:115:16 | call to Println | stmts.go:121:9:121:9 | skip |
| stmts.go:115:3:115:16 | call to Println | stmts.go:125:1:125:1 | exit |
| stmts.go:115:15:115:15 | y | stmts.go:115:3:115:16 | call to Println |
| stmts.go:116:7:116:13 | case float32 | stmts.go:117:3:117:7 | test5 |
| stmts.go:116:7:116:13 | case float32 | stmts.go:121:9:121:9 | skip |
| stmts.go:117:3:117:7 | test5 | stmts.go:117:9:117:12 | true |
| stmts.go:117:3:117:13 | call to test5 | stmts.go:125:1:125:1 | exit |
| stmts.go:117:9:117:12 | true | stmts.go:117:3:117:13 | call to test5 |
| stmts.go:118:3:118:7 | test5 | stmts.go:118:9:118:13 | false |
| stmts.go:118:9:118:13 | false | stmts.go:118:3:118:14 | call to test5 |
| stmts.go:121:9:121:9 | assignment to y | stmts.go:121:17:121:17 | y |
| stmts.go:121:9:121:9 | skip | stmts.go:121:14:121:14 | x |
| stmts.go:121:14:121:14 | x | stmts.go:121:9:121:9 | assignment to y |
| stmts.go:121:17:121:17 | y | stmts.go:121:17:121:24 | type assertion |
| stmts.go:121:17:121:24 | type assertion | stmts.go:123:3:123:7 | test5 |
| stmts.go:123:3:123:7 | test5 | stmts.go:123:9:123:13 | false |
| stmts.go:123:3:123:14 | call to test5 | stmts.go:125:1:125:1 | exit |
| stmts.go:123:9:123:13 | false | stmts.go:123:3:123:14 | call to test5 |
| stmts.go:128:1:128:1 | entry | stmts.go:128:13:128:13 | argument corresponding to f |
| stmts.go:128:1:130:1 | function declaration | stmts.go:133:6:133:11 | skip |
| stmts.go:128:6:128:11 | skip | stmts.go:128:1:130:1 | function declaration |
| stmts.go:128:13:128:13 | argument corresponding to f | stmts.go:128:13:128:13 | initialization of f |
| stmts.go:128:13:128:13 | initialization of f | stmts.go:129:5:129:5 | f |
| stmts.go:129:2:129:7 | go statement | stmts.go:130:1:130:1 | exit |
| stmts.go:129:5:129:5 | f | stmts.go:129:2:129:7 | go statement |
| stmts.go:133:1:133:1 | entry | stmts.go:133:13:133:14 | argument corresponding to xs |
| stmts.go:133:1:147:1 | function declaration | stmts.go:0:0:0:0 | exit |
| stmts.go:133:6:133:11 | skip | stmts.go:133:1:147:1 | function declaration |
| stmts.go:133:13:133:14 | argument corresponding to xs | stmts.go:133:13:133:14 | initialization of xs |
| stmts.go:133:13:133:14 | initialization of xs | stmts.go:134:17:134:18 | xs |
| stmts.go:134:2:139:2 | range statement[0] | stmts.go:134:6:134:6 | assignment to x |
| stmts.go:134:6:134:6 | assignment to x | stmts.go:135:6:135:6 | x |
| stmts.go:134:6:134:6 | skip | stmts.go:134:2:139:2 | range statement[0] |
| stmts.go:134:17:134:18 | next key-value pair in range | stmts.go:134:6:134:6 | skip |
| stmts.go:134:17:134:18 | next key-value pair in range | stmts.go:141:20:141:21 | xs |
| stmts.go:134:17:134:18 | xs | stmts.go:134:17:134:18 | next key-value pair in range |
| stmts.go:135:6:135:6 | x | stmts.go:135:10:135:10 | 5 |
| stmts.go:135:6:135:10 | ...>... | stmts.go:135:10:135:10 | ...>... is false |
| stmts.go:135:6:135:10 | ...>... | stmts.go:135:10:135:10 | ...>... is true |
| stmts.go:135:10:135:10 | 5 | stmts.go:135:6:135:10 | ...>... |
| stmts.go:135:10:135:10 | ...>... is false | stmts.go:138:3:138:11 | selection of Print |
| stmts.go:135:10:135:10 | ...>... is true | stmts.go:136:4:136:11 | skip |
| stmts.go:136:4:136:11 | skip | stmts.go:134:17:134:18 | next key-value pair in range |
| stmts.go:138:3:138:11 | selection of Print | stmts.go:138:13:138:13 | x |
| stmts.go:138:3:138:14 | call to Print | stmts.go:134:17:134:18 | next key-value pair in range |
| stmts.go:138:3:138:14 | call to Print | stmts.go:147:1:147:1 | exit |
| stmts.go:138:13:138:13 | x | stmts.go:138:3:138:14 | call to Print |
| stmts.go:141:2:143:2 | range statement[0] | stmts.go:141:2:143:2 | range statement[1] |
| stmts.go:141:2:143:2 | range statement[1] | stmts.go:141:6:141:6 | assignment to i |
| stmts.go:141:6:141:6 | assignment to i | stmts.go:141:9:141:9 | assignment to v |
| stmts.go:141:6:141:6 | skip | stmts.go:141:9:141:9 | skip |
| stmts.go:141:9:141:9 | assignment to v | stmts.go:142:3:142:11 | selection of Print |
| stmts.go:141:9:141:9 | skip | stmts.go:141:2:143:2 | range statement[0] |
| stmts.go:141:20:141:21 | next key-value pair in range | stmts.go:141:6:141:6 | skip |
| stmts.go:141:20:141:21 | next key-value pair in range | stmts.go:145:12:145:13 | xs |
| stmts.go:141:20:141:21 | xs | stmts.go:141:20:141:21 | next key-value pair in range |
| stmts.go:142:3:142:11 | selection of Print | stmts.go:142:13:142:13 | i |
| stmts.go:142:3:142:17 | call to Print | stmts.go:141:20:141:21 | next key-value pair in range |
| stmts.go:142:3:142:17 | call to Print | stmts.go:147:1:147:1 | exit |
| stmts.go:142:13:142:13 | i | stmts.go:142:16:142:16 | v |
| stmts.go:142:16:142:16 | v | stmts.go:142:3:142:17 | call to Print |
| stmts.go:145:12:145:13 | next key-value pair in range | stmts.go:145:15:146:2 | skip |
| stmts.go:145:12:145:13 | next key-value pair in range | stmts.go:147:1:147:1 | exit |
| stmts.go:145:12:145:13 | xs | stmts.go:145:12:145:13 | next key-value pair in range |
| stmts.go:145:15:146:2 | skip | stmts.go:145:12:145:13 | next key-value pair in range |
| tst.go:0:0:0:0 | entry | tst.go:3:6:3:10 | skip |
| tst.go:3:1:3:1 | entry | tst.go:3:12:3:12 | argument corresponding to x |
| tst.go:3:1:12:1 | function declaration | tst.go:14:6:14:11 | skip |
@@ -1278,11 +1278,11 @@
| tst.go:18:38:18:38 | ...<... is false | tst.go:21:1:21:1 | exit |
| tst.go:18:38:18:38 | ...<... is true | tst.go:18:2:18:39 | skip |
| tst.go:23:1:23:1 | entry | tst.go:24:2:24:2 | true |
| tst.go:23:1:25:1 | function declaration | tst.go:27:6:27:11 | skip |
| tst.go:23:6:23:11 | skip | tst.go:23:1:25:1 | function declaration |
| tst.go:24:2:24:2 | true | tst.go:25:1:25:1 | exit |
| tst.go:27:1:27:1 | entry | tst.go:28:2:28:2 | true |
| tst.go:27:1:31:1 | function declaration | tst.go:0:0:0:0 | exit |
| tst.go:27:6:27:11 | skip | tst.go:27:1:31:1 | function declaration |
| tst.go:28:2:28:2 | true | tst.go:29:2:29:9 | skip |
| tst.go:29:2:29:9 | skip | tst.go:31:1:31:1 | exit |
| tst.go:23:1:26:1 | function declaration | tst.go:28:6:28:11 | skip |
| tst.go:23:6:23:11 | skip | tst.go:23:1:26:1 | function declaration |
| tst.go:24:2:24:2 | true | tst.go:26:1:26:1 | exit |
| tst.go:28:1:28:1 | entry | tst.go:29:2:29:2 | true |
| tst.go:28:1:32:1 | function declaration | tst.go:0:0:0:0 | exit |
| tst.go:28:6:28:11 | skip | tst.go:28:1:32:1 | function declaration |
| tst.go:29:2:29:2 | true | tst.go:30:2:30:9 | skip |
| tst.go:30:2:30:9 | skip | tst.go:32:1:32:1 | exit |

View File

@@ -6,6 +6,6 @@
| noretfunctions.go:20:6:20:22 | noRetUsesLogFatal | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| noretfunctions.go:24:6:24:23 | noRetUsesLogFatalf | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts7.go:10:6:10:15 | canRecover | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:8:6:8:10 | test5 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:44:6:44:10 | test6 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:110:6:110:10 | test9 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:10:6:10:10 | test5 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:46:6:46:10 | test6 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |
| stmts.go:112:6:112:10 | test9 | package github.com/github/codeql-go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph |

View File

@@ -4,6 +4,8 @@ import "fmt"
// NOTE: after auto-formatting this file, make sure to put back the empty statement on line 15 below
// autoformat-ignore (in line with the NOTE above)
// simple statements and for loops
func test5(b bool) {
{

View File

@@ -21,7 +21,8 @@ func check2(value int64) {
}
func check3() {
switch { }
switch {
}
}
func check4() {

View File

@@ -1,61 +1,61 @@
| AlertSuppressionExample.go:11:42:11:74 | comment | lgtm[go/hardcoded-credentials] | lgtm[go/hardcoded-credentials] | AlertSuppressionExample.go:11:1:11:74 | suppression range |
| tst.go:5:8:5:14 | comment | lgtm | lgtm | tst.go:5:1:5:14 | suppression range |
| tst.go:6:8:6:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:6:1:6:39 | suppression range |
| tst.go:7:8:7:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:7:1:7:39 | suppression range |
| tst.go:8:8:8:63 | comment | lgtm[go/redundant-assignment, go/redundant-operation] | lgtm[go/redundant-assignment, go/redundant-operation] | tst.go:8:1:8:63 | suppression range |
| tst.go:9:8:9:29 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tst.go:9:1:9:29 | suppression range |
| tst.go:10:8:10:53 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tst.go:10:1:10:53 | suppression range |
| tst.go:11:8:11:35 | comment | lgtm[@expires:2017-06-11] | lgtm[@expires:2017-06-11] | tst.go:11:1:11:35 | suppression range |
| tst.go:12:8:12:70 | comment | lgtm[go/redundant-operation] because I know better than lgtm | lgtm[go/redundant-operation] | tst.go:12:1:12:70 | suppression range |
| tst.go:13:8:13:25 | comment | lgtm: blah blah | lgtm | tst.go:13:1:13:25 | suppression range |
| tst.go:14:8:14:39 | comment | lgtm blah blah #falsepositive | lgtm | tst.go:14:1:14:39 | suppression range |
| tst.go:15:8:15:39 | comment | lgtm [go/redundant-operation] | lgtm [go/redundant-operation] | tst.go:15:1:15:39 | suppression range |
| tst.go:16:8:16:17 | comment | lgtm | lgtm | tst.go:16:1:16:17 | suppression range |
| tst.go:17:8:17:16 | comment | lgtm[] | lgtm[] | tst.go:17:1:17:16 | suppression range |
| tst.go:19:8:19:13 | comment | lgtm | lgtm | tst.go:19:1:19:13 | suppression range |
| tst.go:20:8:20:14 | comment | \tlgtm | lgtm | tst.go:20:1:20:14 | suppression range |
| tst.go:21:8:21:40 | comment | lgtm\t[go/redundant-assignment] | lgtm\t[go/redundant-assignment] | tst.go:21:1:21:40 | suppression range |
| tst.go:24:8:24:19 | comment | foo; lgtm | lgtm | tst.go:24:1:24:19 | suppression range |
| tst.go:25:8:25:44 | comment | foo; lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:25:1:25:44 | suppression range |
| tst.go:27:8:27:43 | comment | foo lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:27:1:27:43 | suppression range |
| tst.go:29:8:29:47 | comment | foo lgtm[go/redundant-assignment] bar | lgtm[go/redundant-assignment] | tst.go:29:1:29:47 | suppression range |
| tst.go:30:8:30:15 | comment | LGTM! | LGTM | tst.go:30:1:30:15 | suppression range |
| tst.go:31:8:31:39 | comment | LGTM[go/redundant-assignment] | LGTM[go/redundant-assignment] | tst.go:31:1:31:39 | suppression range |
| tst.go:32:8:32:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-assignment] | tst.go:32:1:32:72 | suppression range |
| tst.go:32:8:32:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-operation] | tst.go:32:1:32:72 | suppression range |
| tst.go:33:8:33:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm | tst.go:33:1:33:45 | suppression range |
| tst.go:33:8:33:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm[go/redundant-assignment] | tst.go:33:1:33:45 | suppression range |
| tst.go:34:8:34:19 | comment | lgtm[] | lgtm[] | tst.go:34:1:34:19 | suppression range |
| tst.go:35:8:35:42 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:35:1:35:42 | suppression range |
| tst.go:41:8:41:56 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tst.go:41:1:41:56 | suppression range |
| tst.go:42:8:42:32 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tst.go:42:1:42:32 | suppression range |
| tstWindows.go:5:8:5:14 | comment | lgtm | lgtm | tstWindows.go:5:1:5:14 | suppression range |
| tstWindows.go:6:8:6:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:6:1:6:39 | suppression range |
| tstWindows.go:7:8:7:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:7:1:7:39 | suppression range |
| tstWindows.go:8:8:8:63 | comment | lgtm[go/redundant-assignment, go/redundant-operation] | lgtm[go/redundant-assignment, go/redundant-operation] | tstWindows.go:8:1:8:63 | suppression range |
| tstWindows.go:9:8:9:29 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tstWindows.go:9:1:9:29 | suppression range |
| tstWindows.go:10:8:10:53 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tstWindows.go:10:1:10:53 | suppression range |
| tstWindows.go:11:8:11:35 | comment | lgtm[@expires:2017-06-11] | lgtm[@expires:2017-06-11] | tstWindows.go:11:1:11:35 | suppression range |
| tstWindows.go:12:8:12:70 | comment | lgtm[go/redundant-operation] because I know better than lgtm | lgtm[go/redundant-operation] | tstWindows.go:12:1:12:70 | suppression range |
| tstWindows.go:13:8:13:25 | comment | lgtm: blah blah | lgtm | tstWindows.go:13:1:13:25 | suppression range |
| tstWindows.go:14:8:14:39 | comment | lgtm blah blah #falsepositive | lgtm | tstWindows.go:14:1:14:39 | suppression range |
| tstWindows.go:15:8:15:39 | comment | lgtm [go/redundant-operation] | lgtm [go/redundant-operation] | tstWindows.go:15:1:15:39 | suppression range |
| tstWindows.go:16:8:16:17 | comment | lgtm | lgtm | tstWindows.go:16:1:16:17 | suppression range |
| tstWindows.go:17:8:17:16 | comment | lgtm[] | lgtm[] | tstWindows.go:17:1:17:16 | suppression range |
| tstWindows.go:19:8:19:13 | comment | lgtm | lgtm | tstWindows.go:19:1:19:13 | suppression range |
| tstWindows.go:20:8:20:14 | comment | \tlgtm | lgtm | tstWindows.go:20:1:20:14 | suppression range |
| tstWindows.go:21:8:21:40 | comment | lgtm\t[go/redundant-assignment] | lgtm\t[go/redundant-assignment] | tstWindows.go:21:1:21:40 | suppression range |
| tstWindows.go:24:8:24:19 | comment | foo; lgtm | lgtm | tstWindows.go:24:1:24:19 | suppression range |
| tstWindows.go:25:8:25:44 | comment | foo; lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:25:1:25:44 | suppression range |
| tstWindows.go:27:8:27:43 | comment | foo lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:27:1:27:43 | suppression range |
| tstWindows.go:29:8:29:47 | comment | foo lgtm[go/redundant-assignment] bar | lgtm[go/redundant-assignment] | tstWindows.go:29:1:29:47 | suppression range |
| tstWindows.go:30:8:30:15 | comment | LGTM! | LGTM | tstWindows.go:30:1:30:15 | suppression range |
| tstWindows.go:31:8:31:39 | comment | LGTM[go/redundant-assignment] | LGTM[go/redundant-assignment] | tstWindows.go:31:1:31:39 | suppression range |
| tstWindows.go:32:8:32:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-assignment] | tstWindows.go:32:1:32:72 | suppression range |
| tstWindows.go:32:8:32:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-operation] | tstWindows.go:32:1:32:72 | suppression range |
| tstWindows.go:33:8:33:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm | tstWindows.go:33:1:33:45 | suppression range |
| tstWindows.go:33:8:33:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm[go/redundant-assignment] | tstWindows.go:33:1:33:45 | suppression range |
| tstWindows.go:34:8:34:19 | comment | lgtm[] | lgtm[] | tstWindows.go:34:1:34:19 | suppression range |
| tstWindows.go:35:8:35:42 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:35:1:35:42 | suppression range |
| tstWindows.go:41:8:41:56 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tstWindows.go:41:1:41:56 | suppression range |
| tstWindows.go:42:8:42:32 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tstWindows.go:42:1:42:32 | suppression range |
| tst.go:7:8:7:14 | comment | lgtm | lgtm | tst.go:7:1:7:14 | suppression range |
| tst.go:8:8:8:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:8:1:8:39 | suppression range |
| tst.go:9:8:9:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:9:1:9:39 | suppression range |
| tst.go:10:8:10:63 | comment | lgtm[go/redundant-assignment, go/redundant-operation] | lgtm[go/redundant-assignment, go/redundant-operation] | tst.go:10:1:10:63 | suppression range |
| tst.go:11:8:11:29 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tst.go:11:1:11:29 | suppression range |
| tst.go:12:8:12:53 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tst.go:12:1:12:53 | suppression range |
| tst.go:13:8:13:35 | comment | lgtm[@expires:2017-06-11] | lgtm[@expires:2017-06-11] | tst.go:13:1:13:35 | suppression range |
| tst.go:14:8:14:70 | comment | lgtm[go/redundant-operation] because I know better than lgtm | lgtm[go/redundant-operation] | tst.go:14:1:14:70 | suppression range |
| tst.go:15:8:15:25 | comment | lgtm: blah blah | lgtm | tst.go:15:1:15:25 | suppression range |
| tst.go:16:8:16:39 | comment | lgtm blah blah #falsepositive | lgtm | tst.go:16:1:16:39 | suppression range |
| tst.go:17:8:17:39 | comment | lgtm [go/redundant-operation] | lgtm [go/redundant-operation] | tst.go:17:1:17:39 | suppression range |
| tst.go:18:8:18:17 | comment | lgtm | lgtm | tst.go:18:1:18:17 | suppression range |
| tst.go:19:8:19:16 | comment | lgtm[] | lgtm[] | tst.go:19:1:19:16 | suppression range |
| tst.go:21:8:21:13 | comment | lgtm | lgtm | tst.go:21:1:21:13 | suppression range |
| tst.go:22:8:22:14 | comment | \tlgtm | lgtm | tst.go:22:1:22:14 | suppression range |
| tst.go:23:8:23:40 | comment | lgtm\t[go/redundant-assignment] | lgtm\t[go/redundant-assignment] | tst.go:23:1:23:40 | suppression range |
| tst.go:26:8:26:19 | comment | foo; lgtm | lgtm | tst.go:26:1:26:19 | suppression range |
| tst.go:27:8:27:44 | comment | foo; lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:27:1:27:44 | suppression range |
| tst.go:29:8:29:43 | comment | foo lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:29:1:29:43 | suppression range |
| tst.go:31:8:31:47 | comment | foo lgtm[go/redundant-assignment] bar | lgtm[go/redundant-assignment] | tst.go:31:1:31:47 | suppression range |
| tst.go:32:8:32:15 | comment | LGTM! | LGTM | tst.go:32:1:32:15 | suppression range |
| tst.go:33:8:33:39 | comment | LGTM[go/redundant-assignment] | LGTM[go/redundant-assignment] | tst.go:33:1:33:39 | suppression range |
| tst.go:34:8:34:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-assignment] | tst.go:34:1:34:72 | suppression range |
| tst.go:34:8:34:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-operation] | tst.go:34:1:34:72 | suppression range |
| tst.go:35:8:35:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm | tst.go:35:1:35:45 | suppression range |
| tst.go:35:8:35:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm[go/redundant-assignment] | tst.go:35:1:35:45 | suppression range |
| tst.go:36:8:36:19 | comment | lgtm[] | lgtm[] | tst.go:36:1:36:19 | suppression range |
| tst.go:37:8:37:42 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tst.go:37:1:37:42 | suppression range |
| tst.go:43:8:43:56 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tst.go:43:1:43:56 | suppression range |
| tst.go:44:8:44:32 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tst.go:44:1:44:32 | suppression range |
| tstWindows.go:7:8:7:14 | comment | lgtm | lgtm | tstWindows.go:7:1:7:14 | suppression range |
| tstWindows.go:8:8:8:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:8:1:8:39 | suppression range |
| tstWindows.go:9:8:9:39 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:9:1:9:39 | suppression range |
| tstWindows.go:10:8:10:63 | comment | lgtm[go/redundant-assignment, go/redundant-operation] | lgtm[go/redundant-assignment, go/redundant-operation] | tstWindows.go:10:1:10:63 | suppression range |
| tstWindows.go:11:8:11:29 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tstWindows.go:11:1:11:29 | suppression range |
| tstWindows.go:12:8:12:53 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tstWindows.go:12:1:12:53 | suppression range |
| tstWindows.go:13:8:13:35 | comment | lgtm[@expires:2017-06-11] | lgtm[@expires:2017-06-11] | tstWindows.go:13:1:13:35 | suppression range |
| tstWindows.go:14:8:14:70 | comment | lgtm[go/redundant-operation] because I know better than lgtm | lgtm[go/redundant-operation] | tstWindows.go:14:1:14:70 | suppression range |
| tstWindows.go:15:8:15:25 | comment | lgtm: blah blah | lgtm | tstWindows.go:15:1:15:25 | suppression range |
| tstWindows.go:16:8:16:39 | comment | lgtm blah blah #falsepositive | lgtm | tstWindows.go:16:1:16:39 | suppression range |
| tstWindows.go:17:8:17:39 | comment | lgtm [go/redundant-operation] | lgtm [go/redundant-operation] | tstWindows.go:17:1:17:39 | suppression range |
| tstWindows.go:18:8:18:17 | comment | lgtm | lgtm | tstWindows.go:18:1:18:17 | suppression range |
| tstWindows.go:19:8:19:16 | comment | lgtm[] | lgtm[] | tstWindows.go:19:1:19:16 | suppression range |
| tstWindows.go:21:8:21:13 | comment | lgtm | lgtm | tstWindows.go:21:1:21:13 | suppression range |
| tstWindows.go:22:8:22:14 | comment | \tlgtm | lgtm | tstWindows.go:22:1:22:14 | suppression range |
| tstWindows.go:23:8:23:40 | comment | lgtm\t[go/redundant-assignment] | lgtm\t[go/redundant-assignment] | tstWindows.go:23:1:23:40 | suppression range |
| tstWindows.go:26:8:26:19 | comment | foo; lgtm | lgtm | tstWindows.go:26:1:26:19 | suppression range |
| tstWindows.go:27:8:27:44 | comment | foo; lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:27:1:27:44 | suppression range |
| tstWindows.go:29:8:29:43 | comment | foo lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:29:1:29:43 | suppression range |
| tstWindows.go:31:8:31:47 | comment | foo lgtm[go/redundant-assignment] bar | lgtm[go/redundant-assignment] | tstWindows.go:31:1:31:47 | suppression range |
| tstWindows.go:32:8:32:15 | comment | LGTM! | LGTM | tstWindows.go:32:1:32:15 | suppression range |
| tstWindows.go:33:8:33:39 | comment | LGTM[go/redundant-assignment] | LGTM[go/redundant-assignment] | tstWindows.go:33:1:33:39 | suppression range |
| tstWindows.go:34:8:34:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-assignment] | tstWindows.go:34:1:34:72 | suppression range |
| tstWindows.go:34:8:34:72 | comment | lgtm[go/redundant-assignment] and lgtm[go/redundant-operation] | lgtm[go/redundant-operation] | tstWindows.go:34:1:34:72 | suppression range |
| tstWindows.go:35:8:35:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm | tstWindows.go:35:1:35:45 | suppression range |
| tstWindows.go:35:8:35:45 | comment | lgtm[go/redundant-assignment]; lgtm | lgtm[go/redundant-assignment] | tstWindows.go:35:1:35:45 | suppression range |
| tstWindows.go:36:8:36:19 | comment | lgtm[] | lgtm[] | tstWindows.go:36:1:36:19 | suppression range |
| tstWindows.go:37:8:37:42 | comment | lgtm[go/redundant-assignment] | lgtm[go/redundant-assignment] | tstWindows.go:37:1:37:42 | suppression range |
| tstWindows.go:43:8:43:56 | comment | lgtm[@tag:nullness,go/redundant-assignment] | lgtm[@tag:nullness,go/redundant-assignment] | tstWindows.go:43:1:43:56 | suppression range |
| tstWindows.go:44:8:44:32 | comment | lgtm[@tag:nullness] | lgtm[@tag:nullness] | tstWindows.go:44:1:44:32 | suppression range |

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (avoid gofmt changing line-endings, which should be specifically LFs here)
func main() {
x := 42
x = x // lgtm

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (otherwise gofmt will replace CRLF line-endings with LFs under Unix-like environments)
func winMain() {
x := 42
x = x // lgtm

View File

@@ -1,2 +1,2 @@
| WhitespaceContradictsPrecedence.go:4:9:4:18 | ...<<... | & is evaluated before <<, but whitespace suggests the opposite. |
| main.go:12:9:12:16 | ...+... | >> is evaluated before +, but whitespace suggests the opposite. |
| WhitespaceContradictsPrecedence.go:6:9:6:18 | ...<<... | & is evaluated before <<, but whitespace suggests the opposite. |
| main.go:14:9:14:16 | ...+... | >> is evaluated before +, but whitespace suggests the opposite. |

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (otherwise gofmt will fix the spacing to reflect precedence)
func isBitSetBad(x int, pos uint) bool {
return x & 1<<pos != 0
}

View File

@@ -1,5 +1,7 @@
package main
// autoformat-ignore (otherwise gofmt will insist on its particular spacing)
func isBitSetGood(x int, pos uint) bool {
return x & (1<<pos) != 0
}

View File

@@ -1,19 +1,21 @@
package main
// autoformat-ignore (otherwise gofmt will fix spacing to reflect precedence)
func ok1(x int) int {
return x + x>>1;
return x + x>>1;
}
func ok2(x int) int {
return x + x >> 1;
return x + x >> 1;
}
func bad(x int) int {
return x+x >> 1;
return x+x >> 1;
}
func ok3(x int) int {
return x + (x>>1);
return x + (x>>1);
}
func ok4(x int, y int, z int) int {
@@ -25,13 +27,13 @@ func ok5(x int, y int, z int) int {
}
func ok6(x int) int {
return x + x>> 1;
return x + x>> 1;
}
func ok7(x int, y int, z int) int {
return x + y - z;
}
func ok8(x int, y int, z int) int {
return x + y-z;
}