codeql-go merge prep: move into go/ directory

This commit is contained in:
Chuan-kai Lin
2022-05-20 10:07:19 -07:00
parent 415c3d1c72
commit aa514fff32
2277 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1 @@
| main.go:15:41:15:52 | call to len |

View File

@@ -0,0 +1 @@
snippets/calltobuiltin.ql

View File

@@ -0,0 +1 @@
| main.go:14:2:14:29 | call to Println |

View File

@@ -0,0 +1 @@
snippets/calltofunction.ql

View File

@@ -0,0 +1 @@
| main.go:19:2:19:22 | call to Get |

View File

@@ -0,0 +1 @@
snippets/calltomethod.ql

View File

@@ -0,0 +1,4 @@
| main.go:11:18:11:26 | ...-... |
| main.go:15:56:15:59 | zero |
| main.go:35:9:35:9 | 0 |
| main.go:46:11:46:11 | 0 |

View File

@@ -0,0 +1 @@
snippets/constant.ql

View File

@@ -0,0 +1 @@
| main.go:30:2:31:2 | if statement |

View File

@@ -0,0 +1 @@
snippets/emptythen.ql

View File

@@ -0,0 +1 @@
| main.go:20:5:20:14 | selection of Method |

View File

@@ -0,0 +1 @@
snippets/fieldread.ql

View File

@@ -0,0 +1 @@
| main.go:23:3:23:13 | assignment to field Status | main.go:23:17:23:21 | "200" |

View File

@@ -0,0 +1 @@
snippets/fieldwrite.ql

View File

@@ -0,0 +1,2 @@
| file://:0:0:0:0 | main |
| main.go:13:6:13:9 | main |

View File

@@ -0,0 +1 @@
snippets/function.ql

View File

@@ -0,0 +1,49 @@
package main
import (
"errors"
"fmt"
"net/http"
"os"
)
const one int = 1
const zero int = one - one
func main() {
fmt.Println("Hello, world!")
fmt.Printf("Ignoring %d arguments.\n", len(os.Args)-1+zero)
}
func test1(req *http.Request, hdr *http.Header, resp *http.Response, w http.ResponseWriter) (e error) {
hdr.Get("X-MyHeader")
if req.Method != "GET" {
return errors.New("nope")
} else {
resp.Status = "200"
}
return nil
}
func test2(w http.ResponseWriter) {
err := test1(nil, nil, nil, w)
if err == nil {
}
}
func test3(n uint) string {
if n < 0 {
return "?"
}
return ""
}
type counter struct {
val int
}
func (c *counter) bump(n int) {
for i := 0; i < n; i++ {
c.val++
}
}

View File

@@ -0,0 +1 @@
| main.go:30:5:30:14 | ...==... |

View File

@@ -0,0 +1 @@
snippets/nilcheck.ql

View File

@@ -0,0 +1,2 @@
| main.go:18:70:18:70 | w |
| main.go:28:12:28:12 | w |

View File

@@ -0,0 +1 @@
snippets/param.ql

View File

@@ -0,0 +1 @@
| pointer type |

View File

@@ -0,0 +1 @@
snippets/pointertype.ql

View File

@@ -0,0 +1 @@
| main.go:45:7:45:7 | c |

View File

@@ -0,0 +1 @@
snippets/receiver.ql

View File

@@ -0,0 +1 @@
| main.go:18:94:18:94 | e |

View File

@@ -0,0 +1 @@
snippets/result.ql

View File

@@ -0,0 +1 @@
| Request |

View File

@@ -0,0 +1 @@
snippets/type.ql

View File

@@ -0,0 +1,3 @@
| main.go:18:12:18:14 | argument corresponding to req |
| main.go:18:12:18:14 | definition of req |
| main.go:20:5:20:7 | req |

View File

@@ -0,0 +1 @@
snippets/typeinfo.ql

View File

@@ -0,0 +1,2 @@
| main.go:46:21:46:23 | increment statement | main.go:46:2:48:2 | for statement |
| main.go:47:3:47:9 | increment statement | main.go:46:2:48:2 | for statement |

View File

@@ -0,0 +1 @@
snippets/updateinloop.ql

View File

@@ -0,0 +1 @@
| main.go:29:2:29:4 | err | main.go:29:2:29:4 | err |

View File

@@ -0,0 +1 @@
snippets/variable.ql

View File

@@ -0,0 +1 @@
| main.go:30:5:30:7 | err |

View File

@@ -0,0 +1 @@
snippets/varread.ql

View File

@@ -0,0 +1 @@
| main.go:29:2:29:4 | assignment to err | main.go:29:9:29:31 | call to test1 |

View File

@@ -0,0 +1 @@
snippets/varwrite.ql

View File

@@ -0,0 +1 @@
| main.go:35:5:35:9 | ...<... | main.go:35:5:35:5 | n |

View File

@@ -0,0 +1 @@
snippets/zerocheck.ql