From 1bb206a9d5e301066fa32b6f95627b353e34fc01 Mon Sep 17 00:00:00 2001 From: Niel Markwick Date: Sun, 22 Sep 2024 17:02:58 +0200 Subject: [PATCH] chore: fix indentation issue and codeql build (#168) indentation incorrect in #163 codeQL autobuild replaced with manual JDK install/build --- .github/workflows/codeql-analysis.yml | 24 +++++++------------ .../solutions/spannerddl/diff/DdlDiff.java | 12 +++++----- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 47ffd5e..98e3524 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,6 +40,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -50,21 +57,8 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release + - name: Build with Maven + run: mvn -B verify --file pom.xml - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/src/main/java/com/google/cloud/solutions/spannerddl/diff/DdlDiff.java b/src/main/java/com/google/cloud/solutions/spannerddl/diff/DdlDiff.java index 6cd760a..ede3aee 100644 --- a/src/main/java/com/google/cloud/solutions/spannerddl/diff/DdlDiff.java +++ b/src/main/java/com/google/cloud/solutions/spannerddl/diff/DdlDiff.java @@ -380,12 +380,12 @@ public List generateDifferenceStatements(Map options) String optionsDiff = generateOptionsUpdates(Maps.difference(oldOptionsKv, newOptionsKv)); if (optionsDiff != null) { - output.add( - "ALTER CHANGE STREAM " - + changedChangeStream.rightValue().getName() - + " SET OPTIONS (" - + optionsDiff - + ")"); + output.add( + "ALTER CHANGE STREAM " + + changedChangeStream.rightValue().getName() + + " SET OPTIONS (" + + optionsDiff + + ")"); } } }