File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ ValidationOptions _getValidationOptionsFromYaml(String fileName) {
90
90
const kOverride = 'override' ;
91
91
92
92
void abort (Object e) {
93
- stderr.write (e);
93
+ stderr.writeln (e);
94
94
exit (kErrorCode);
95
95
}
96
96
@@ -135,7 +135,7 @@ ValidationOptions _getValidationOptionsFromYaml(String fileName) {
135
135
}
136
136
}, growable: false );
137
137
} else if (yamlIgnoredIssues != null ) {
138
- abort ("$kYamlError 'ignored ' must be a sequence." );
138
+ abort ("$kYamlError '$ kIgnore ' must be a sequence." );
139
139
}
140
140
141
141
final Object yamlOnlyIssues = yaml[kOnly];
@@ -150,7 +150,12 @@ ValidationOptions _getValidationOptionsFromYaml(String fileName) {
150
150
}
151
151
}, growable: false );
152
152
} else if (yamlOnlyIssues != null ) {
153
- abort ("$kYamlError 'only' must be a sequence." );
153
+ abort ("$kYamlError '$kOnly ' must be a sequence." );
154
+ }
155
+
156
+ if (onlyIssues != null && ignoredIssues != null ) {
157
+ abort ("$kYamlError option '$kOnly ' cannot be used "
158
+ "along with option '$kIgnore '." );
154
159
}
155
160
156
161
final Object yamlSeveritiesMap = yaml[kOverride];
Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ Context _getContextFromOptions(_JSValidationOptions options) {
229
229
}
230
230
231
231
if (options.onlyIssues != null && options.ignoredIssues != null ) {
232
- throw ArgumentError (
233
- 'options.onlyIssues cannot be used along with options.ignoredIssues.' );
232
+ throw ArgumentError ('options.onlyIssues cannot be used '
233
+ 'along with options.ignoredIssues.' );
234
234
}
235
235
236
236
if (options.onlyIssues != null ) {
You can’t perform that action at this time.
0 commit comments