diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..b6de896 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,25 @@ +name: Download and run codeQL + +on: + pull_request: + branches: + - 'master' + push: + branches: + - 'master' + +jobs: + download_and_run: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download and extract codeQL + run: | + curl -sSLO https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.15.5/codeql-bundle-linux64.tar.gz + tar -xzf codeql-bundle-linux64.tar.gz + - name: Run codeQL + run: | + codeql/codeql test run languages/cpp \ No newline at end of file diff --git a/languages/cpp/doStmt/doStmtTest.expected b/languages/cpp/doStmt/doStmtTest.expected index e69de29..538721c 100644 --- a/languages/cpp/doStmt/doStmtTest.expected +++ b/languages/cpp/doStmt/doStmtTest.expected @@ -0,0 +1,5 @@ +| doStmtCode.cpp:8:5:13:32 | do (...) ... | This is 'do' statement. | +| doStmtCode.cpp:9:9:11:36 | do (...) ... | This is 'do' statement. | +| doStmtCode.cpp:19:5:21:32 | do (...) ... | This is 'do' statement. | +| doStmtCode.cpp:28:5:30:19 | do (...) ... | This is 'do' statement. | +| doStmtCode.cpp:36:5:38:41 | do (...) ... | This is 'do' statement. | diff --git a/languages/cpp/rangeBasedForStmt/rangeBasedForStmtTest.expected b/languages/cpp/rangeBasedForStmt/rangeBasedForStmtTest.expected index e69de29..a8f88bf 100644 --- a/languages/cpp/rangeBasedForStmt/rangeBasedForStmtTest.expected +++ b/languages/cpp/rangeBasedForStmt/rangeBasedForStmtTest.expected @@ -0,0 +1,2 @@ +| rangeBasedForStmtCode.cpp:4:5:6:5 | for(...:...) ... | This is range based 'for' statement. | +| rangeBasedForStmtCode.cpp:13:5:15:5 | for(...:...) ... | This is range based 'for' statement. |