Skip to content

Commit 43e0131

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer_testing: Rename PubPackageResolutionTest.ignoredErrorCodes to ignoredDiagnosticCodes
Change-Id: I0a951ecbf8aa74d1c00df99e0f5bdab84bb00dde Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430542 Reviewed-by: Keerti Parthasarathy <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 9585877 commit 43e0131

7 files changed

+11
-9
lines changed

pkg/analyzer_testing/lib/src/analysis_rule/pub_package_resolution.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class PubPackageResolutionTest with MockPackagesMixin, ResourceProviderMixin {
152152
List<String> get experiments => experimentsForTests;
153153

154154
/// Error codes that by default should be ignored in test expectations.
155-
List<DiagnosticCode> get ignoredErrorCodes => [
155+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
156156
WarningCode.UNUSED_ELEMENT,
157157
WarningCode.UNUSED_FIELD,
158158
WarningCode.UNUSED_LOCAL_VARIABLE,
@@ -184,7 +184,7 @@ class PubPackageResolutionTest with MockPackagesMixin, ResourceProviderMixin {
184184
/// The diagnostics that were computed during analysis.
185185
List<Diagnostic> get _diagnostics =>
186186
result.errors
187-
.where((e) => !ignoredErrorCodes.any((c) => e.errorCode == c))
187+
.where((e) => !ignoredDiagnosticCodes.any((c) => e.errorCode == c))
188188
.toList();
189189

190190
Folder get _sdkRoot => newFolder('/sdk');

pkg/linter/test/rules/always_put_control_body_on_new_line_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
@reflectiveTest
1717
class AlwaysPutControlBodyOnNewLineTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
2020
WarningCode.DEAD_CODE,
2121
WarningCode.UNUSED_LOCAL_VARIABLE,
2222
];

pkg/linter/test/rules/combinators_ordering_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ void main() {
1616
@reflectiveTest
1717
class CombinatorsOrderingTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [WarningCode.UNUSED_IMPORT];
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
20+
WarningCode.UNUSED_IMPORT,
21+
];
2022

2123
@override
2224
String get lintRule => LintNames.combinators_ordering;

pkg/linter/test/rules/deprecated_member_use_from_same_package_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
@reflectiveTest
1717
class DeprecatedMemberUseFromSamePackageTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
2020
HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE,
2121
HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE,
2222
WarningCode.UNUSED_LOCAL_VARIABLE,

pkg/linter/test/rules/library_prefixes_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
@reflectiveTest
1717
class LibraryPrefixesTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
2020
WarningCode.UNUSED_IMPORT,
2121
WarningCode.UNUSED_LOCAL_VARIABLE,
2222
];

pkg/linter/test/rules/no_leading_underscores_for_library_prefixes_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
@reflectiveTest
1717
class NoLeadingUnderscoresForLibraryPrefixesTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
2020
WarningCode.UNUSED_IMPORT,
2121
WarningCode.UNUSED_LOCAL_VARIABLE,
2222
];

pkg/linter/test/rules/no_leading_underscores_for_local_identifiers_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ void main() {
1616
@reflectiveTest
1717
class NoLeadingUnderscoresForLocalIdentifiersTest extends LintRuleTest {
1818
@override
19-
List<DiagnosticCode> get ignoredErrorCodes => [
19+
List<DiagnosticCode> get ignoredDiagnosticCodes => [
2020
WarningCode.UNUSED_CATCH_STACK,
21-
...super.ignoredErrorCodes,
21+
...super.ignoredDiagnosticCodes,
2222
];
2323

2424
@override

0 commit comments

Comments
 (0)