Skip to content

Commit

Permalink
Merge pull request #254 from Workiva/batch/fedx/workiva_analysis_opti…
Browse files Browse the repository at this point in the history
…ons_v2

FEDX-1707: Workiva Analysis Options v2
  • Loading branch information
rmconsole3-wf authored Oct 17, 2024
2 parents ca31898 + 61a43ee commit 2f9a0cb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 71 deletions.
58 changes: 1 addition & 57 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,4 @@
include: package:workiva_analysis_options/v2.yaml
analyzer:
exclude:
- example/**
linter:
rules:
# Error Rules
- avoid_empty_else
- cancel_subscriptions
- close_sinks
- comment_references
- control_flow_in_finally
- empty_statements
- hash_and_equals
- invariant_booleans
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- literal_only_boolean_expressions
- test_types_in_equals
- throw_in_finally
- unrelated_type_equality_checks
- valid_regexps

# Style Rules
- always_declare_return_types
- annotate_overrides
- avoid_as
- avoid_init_to_null
- avoid_return_types_on_setters
- await_only_futures
- camel_case_types
- constant_identifier_names
- empty_catches
- empty_constructor_bodies
- implementation_imports
- library_names
- library_prefixes
- non_constant_identifier_names
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_prefixed_library_names
- prefer_is_not_empty
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- type_annotate_public_apis
- type_init_formals
- unawaited_futures
- unnecessary_brace_in_string_interps
- unnecessary_getters_setters

# TODO
#- public_member_api_docs

# This rule forces overly verbose declaration of variables.
#- always_specify_types

# Pub Rules
- package_names
8 changes: 1 addition & 7 deletions lib/src/lifecycle_module.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ library w_module.src.lifecycle_module;
import 'dart:async';

import 'package:logging/logging.dart';
import 'package:meta/meta.dart' show mustCallSuper, protected, required;
import 'package:meta/meta.dart' show mustCallSuper, protected;
import 'package:opentracing/opentracing.dart';
import 'package:w_common/disposable.dart';

Expand Down Expand Up @@ -178,9 +178,6 @@ abstract class LifecycleModule extends SimpleModule with Disposable {
}

final tracer = globalTracer();
if (tracer == null) {
return null;
}

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

final tracer = globalTracer();
if (tracer == null) {
return null;
}

tracer
.startSpan(
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dev_dependencies:
matcher: ^0.12.10
mocktail: ^1.0.3
test: ^1.16.8
workiva_analysis_options: ^1.4.1

dependency_validator:
exclude:
Expand Down
4 changes: 0 additions & 4 deletions test/event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ void main() {
event = Event<String>(key);
});

test('should inherit from Stream', () {
expect(event is Stream, isTrue);
});

test('should provide means to listen to the stream it was created from',
() async {
Completer completer = Completer();
Expand Down
3 changes: 0 additions & 3 deletions test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class _LogLevelMatcher extends Matcher {

@override
bool matches(dynamic record, Map matchState) {
if (_level == null) {
return false;
}
if (record is LogRecord) {
return record.level == _level;
}
Expand Down

0 comments on commit 2f9a0cb

Please sign in to comment.