GitHub Action to run Android Lint and report issues using reviewdog
This action runs Android Lint and reports the results using reviewdog. It takes an Android Lint XML result file, converts it to checkstyle format, and then passes it to reviewdog for reporting.
name: Android Lint with Reviewdog
on: [pull_request]
jobs:
android-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install reviewdog
- name: Install reviewdog
uses: reviewdog/action-setup@v1
# Run your Android Lint command to generate the XML report
- name: Run Android Lint
run: ./gradlew lint
# Run the Android Lint Action to report issues
- name: Report Android Lint Results
uses: ilyagulya/android-lint-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
lint_xml_file: app/build/reports/lint-results.xml
reporter: github-pr-review
level: warning
You must install reviewdog before using this action. We recommend using the official reviewdog/action-setup GitHub Action:
- name: Install reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest # or specify a version like 'v0.14.1'
Alternatively, you can install reviewdog manually:
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH
Name | Description | Required | Default |
---|---|---|---|
github_token |
GITHUB_TOKEN to use for reviewdog | Yes | GITHUB_TOKEN |
lint_xml_file |
Path to the Android Lint XML result file | Yes | - |
reporter |
Reporter of reviewdog [github-pr-check, github-pr-review, github-check] | No | github-pr-check |
level |
Report level for reviewdog [info, warning, error] | No | warning |
reviewdog_flags |
Additional reviewdog flags | No | - |
- Takes the Android Lint XML report as input
- Converts the Android Lint XML format to Checkstyle XML format
- Verifies that reviewdog is installed
- Uses reviewdog to report the issues on GitHub pull requests or checks
android-lint-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.