Skip to content

Commit ff6eb83

Browse files
committed
chore: ensure the full analysis options are used when formatting
Install the dependencies so that the full analysis options are used when formatting.
1 parent 6a75a4d commit ff6eb83

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

templates/dart/.github/workflows/format.yml.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
persist-credentials: true
2121
ref: ${{ '{{'}} github.event.pull_request.head.ref {{ '}}' }}
2222

23+
- name: Install dependencies
24+
run: dart pub get
25+
2326
- name: Format Dart code
2427
run: dart format .
2528

@@ -29,5 +32,5 @@ jobs:
2932
- name: Add & Commit
3033
uses: EndBug/[email protected]
3134
with:
32-
add: lib
35+
add: '["lib", "test"]'
3336

templates/flutter/.github/workflows/format.yml.twig

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
jobs:
1111
format:
1212
runs-on: ubuntu-latest
13-
container:
14-
image: dart:stable
1513

1614
steps:
1715
- name: Checkout repository
@@ -20,6 +18,14 @@ jobs:
2018
persist-credentials: true
2119
ref: ${{ '{{'}} github.event.pull_request.head.ref {{ '}}' }}
2220

21+
- name: Install Flutter
22+
uses: subosito/flutter-action@v2
23+
with:
24+
channel: stable
25+
26+
- name: Install dependencies
27+
run: flutter pub get
28+
2329
- name: Format Dart code
2430
run: dart format .
2531

@@ -29,5 +35,5 @@ jobs:
2935
- name: Add & Commit
3036
uses: EndBug/[email protected]
3137
with:
32-
add: lib
38+
add: '["lib", "test"]'
3339

0 commit comments

Comments
 (0)