File tree 4 files changed +51
-9
lines changed
4 files changed +51
-9
lines changed Original file line number Diff line number Diff line change 5
5
package-analysis :
6
6
runs-on : ubuntu-latest
7
7
steps :
8
- - uses : actions/checkout@v2 # required
9
- - uses : axel-op/dart-package-analyzer@v3
10
- with :
11
- # Required:
12
- githubToken : ${{ secrets.GITHUB_TOKEN }}
13
- # Optional:
14
- # relativePath: packages/mypackage/
8
+ - name : Checkout code
9
+ uses : actions/checkout@v2
10
+
11
+ - name : Setup Flutter
12
+ uses : subosito/flutter-action@v1
13
+
14
+ - name : Install dependencies
15
+ run : |
16
+ flutter pub get
17
+ (cd demo && flutter pub get)
18
+
19
+ - name : Analyze Dart
20
+ run : flutter analyze . --fatal-infos
21
+
22
+ - name : Validate Dart formatting
23
+ run : |
24
+ flutter format .
25
+ ./.github/workflows/scripts/validate-formatting.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ if [[ $( git ls-files --modified) ]]; then
3
+ echo " "
4
+ echo " "
5
+ echo " These files are not formatted correctly:"
6
+ for f in $( git ls-files --modified) ; do
7
+ echo " "
8
+ echo " "
9
+ echo " -----------------------------------------------------------------"
10
+ echo " $f "
11
+ echo " -----------------------------------------------------------------"
12
+ echo " "
13
+ git --no-pager diff --unified=0 --minimal $f
14
+ echo " "
15
+ echo " -----------------------------------------------------------------"
16
+ echo " "
17
+ echo " "
18
+ done
19
+ if [[ $GITHUB_WORKFLOW ]]; then
20
+ git checkout . > /dev/null 2>&1
21
+ fi
22
+ echo " "
23
+ echo " ❌ Some files are incorrectly formatted, see above output."
24
+ echo " "
25
+ echo " To fix these locally, run: 'flutter format .'."
26
+ exit 1
27
+ else
28
+ echo " "
29
+ echo " ✅ All files are formatted correctly."
30
+ fi
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ linter:
29
29
- slash_for_doc_comments
30
30
# pub related: https://dart.dev/tools/linter-rules#pub-rules
31
31
- depend_on_referenced_packages
32
- - secure_pubspec_urls
32
+ # TODO: this is currently not available in flutter-stable, uncomment once available
33
+ # - secure_pubspec_urls
33
34
# import related
34
35
- always_use_package_imports
35
36
- implementation_imports
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import 'package:flutter/services.dart';
8
8
/// functionality.
9
9
///
10
10
/// It is internally implemented using the [AppBar] class. What differs from
11
- /// the [AppBar] implementation is the behaviour of [leading] ,
11
+ /// the [AppBar] implementation is the behaviour of [leading] ,
12
12
/// [automaticallyImplyLeading] and [elevation] .
13
13
///
14
14
/// Usage example:
You can’t perform that action at this time.
0 commit comments