Skip to content

Commit 2f9a0cb

Browse files
Merge pull request #254 from Workiva/batch/fedx/workiva_analysis_options_v2
FEDX-1707: Workiva Analysis Options v2
2 parents ca31898 + 61a43ee commit 2f9a0cb

File tree

5 files changed

+3
-71
lines changed

5 files changed

+3
-71
lines changed

analysis_options.yaml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,4 @@
1+
include: package:workiva_analysis_options/v2.yaml
12
analyzer:
23
exclude:
34
- example/**
4-
linter:
5-
rules:
6-
# Error Rules
7-
- avoid_empty_else
8-
- cancel_subscriptions
9-
- close_sinks
10-
- comment_references
11-
- control_flow_in_finally
12-
- empty_statements
13-
- hash_and_equals
14-
- invariant_booleans
15-
- iterable_contains_unrelated_type
16-
- list_remove_unrelated_type
17-
- literal_only_boolean_expressions
18-
- test_types_in_equals
19-
- throw_in_finally
20-
- unrelated_type_equality_checks
21-
- valid_regexps
22-
23-
# Style Rules
24-
- always_declare_return_types
25-
- annotate_overrides
26-
- avoid_as
27-
- avoid_init_to_null
28-
- avoid_return_types_on_setters
29-
- await_only_futures
30-
- camel_case_types
31-
- constant_identifier_names
32-
- empty_catches
33-
- empty_constructor_bodies
34-
- implementation_imports
35-
- library_names
36-
- library_prefixes
37-
- non_constant_identifier_names
38-
- one_member_abstracts
39-
- only_throw_errors
40-
- overridden_fields
41-
- package_api_docs
42-
- package_prefixed_library_names
43-
- prefer_is_not_empty
44-
- slash_for_doc_comments
45-
- sort_constructors_first
46-
- sort_unnamed_constructors_first
47-
- type_annotate_public_apis
48-
- type_init_formals
49-
- unawaited_futures
50-
- unnecessary_brace_in_string_interps
51-
- unnecessary_getters_setters
52-
53-
# TODO
54-
#- public_member_api_docs
55-
56-
# This rule forces overly verbose declaration of variables.
57-
#- always_specify_types
58-
59-
# Pub Rules
60-
- package_names

lib/src/lifecycle_module.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ library w_module.src.lifecycle_module;
1717
import 'dart:async';
1818

1919
import 'package:logging/logging.dart';
20-
import 'package:meta/meta.dart' show mustCallSuper, protected, required;
20+
import 'package:meta/meta.dart' show mustCallSuper, protected;
2121
import 'package:opentracing/opentracing.dart';
2222
import 'package:w_common/disposable.dart';
2323

@@ -178,9 +178,6 @@ abstract class LifecycleModule extends SimpleModule with Disposable {
178178
}
179179

180180
final tracer = globalTracer();
181-
if (tracer == null) {
182-
return null;
183-
}
184181

185182
List<Reference> references = [];
186183
if (_parentContext != null) {
@@ -230,9 +227,6 @@ abstract class LifecycleModule extends SimpleModule with Disposable {
230227
}
231228

232229
final tracer = globalTracer();
233-
if (tracer == null) {
234-
return null;
235-
}
236230

237231
tracer
238232
.startSpan(

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dev_dependencies:
2222
matcher: ^0.12.10
2323
mocktail: ^1.0.3
2424
test: ^1.16.8
25+
workiva_analysis_options: ^1.4.1
2526

2627
dependency_validator:
2728
exclude:

test/event_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ void main() {
2828
event = Event<String>(key);
2929
});
3030

31-
test('should inherit from Stream', () {
32-
expect(event is Stream, isTrue);
33-
});
34-
3531
test('should provide means to listen to the stream it was created from',
3632
() async {
3733
Completer completer = Completer();

test/utils.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class _LogLevelMatcher extends Matcher {
3030

3131
@override
3232
bool matches(dynamic record, Map matchState) {
33-
if (_level == null) {
34-
return false;
35-
}
3633
if (record is LogRecord) {
3734
return record.level == _level;
3835
}

0 commit comments

Comments
 (0)