Skip to content

Commit

Permalink
analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Sep 7, 2023
1 parent a58034f commit 2620276
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions dart/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include: package:lints/recommended.yaml
analyzer:
exclude:
- example/** # the example has its own 'analysis_options.yaml'
- test/*.mocks.dart
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: error
Expand Down
2 changes: 2 additions & 0 deletions flutter/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
- test/*.mocks.dart
language:
strict-casts: true
strict-inference: true
Expand Down
1 change: 0 additions & 1 deletion flutter/lib/src/profiling.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:io';

import 'package:sentry/sentry.dart';
// ignore: implementation_imports
Expand Down
4 changes: 2 additions & 2 deletions flutter/test/profiling_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:sentry_flutter/src/profiling.dart';
import 'package:sentry_flutter/src/sentry_native.dart';
import 'package:sentry_flutter/src/sentry_native_channel.dart';
import 'mocks.dart';
import 'mocks.mocks.dart';
import 'sentry_flutter_test.dart';
Expand All @@ -25,10 +23,12 @@ void main() {
test('attachTo() respects sampling rate', () async {
var hub = hubWithSampleRate(0.0);
NativeProfilerFactory.attachTo(hub);
// ignore: invalid_use_of_internal_member
verifyNever(hub.profilerFactory = any);

hub = hubWithSampleRate(0.1);
NativeProfilerFactory.attachTo(hub);
// ignore: invalid_use_of_internal_member
verify(hub.profilerFactory = any);
});

Expand Down

0 comments on commit 2620276

Please sign in to comment.