Skip to content

Commit

Permalink
Use reviewdog directly with sarifReport
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsilber committed Dec 21, 2023
1 parent 33d370e commit f6f30ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/android-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
distribution: 'zulu'
java-version: 17

- name: Setup reviewdog
uses: reviewdog/[email protected]

- name: Cache Gradle Files
uses: actions/[email protected]
with:
Expand All @@ -28,10 +31,11 @@ jobs:
- name: Run Android Lint
run: ./gradlew scratchoff:lintDebug

- name: Review Android Lint Results
uses: DVDAndroid/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
lint_xml_file: scratchoff/build/reports/lint-results-debug.html
reporter: github-pr-review
level: warning
- name: Review Lint Results
run: |
cat scratchoff/build/reports/lint-results-debug.sarif \
| reviewdog \
-name=android-lint \
-f=sarif \
-reporter=github-pr-review \
-level=warning
4 changes: 4 additions & 0 deletions scratchoff/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ android {
}
}

lintOptions {
sarifReport true
}

publishing {
singleVariant('release') {
withSourcesJar()
Expand Down

0 comments on commit f6f30ad

Please sign in to comment.