Skip to content

Commit 0a47e56

Browse files
FMorschelCommit Queue
authored andcommitted
[analyzer] Verifies we don't fail analysis on malformed analysis_options.yaml
Fixes: #56811 Change-Id: Iae92e6e3b7366f860d0c0cba7fec6314d85d099a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449561 Auto-Submit: Felipe Morschel <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent a90f390 commit 0a47e56

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pkg/analyzer/test/src/options/options_rule_validator_test.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,25 @@ linter:
271271
''');
272272
}
273273

274+
void test_incompatible_trigger_invalidMap() {
275+
newFile('/included.yaml', '''
276+
linter:
277+
rules:
278+
rule_neg: true
279+
''');
280+
assertErrors(
281+
'''
282+
include: included.yaml
283+
284+
linter:
285+
rules:
286+
rule_neg:
287+
rule_pos: true
288+
''',
289+
[AnalysisOptionsWarningCode.incompatibleLintFiles],
290+
);
291+
}
292+
274293
void test_incompatible_unsuportedValue_invalidMap() {
275294
newFile('/included.yaml', '''
276295
linter:

0 commit comments

Comments
 (0)