Skip to content

Commit 27e1631

Browse files
committed
fun fix & format
1 parent f506708 commit 27e1631

File tree

7 files changed

+26
-12
lines changed

7 files changed

+26
-12
lines changed

flutter/lib/src/jvm/jvm_exception.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,8 @@ class JvmException {
257257
}
258258

259259
final thisExceptionFrames = thisException
260+
.where((line) => line.trim().isNotEmpty)
260261
.map((e) => JvmFrame.parse(e))
261-
.where(
262-
(e) => e.originalFrame.isNotEmpty && e.originalFrame.trim() != 'at')
263262
.toList(growable: false);
264263

265264
final suppressedExceptions = supressed

flutter/test/jvm/jvm_exception_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void main() {
8686
expect(exception.stackTrace[0].lineNumber, 292);
8787
});
8888

89-
test('parse drops frames with `at ` and empty original frame', () {
89+
test('parse drops empty frames', () {
9090
final exception = JvmException.parse(platformExceptionWithEmptyStackFrames);
9191
expect(exception.stackTrace.length, 13);
9292
expect(exception.stackTrace.last.className,
@@ -220,5 +220,5 @@ java.lang.RuntimeException: Catch this platform exception!
220220
at java.lang.reflect.Method.invoke
221221
at com.android.internal.os.RuntimeInit\$MethodAndArgsCaller.run(RuntimeInit.java:548)
222222
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
223-
at
223+
224224
''';

flutter/test/sentry_navigator_observer_test.dart

+1
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ class _MockHub extends MockHub {
756756
@override
757757
final options = SentryOptions(dsn: fakeDsn);
758758

759+
@override
759760
late final scope = Scope(options);
760761

761762
@override

sqflite/lib/src/sentry_database.dart

+11-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ class SentryDatabase extends SentryDatabaseExecutor implements Database {
5858
@internal Hub? hub,
5959
}) : _hub = hub ?? HubAdapter(),
6060
dbName = p.basenameWithoutExtension(_database.path),
61-
super(_database,
62-
hub: hub, dbName: p.basenameWithoutExtension(_database.path)) {
61+
super(
62+
_database,
63+
hub: hub,
64+
dbName: p.basenameWithoutExtension(_database.path),
65+
) {
6366
// ignore: invalid_use_of_internal_member
6467
final options = _hub.options;
6568
options.sdk.addIntegration('SentrySqfliteTracing');
@@ -132,8 +135,12 @@ class SentryDatabase extends SentryDatabaseExecutor implements Database {
132135
setDatabaseAttributeData(span, dbName);
133136

134137
Future<T> newAction(Transaction txn) async {
135-
final executor = SentryDatabaseExecutor(txn,
136-
parentSpan: span, hub: _hub, dbName: dbName);
138+
final executor = SentryDatabaseExecutor(
139+
txn,
140+
parentSpan: span,
141+
hub: _hub,
142+
dbName: dbName,
143+
);
137144
final sentrySqfliteTransaction =
138145
SentrySqfliteTransaction(executor, hub: _hub, dbName: dbName);
139146

sqflite/test/mocks/mocks.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ ISentrySpan startTransactionShim(
3434
],
3535
customMocks: [
3636
MockSpec<Hub>(
37-
fallbackGenerators: {#startTransaction: startTransactionShim}),
37+
fallbackGenerators: {#startTransaction: startTransactionShim},
38+
),
3839
],
3940
)
4041
void main() {}

sqflite/test/sentry_batch_test.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ SELECT * FROM Product''';
296296
final span = fixture.tracer.children.last;
297297
expect(span.data[SentryDatabase.dbSystemKey], SentryDatabase.dbSystem);
298298
expect(
299-
span.data[SentryDatabase.dbNameKey], (db as SentryDatabase).dbName);
299+
span.data[SentryDatabase.dbNameKey],
300+
(db as SentryDatabase).dbName,
301+
);
300302

301303
await db.close();
302304
});
@@ -313,7 +315,9 @@ SELECT * FROM Product''';
313315
final span = fixture.tracer.children.last;
314316
expect(span.data[SentryDatabase.dbSystemKey], SentryDatabase.dbSystem);
315317
expect(
316-
span.data[SentryDatabase.dbNameKey], (db as SentryDatabase).dbName);
318+
span.data[SentryDatabase.dbNameKey],
319+
(db as SentryDatabase).dbName,
320+
);
317321

318322
await db.close();
319323
});

sqflite/test/sentry_database_test.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ void main() {
112112
expect(insertSpan.context.parentSpanId, trSpan.context.spanId);
113113
expect(insertSpan.status, SpanStatus.ok());
114114
expect(
115-
insertSpan.data[SentryDatabase.dbSystemKey], SentryDatabase.dbSystem);
115+
insertSpan.data[SentryDatabase.dbSystemKey],
116+
SentryDatabase.dbSystem,
117+
);
116118
expect(insertSpan.data[SentryDatabase.dbNameKey], inMemoryDatabasePath);
117119

118120
expect(

0 commit comments

Comments
 (0)