@@ -14,11 +14,12 @@ class CustomLintConfigs {
14
14
@internal
15
15
const CustomLintConfigs ({
16
16
required this .enableAllLintRules,
17
+ required this .verbose,
18
+ required this .debug,
17
19
required this .rules,
18
20
});
19
21
20
22
/// Decode a [CustomLintConfigs] from a file.
21
- @internal
22
23
factory CustomLintConfigs .parse (
23
24
File ? analysisOptionsFile,
24
25
PackageConfig packageConfig,
@@ -67,9 +68,15 @@ class CustomLintConfigs {
67
68
68
69
final rules = < String , LintOptions > {...includedOptions.rules};
69
70
final enableAllLintRulesYaml = customLint['enable_all_lint_rules' ];
70
- final enableAllLintRules = enableAllLintRulesYaml is bool ?
71
- ? enableAllLintRulesYaml ?? includedOptions.enableAllLintRules
72
- : null ;
71
+ final enableAllLintRules = enableAllLintRulesYaml is bool
72
+ ? enableAllLintRulesYaml
73
+ : includedOptions.enableAllLintRules;
74
+
75
+ final debugYaml = customLint['debug' ];
76
+ final debug = debugYaml is bool ? debugYaml : includedOptions.debug;
77
+
78
+ final verboseYaml = customLint['verbose' ];
79
+ final verbose = verboseYaml is bool ? verboseYaml : includedOptions.verbose;
73
80
74
81
final rulesYaml = customLint['rules' ] as Object ? ;
75
82
@@ -103,6 +110,8 @@ class CustomLintConfigs {
103
110
104
111
return CustomLintConfigs (
105
112
enableAllLintRules: enableAllLintRules,
113
+ verbose: verbose,
114
+ debug: debug,
106
115
rules: UnmodifiableMapView (rules),
107
116
);
108
117
}
@@ -111,6 +120,8 @@ class CustomLintConfigs {
111
120
@internal
112
121
static const empty = CustomLintConfigs (
113
122
enableAllLintRules: null ,
123
+ verbose: false ,
124
+ debug: false ,
114
125
rules: {},
115
126
);
116
127
@@ -130,15 +141,25 @@ class CustomLintConfigs {
130
141
/// along with extra per-lint configuration.
131
142
final Map <String , LintOptions > rules;
132
143
144
+ /// Whether to enable verbose logging.
145
+ final bool verbose;
146
+
147
+ /// Whether enable hot-reload and log the VM-service URI.
148
+ final bool debug;
149
+
133
150
@override
134
151
bool operator == (Object other) =>
135
152
other is CustomLintConfigs &&
136
153
other.enableAllLintRules == enableAllLintRules &&
154
+ other.verbose == verbose &&
155
+ other.debug == debug &&
137
156
const MapEquality <String , LintOptions >().equals (other.rules, rules);
138
157
139
158
@override
140
159
int get hashCode => Object .hash (
141
160
enableAllLintRules,
161
+ verbose,
162
+ debug,
142
163
const MapEquality <String , LintOptions >().hash (rules),
143
164
);
144
165
}
0 commit comments