Devops: KTLint to lint Kotlin code (#6)

* Adds KTLint as a GitHub action
* Adds KTLint to the gradle project for IDE integration
* Adds .editorconfig to configure KTLint (android/)
This commit is contained in:
Marc Rousavy
2021-02-26 10:56:20 +01:00
committed by GitHub
parent 2e60110070
commit 03b9246afe
31 changed files with 1233 additions and 1190 deletions

View File

@@ -7,10 +7,12 @@ on:
paths:
- '.github/workflows/validate-android.yml'
- 'android/**'
- '.editorconfig'
pull_request:
paths:
- '.github/workflows/validate-android.yml'
- 'android/**'
- '.editorconfig'
jobs:
lint:
@@ -32,3 +34,12 @@ jobs:
- uses: yutailang0119/action-android-lint@v1.0.2
with:
xml_path: android/build/reports/lint-results.xml
ktlint:
name: Kotlin Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run KTLint
uses: mrousavy/action-ktlint@v1.6
with:
github_token: ${{ secrets.github_token }}