mirror of
https://github.com/github/codeql.git
synced 2026-01-29 14:23:03 +01:00
Exclude files with build constraints from the cfg test
This commit is contained in:
@@ -508,10 +508,6 @@ edges
|
||||
| hello.go:8:2:8:12 | selection of Println | hello.go:8:14:8:20 | message |
|
||||
| hello.go:8:2:8:21 | call to Println | hello.go:9:1:9:1 | exit |
|
||||
| hello.go:8:14:8:20 | message | hello.go:8:2:8:21 | call to Println |
|
||||
| linux.go:0:0:0:0 | entry | linux.go:5:7:5:11 | skip |
|
||||
| linux.go:5:7:5:11 | assignment to linux | linux.go:0:0:0:0 | exit |
|
||||
| linux.go:5:7:5:11 | skip | linux.go:5:15:5:18 | true |
|
||||
| linux.go:5:15:5:18 | true | linux.go:5:7:5:11 | assignment to linux |
|
||||
| main.go:0:0:0:0 | entry | main.go:3:1:6:1 | skip |
|
||||
| main.go:3:1:6:1 | skip | main.go:8:6:8:9 | skip |
|
||||
| main.go:8:1:8:1 | entry | main.go:9:9:9:20 | selection of Float64 |
|
||||
|
||||
@@ -3,6 +3,8 @@ import go
|
||||
query predicate nodes(ControlFlow::Node nd) { none() }
|
||||
|
||||
query predicate edges(ControlFlow::Node pred, ControlFlow::Node succ) {
|
||||
not succ.getFile().hasBuildConstraints() and
|
||||
not pred.getFile().hasBuildConstraints() and
|
||||
succ = pred.getASuccessor()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user