-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 979 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
39
40
41
42
name: Run code static analysis
on:
push:
branches: ["main"]
pull_request:
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Run lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Flutter
uses: subosito/flutter-action@v2
- name: Cache pub packages
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-cache-
- name: Get dependencies
run: |
find . -type f -name pubspec.yaml -execdir flutter pub get \;
- name: Analyze code
run: |
dart analyze --fatal-infos --fatal-warnings
- name: Check code formatting
if: always()
run: |
dart format --output=none --set-exit-if-changed .