Skip to content

Commit 362d5ce

Browse files
authored
Enable and fix a few more lints (#388)
1 parent e4f37c5 commit 362d5ce

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

analysis_options.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ linter:
3737
- constant_identifier_names
3838
- control_flow_in_finally
3939
- curly_braces_in_flow_control_structures
40+
- depend_on_referenced_packages
4041
- directives_ordering
4142
- empty_catches
4243
- empty_constructor_bodies
@@ -49,13 +50,17 @@ linter:
4950
- join_return_with_assignment
5051
- library_names
5152
- library_prefixes
53+
- library_private_types_in_public_api
5254
- lines_longer_than_80_chars
5355
- list_remove_unrelated_type
5456
- literal_only_boolean_expressions
5557
- missing_whitespace_between_adjacent_strings
5658
- no_duplicate_case_values
59+
- no_leading_underscores_for_library_prefixes
60+
- no_leading_underscores_for_local_identifiers
5761
- no_runtimeType_toString
5862
- non_constant_identifier_names
63+
- null_check_on_nullable_type_parameter
5964
- null_closures
6065
- omit_local_variable_types
6166
- only_throw_errors
@@ -93,20 +98,25 @@ linter:
9398
- prefer_void_to_null
9499
- provide_deprecation_message
95100
- recursive_getters
101+
- require_trailing_commas
96102
- slash_for_doc_comments
97103
- sort_pub_dependencies
104+
- sort_unnamed_constructors_first
98105
- test_types_in_equals
99106
- throw_in_finally
100107
- type_annotate_public_apis
101108
- type_init_formals
102109
- unawaited_futures
103110
- unnecessary_brace_in_string_interps
104111
- unnecessary_const
112+
- unnecessary_constructor_name
105113
- unnecessary_getters_setters
106114
- unnecessary_lambdas
115+
- unnecessary_late
107116
- unnecessary_new
108117
- unnecessary_null_aware_assignments
109118
- unnecessary_null_in_if_null_operators
119+
- unnecessary_nullable_for_final_variable_declarations
110120
- unnecessary_overrides
111121
- unnecessary_parenthesis
112122
- unnecessary_statements
@@ -117,6 +127,6 @@ linter:
117127
- use_is_even_rather_than_modulo
118128
- use_rethrow_when_possible
119129
- use_string_buffers
130+
- use_super_parameters
120131
- valid_regexps
121132
- void_checks
122-
- require_trailing_commas

mono_repo/lib/src/mono_config.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ class MonoConfig {
3535
final String? selfValidateStage;
3636
final GitHubConfig github;
3737

38-
MonoConfig._({
39-
required this.githubConditionalStages,
40-
required this.mergeStages,
41-
required this.prettyAnsi,
42-
required this.pubAction,
43-
required this.selfValidateStage,
44-
required this.github,
45-
});
46-
4738
factory MonoConfig({
4839
required Set<String> mergeStages,
4940
required bool prettyAnsi,
@@ -63,6 +54,15 @@ class MonoConfig {
6354
);
6455
}
6556

57+
MonoConfig._({
58+
required this.githubConditionalStages,
59+
required this.mergeStages,
60+
required this.prettyAnsi,
61+
required this.pubAction,
62+
required this.selfValidateStage,
63+
required this.github,
64+
});
65+
6666
factory MonoConfig.fromJson(Map json) {
6767
final unsupportedKeys =
6868
json.keys.where((k) => !_allowedMonoConfigKeys.contains(k)).toList();

mono_repo/lib/src/root_config.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ class RootConfig extends ListBase<PackageConfig> {
6161
final MonoConfig monoConfig;
6262
final List<PackageConfig> _configs;
6363

64-
RootConfig._(this.rootDirectory, this.monoConfig, this._configs);
65-
6664
factory RootConfig({String? rootDirectory, bool recursive = true}) {
6765
rootDirectory ??= p.current;
6866

@@ -103,6 +101,8 @@ class RootConfig extends ListBase<PackageConfig> {
103101
);
104102
}
105103

104+
RootConfig._(this.rootDirectory, this.monoConfig, this._configs);
105+
106106
@override
107107
int get length => _configs.length;
108108

0 commit comments

Comments
 (0)