From 3797ea4290eecc0da5d4d7cef31d820bb7bc96e9 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Thu, 24 Aug 2023 09:24:08 +0200 Subject: [PATCH] Enable SARIF support on GitHub Actions Splitted from the initial Lint rework in #759. --- .github/workflows/Build.yaml | 6 ++++++ .../src/main/kotlin/AndroidLintConventionPlugin.kt | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 9a0dca106..3d49f3734 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -125,6 +125,12 @@ jobs: name: lint-reports path: '**/build/reports/lint-results-*.html' + - name: Upload lint reports (SARIF) + if: always() + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: './' + androidTest: needs: build runs-on: macOS-latest # enables hardware acceleration in the virtual machine diff --git a/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt index 1734df930..68ca58b2a 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt @@ -42,5 +42,6 @@ class AndroidLintConventionPlugin : Plugin { private fun Lint.configure() { xmlReport = true + sarifReport = true checkDependencies = true }