diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart index 81c4a990e2f..cda0e015dc3 100644 --- a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart +++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart @@ -112,9 +112,6 @@ class HintCode extends DiagnosticCode { hasPublishedDocs: true, ); - @Deprecated("Please use unnecessaryImport") - static const HintCode UNNECESSARY_IMPORT = unnecessaryImport; - /// Initialize a newly created error code to have the given [name]. const HintCode( String name, diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart index ad974b9876b..7f889d8be39 100644 --- a/pkg/analyzer/lib/src/error/codes.g.dart +++ b/pkg/analyzer/lib/src/error/codes.g.dart @@ -2542,10 +2542,6 @@ class CompileTimeErrorCode extends DiagnosticCode { hasPublishedDocs: true, ); - @Deprecated("Please use importInternalLibrary") - static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY = - importInternalLibrary; - /// Parameters: /// String p0: the URI pointing to a non-library declaration static const CompileTimeErrorCode importOfNonLibrary = CompileTimeErrorCode( @@ -7834,9 +7830,6 @@ class WarningCode extends DiagnosticCode { hasPublishedDocs: true, ); - @Deprecated("Please use unusedElement") - static const WarningCode UNUSED_ELEMENT = unusedElement; - /// Parameters: /// Object p0: the name of the parameter that is declared but not used static const WarningCode unusedElementParameter = WarningCode( @@ -7864,9 +7857,6 @@ class WarningCode extends DiagnosticCode { hasPublishedDocs: true, ); - @Deprecated("Please use unusedImport") - static const WarningCode UNUSED_IMPORT = unusedImport; - /// Parameters: /// String p0: the label that isn't used static const WarningCode unusedLabel = WarningCode( @@ -7887,9 +7877,6 @@ class WarningCode extends DiagnosticCode { hasPublishedDocs: true, ); - @Deprecated("Please use unusedLocalVariable") - static const WarningCode UNUSED_LOCAL_VARIABLE = unusedLocalVariable; - /// Parameters: /// String p0: the name of the annotated method, property or function static const WarningCode unusedResult = WarningCode( diff --git a/pkg/analyzer/tool/messages/error_code_info.dart b/pkg/analyzer/tool/messages/error_code_info.dart index e06cdd05b90..7cce730346e 100644 --- a/pkg/analyzer/tool/messages/error_code_info.dart +++ b/pkg/analyzer/tool/messages/error_code_info.dart @@ -35,7 +35,6 @@ const List errorClasses = [ name: 'CompileTimeErrorCode', type: 'COMPILE_TIME_ERROR', deprecatedSnakeCaseNames: { - 'IMPORT_INTERNAL_LIBRARY', // Referenced by `verify_docs.dart`. 'INSTANCE_ACCESS_TO_STATIC_MEMBER', // Referenced by `messages.yaml`. 'INVALID_OVERRIDE', // Referenced by `messages.yaml`. 'TYPE_ARGUMENT_NOT_MATCHING_BOUNDS', // Referenced by `messages.yaml`. @@ -58,25 +57,13 @@ const List errorClasses = [ name: 'WarningCode', type: 'STATIC_WARNING', severity: 'WARNING', - deprecatedSnakeCaseNames: { - 'UNUSED_ELEMENT', // Referenced by `verify_docs.dart`. - 'UNUSED_IMPORT', // Referenced by `verify_docs.dart`. - 'UNUSED_LOCAL_VARIABLE', // Referenced by `verify_docs.dart`. - }, ), ErrorClassInfo( file: ffiCodesFile, name: 'FfiCode', type: 'COMPILE_TIME_ERROR', ), - ErrorClassInfo( - file: hintCodesFile, - name: 'HintCode', - type: 'HINT', - deprecatedSnakeCaseNames: { - 'UNNECESSARY_IMPORT', // Referenced by `verify_docs.dart`. - }, - ), + ErrorClassInfo(file: hintCodesFile, name: 'HintCode', type: 'HINT'), ErrorClassInfo( file: syntacticErrorsFile, name: 'ParserErrorCode', diff --git a/tools/verify_docs/bin/verify_docs.dart b/tools/verify_docs/bin/verify_docs.dart index 0f7e600afcc..64ce454d15a 100755 --- a/tools/verify_docs/bin/verify_docs.dart +++ b/tools/verify_docs/bin/verify_docs.dart @@ -4,13 +4,6 @@ // Read the ../README.md file for the recognized syntax. -// This file uses some SCREAMING_CAPS diagnostic names that are private to the -// analyzer package. Those names will soon be deprecated since the analyzer will -// switch to using camelCase diagnostic names. This "ignore" comment will -// prevent a bot failure when the deprecation happens. TODO(paulberry): clean -// this up. -// ignore_for_file: deprecated_member_use - import 'dart:collection'; import 'dart:io'; @@ -350,21 +343,21 @@ class ValidateCommentCodeSamplesVisitor extends GeneralizingAstVisitor { // Filter out unused imports, since we speculatively add imports to some // samples. diagnostics - .removeWhere((e) => e.diagnosticCode == WarningCode.UNUSED_IMPORT); + .removeWhere((e) => e.diagnosticCode == WarningCode.unusedImport); // Also, don't worry about 'unused_local_variable' and related; this may // be intentional in samples. diagnostics.removeWhere( (e) => - e.diagnosticCode == WarningCode.UNUSED_LOCAL_VARIABLE || - e.diagnosticCode == WarningCode.UNUSED_ELEMENT, + e.diagnosticCode == WarningCode.unusedLocalVariable || + e.diagnosticCode == WarningCode.unusedElement, ); // Handle edge case around dart:_http diagnostics.removeWhere((e) { if (e.message.contains("'dart:_http'")) { - return e.diagnosticCode == HintCode.UNNECESSARY_IMPORT || - e.diagnosticCode == CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY; + return e.diagnosticCode == HintCode.unnecessaryImport || + e.diagnosticCode == CompileTimeErrorCode.importInternalLibrary; } return false; });