summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/android-ktlint.yml
blob: 3f9483f36b2f903dc2f5e179220bff00459f34fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Android app Kotlin linter
on:
    # Run linter whenever a Kotlin file changes
    pull_request:
        paths:
            - .github/workflows/android-ktlint.yml
            - android/**/*.kt
    # Run linter if requested manually from the Actions tab
    workflow_dispatch:
jobs:
    ktlint:
        runs-on: ubuntu-latest
        steps:
            # Checkout repository
            - uses: actions/checkout@v2

            # Install Ktlint
            - uses: nbadal/action-ktlint-setup@v1
              with:
                  ktlint_version: 0.40.0

            # Check formatting
            - run: |
                cd android
                ktlint -a