Skip to content

eliastomas11 protecting code quality! 🛡️ #26

eliastomas11 protecting code quality! 🛡️

eliastomas11 protecting code quality! 🛡️ #26

Workflow file for this run

name: Scan with Android Linter
run-name: ${{ github.actor }} protecting code quality! 🛡️
on:
pull_request:
branches:
- main
- develop
- 'releases/**'
paths:
- .github/workflows/android-lint.yml
- '*/src/**'
- gradle/**
- '**.gradle'
- gradle.properties
- gradlew*
jobs:
ktlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.2.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
- name: run ktlint
run: |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml
continue-on-error: true
- uses: yutailang0119/action-ktlint@v4
with:
report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1.
android-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: set up JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: gradle
- run: ./gradlew lint
- uses: yutailang0119/action-android-lint@v3
with:
report-path: build/reports/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
continue-on-error: false # If annotations contain error of severity, action-android-lint exit 1.