diff --git a/.github/workflows/lint-report.yml b/.github/workflows/lint-report.yml new file mode 100644 index 000000000..7cdda1ecc --- /dev/null +++ b/.github/workflows/lint-report.yml @@ -0,0 +1,31 @@ +name: Lint and Upload SARIF + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '17' + + - name: Run Android Lint + run: ./gradlew lint + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: app/build/reports/lint-results.sarif diff --git a/library/build.gradle b/library/build.gradle index 641cf7db1..be8c5dece 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -23,7 +23,9 @@ dokkaHtml { } android { - + lintOptions { + sarifOutput = file("$buildDir/reports/lint-results.sarif") + } defaultConfig { compileSdk 34 minSdkVersion 21