mirror of
https://github.com/github/codeql.git
synced 2026-02-20 00:43:44 +01:00
Merge pull request #48 from github/hvitved/ci-check-queries
Check query compilation and formatting in `qltest.yml`
This commit is contained in:
5
.github/workflows/qltest.yml
vendored
5
.github/workflows/qltest.yml
vendored
@@ -31,4 +31,7 @@ jobs:
|
||||
run: env "PATH=$PATH:${{ github.workspace }}/codeql" ./create-extractor-pack.sh
|
||||
- name: Run QL tests
|
||||
run: codeql/codeql test run --check-databases --check-unused-labels --search-path "${{ github.workspace }}" --consistency-queries ql/consistency-queries ql/test
|
||||
|
||||
- name: Check QL formatting
|
||||
run: find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql/codeql query format --check-only
|
||||
- name: Check QL compilation
|
||||
run: codeql/codeql query compile --check-only --threads=4 --warnings=error --search-path "${{ github.workspace }}" "ql/src" "ql/examples"
|
||||
|
||||
@@ -18,20 +18,18 @@ private predicate scopeDefinesParameter(VariableScope scope, string name, Locati
|
||||
exists(Identifier var |
|
||||
name = var.getValue() and
|
||||
location = var.getLocation() and
|
||||
var in [
|
||||
scope
|
||||
.(BlockScope)
|
||||
.getScopeElement()
|
||||
.getAFieldOrChild()
|
||||
.(BlockParameters)
|
||||
.getAFieldOrChild+(),
|
||||
scope
|
||||
.(MethodScope)
|
||||
.getScopeElement()
|
||||
.getAFieldOrChild()
|
||||
.(MethodParameters)
|
||||
.getAFieldOrChild+()
|
||||
]
|
||||
var in [scope
|
||||
.(BlockScope)
|
||||
.getScopeElement()
|
||||
.getAFieldOrChild()
|
||||
.(BlockParameters)
|
||||
.getAFieldOrChild+(),
|
||||
scope
|
||||
.(MethodScope)
|
||||
.getScopeElement()
|
||||
.getAFieldOrChild()
|
||||
.(MethodParameters)
|
||||
.getAFieldOrChild+()]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user