From 8bb4b38614e9d1fe0149f88acb2a02214b21b1f9 Mon Sep 17 00:00:00 2001 From: Benjamin Muskalla Date: Wed, 24 Nov 2021 17:49:50 +0100 Subject: [PATCH 1/2] Create java-model-diff.yml --- .github/workflow/java-model-diff.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflow/java-model-diff.yml diff --git a/.github/workflow/java-model-diff.yml b/.github/workflow/java-model-diff.yml new file mode 100644 index 000000000000..ecdf0ac4b83f --- /dev/null +++ b/.github/workflow/java-model-diff.yml @@ -0,0 +1,51 @@ +name: Diff generated Models as Data + +on: + pull_request: + branches: + - main + paths: + - "java/ql/src/utils/model-generator/**/*.*" + +jobs: + model-diff: + runs-on: ubuntu-latest + + steps: + - name: Clone self (github/codeql) for baseline + uses: actions/checkout@v2 + with: + path: codeql-baseline + ref: ${{ github.base_ref }} + - name: Clone self (github/codeql) with new generator + uses: actions/checkout@v2 + with: + path: codeql-current + ref: ${{ github.ref }} + - name: Show setup + run: | + echo "Baseline: ${{ github.base_ref }}" + echo "Current: ${{ github.ref }}" + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Download CodeQL CLI + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" + - name: Unzip CodeQL CLI + run: unzip -d codeql-cli codeql-linux64.zip + - name: Build modeled package list + run: | + mkdir tmp-models + SLUG="apache/commons-io" + SHORTNAME="commons-io" + projectId=`curl -s https://lgtm.com/api/v1.0/projects/g/$SLUG | jq .id` + curl -L "https://lgtm.com/api/v1.0/snapshots/$projectId/java" -o $SHORTNAME.zip + PATH="$PATH:codeql-cli/codeql" python java/ql/src/utils/model-generator/GenerateFlowModel.py $SHORTNAME.zip tmp-models/$SHORTNAME.qll + git add tmp-models/$SHORTNAME.qll + - name: Show diff + run: | + git diff tmp-models/ From da76e05ebf0ed831ba82ed508d7c83bde121af6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 16:56:14 +0000 Subject: [PATCH 2/2] Update tree-sitter requirement from 0.19 to 0.20 in /ruby/extractor Updates the requirements on [tree-sitter](https://github.com/tree-sitter/tree-sitter) to permit the latest version. - [Release notes](https://github.com/tree-sitter/tree-sitter/releases) - [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.19.0...v0.20.1) --- updated-dependencies: - dependency-name: tree-sitter dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- ruby/extractor/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index efc5a12159d8..3a91da43f86e 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] flate2 = "1.0" node-types = { path = "../node-types" } -tree-sitter = "0.19" +tree-sitter = "0.20" tree-sitter-embedded-template = "0.19" tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "bb6a42e42b048627a74a127d3e0184c1eef01de9" } clap = "2.33"