Skip to content

Commit b701db4

Browse files
authored
Merge pull request #74 from firebase/feat/pub-analyzer
feat: add pub analyzer action
2 parents 7e1ea00 + 79a8489 commit b701db4

File tree

20 files changed

+490
-47
lines changed

20 files changed

+490
-47
lines changed

.github/workflows/analyzer.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dart Analyzer
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
analyze:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: dart-lang/setup-dart@v1
12+
- uses: subosito/flutter-action@v2
13+
with:
14+
channel: stable
15+
- run: dart pub get
16+
- run: dart pub global activate melos
17+
- run: melos bootstrap
18+
- uses: invertase/github-action-dart-analyzer@v1
19+
with:
20+
fatal-infos: true

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ analytics/ios/firebase_app_id_file.json
4949
analytics/ios/Runner/GoogleService-Info.plist
5050
analytics/macos/firebase_app_id_file.json
5151
analytics/macos/Runner/GoogleService-Info.plist
52-
analytics/lib/firebase_options.dart
53-
dynamic_links/lib/firebase_options.dart
54-
55-
# ignore firebase_options.dart for all examples
56-
**/firebase_options.dart
5752

5853
# ignore .firebaserc for all examples
5954
**/.firebaserc

admob/test/widget_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:admob_quickstart/main.dart';
1313
void main() {
1414
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1515
// Build our app and trigger a frame.
16-
await tester.pumpWidget(const MyApp());
16+
await tester.pumpWidget(MyApp(state: ApplicationState()));
1717

1818
// Verify that our counter starts at 0.
1919
expect(find.text('0'), findsOneWidget);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
2+
3+
/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
4+
class DefaultFirebaseOptions {
5+
static FirebaseOptions get currentPlatform {
6+
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
2+
3+
/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
4+
class DefaultFirebaseOptions {
5+
static FirebaseOptions get currentPlatform {
6+
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
2+
3+
/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
4+
class DefaultFirebaseOptions {
5+
static FirebaseOptions get currentPlatform {
6+
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
7+
}
8+
}

cloud_functions/test/widget_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:cloud_functions_example/main.dart';
1313
void main() {
1414
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1515
// Build our app and trigger a frame.
16-
await tester.pumpWidget(const MyApp());
16+
await tester.pumpWidget(MyApp(state: ApplicationState()));
1717

1818
// Verify that our counter starts at 0.
1919
expect(find.text('0'), findsOneWidget);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
2+
3+
/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
4+
class DefaultFirebaseOptions {
5+
static FirebaseOptions get currentPlatform {
6+
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
2+
3+
/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
4+
class DefaultFirebaseOptions {
5+
static FirebaseOptions get currentPlatform {
6+
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
7+
}
8+
}

dynamic_links/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const title = 'Firebase Dynamic Links Quickstart';
3232

3333
class MyApp extends StatelessWidget {
3434
const MyApp({super.key, required this.state});
35-
35+
3636
final ApplicationState state;
3737

3838
// This widget is the root of your application.
@@ -60,7 +60,7 @@ class MyApp extends StatelessWidget {
6060

6161
class MyHomePage extends StatelessWidget {
6262
const MyHomePage({super.key, required this.title, required this.state});
63-
63+
6464
// This widget is the home page of your application. It is stateful, meaning
6565
// that it has a State object (defined below) that contains fields that affect
6666
// how it looks.

0 commit comments

Comments
 (0)