-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (34 loc) · 936 Bytes
/
lint.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
name: "lint"
on:
- push
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --check
ktlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin # See 'Supported distributions' for available options
java-version: 17
- name: Download ktlint
run: |
curl -sSL https://api.github.com/repos/pinterest/ktlint/releases/latest |
jq '.assets[].browser_download_url | select(endswith("ktlint"))' |
xargs curl -sSLO
chmod +x ktlint
- name: Run ktlint
run: |
cd android
../ktlint