[analyzer] Mark latest diagnostic docs as published Also fixes two small errors in two of the newly published docs. Change-Id: Id7bdaeb872a19340ebe16e00bbab95f891da4dca Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/466360 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Paul Berry <paulberry@google.com>
diff --git a/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart b/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart index a2e8e7d..faea696 100644 --- a/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart +++ b/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart
@@ -387,6 +387,7 @@ name: 'analysis_option_deprecated', problemMessage: "The option '{0}' is no longer supported.", correctionMessage: "Try removing the option.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'analysis_option_deprecated', withArguments: _withArgumentsAnalysisOptionDeprecated, @@ -405,6 +406,7 @@ name: 'analysis_option_deprecated', problemMessage: "The option '{0}' is no longer supported.", correctionMessage: "Try using the new '{1}' option.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'analysis_option_deprecated_with_replacement', withArguments: _withArgumentsAnalysisOptionDeprecatedWithReplacement, @@ -3293,6 +3295,7 @@ name: 'deprecated_lint', problemMessage: "The lint rule '{0}' is deprecated and shouldn't be enabled.", correctionMessage: "Try removing '{0}'.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'deprecated_lint', withArguments: _withArgumentsDeprecatedLint, @@ -4030,6 +4033,7 @@ problemMessage: "The rule '{0}' is already enabled and doesn't need to be enabled again.", correctionMessage: "Try removing all but one occurrence of the rule.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'duplicate_rule', withArguments: _withArgumentsDuplicateRule, @@ -6801,6 +6805,7 @@ includedFileParseError = DiagnosticWithArguments( name: 'included_file_parse_error', problemMessage: "{3} in {0}({1}..{2})", + hasPublishedDocs: true, type: DiagnosticType.COMPILE_TIME_ERROR, uniqueName: 'included_file_parse_error', withArguments: _withArgumentsIncludedFileParseError, @@ -6832,6 +6837,7 @@ includedFileWarning = DiagnosticWithArguments( name: 'included_file_warning', problemMessage: "Warning in the included options file {0}({1}..{2}): {3}", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'included_file_warning', withArguments: _withArgumentsIncludedFileWarning, @@ -6861,6 +6867,7 @@ name: 'include_file_not_found', problemMessage: "The URI '{0}' included in '{1}' can't be found when analyzing '{2}'.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'include_file_not_found', withArguments: _withArgumentsIncludeFileNotFound, @@ -6888,6 +6895,7 @@ name: 'incompatible_lint', problemMessage: "The rule '{0}' is incompatible with '{1}'.", correctionMessage: "Try removing all but one of the incompatible rules.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'incompatible_lint', withArguments: _withArgumentsIncompatibleLint, @@ -6910,6 +6918,7 @@ correctionMessage: "Try locally disabling all but one of the conflicting rules or " "removing one of the incompatible files.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'incompatible_lint_files', withArguments: _withArgumentsIncompatibleLintFiles, @@ -6939,6 +6948,7 @@ correctionMessage: "Try locally disabling all but one of the conflicting rules or " "removing one of the incompatible files.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'incompatible_lint_included', withArguments: _withArgumentsIncompatibleLintIncluded, @@ -8687,6 +8697,7 @@ invalidOption = DiagnosticWithArguments( name: 'invalid_option', problemMessage: "Invalid option specified for '{0}': {1}", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'invalid_option', withArguments: _withArgumentsInvalidOption, @@ -8856,6 +8867,7 @@ invalidSectionFormat = DiagnosticWithArguments( name: 'invalid_section_format', problemMessage: "Invalid format for the '{0}' section.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'invalid_section_format', withArguments: _withArgumentsInvalidSectionFormat, @@ -12942,6 +12954,7 @@ parseError = DiagnosticWithArguments( name: 'parse_error', problemMessage: "{0}", + hasPublishedDocs: true, type: DiagnosticType.COMPILE_TIME_ERROR, uniqueName: 'parse_error', withArguments: _withArgumentsParseError, @@ -13289,6 +13302,7 @@ "of a package that isn't in a workspace.", correctionMessage: "Try specifying plugins in an analysis options file at '{0}'.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'plugins_in_inner_options', withArguments: _withArgumentsPluginsInInnerOptions, @@ -13470,6 +13484,7 @@ "The corresponding public name '{0}' is already the name of another " "parameter.", correctionMessage: "Try renaming one of the parameters.", + hasPublishedDocs: true, type: DiagnosticType.COMPILE_TIME_ERROR, uniqueName: 'private_named_parameter_duplicate_public_name', withArguments: _withArgumentsPrivateNamedParameterDuplicatePublicName, @@ -13483,6 +13498,7 @@ problemMessage: "A private named parameter must be a public identifier after removing the " "leading underscore.", + hasPublishedDocs: true, type: DiagnosticType.COMPILE_TIME_ERROR, uniqueName: 'private_named_parameter_without_public_name', expectedTypes: [], @@ -13680,6 +13696,7 @@ "reference.", correctionMessage: "Try changing the chain of 'include's to break the circularity.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'recursive_include_file', withArguments: _withArgumentsRecursiveIncludeFile, @@ -14077,6 +14094,7 @@ name: 'removed_lint', problemMessage: "'{0}' was removed in Dart '{1}'", correctionMessage: "Try removing the reference to '{0}'.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'removed_lint', withArguments: _withArgumentsRemovedLint, @@ -15824,6 +15842,7 @@ name: 'undefined_lint', problemMessage: "'{0}' isn't a recognized lint rule.", correctionMessage: "Try using the name of a recognized lint rule.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'undefined_lint', withArguments: _withArgumentsUndefinedLint, @@ -16547,6 +16566,7 @@ unrecognizedErrorCode = DiagnosticWithArguments( name: 'unrecognized_error_code', problemMessage: "'{0}' isn't a recognized diagnostic code.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'unrecognized_error_code', withArguments: _withArgumentsUnrecognizedErrorCode, @@ -16627,6 +16647,7 @@ problemMessage: "The option '{1}' isn't supported by '{0}'.", correctionMessage: "Try using the only supported option: '{2}', or removing the option.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'unsupported_option_with_legal_value', withArguments: _withArgumentsUnsupportedOptionWithLegalValue, @@ -16655,6 +16676,7 @@ name: 'unsupported_option', problemMessage: "The option '{1}' isn't supported by '{0}'.", correctionMessage: "Try using one of the supported options: {2}.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'unsupported_option_with_legal_values', withArguments: _withArgumentsUnsupportedOptionWithLegalValues, @@ -16681,6 +16703,7 @@ name: 'unsupported_option', problemMessage: "The option '{1}' isn't supported by '{0}'.", correctionMessage: "Try removing the option.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'unsupported_option_without_values', withArguments: _withArgumentsUnsupportedOptionWithoutValues, @@ -16705,6 +16728,7 @@ name: 'unsupported_value', problemMessage: "The value '{1}' isn't supported by '{0}'.", correctionMessage: "Try using one of the supported values: {2}.", + hasPublishedDocs: true, type: DiagnosticType.STATIC_WARNING, uniqueName: 'unsupported_value', withArguments: _withArgumentsUnsupportedValue,
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index aa73646..c5a9515 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml
@@ -69,7 +69,7 @@ int endOffset: the ending offset of the text in the file that contains the error String errorMessage: the error message problemMessage: "#errorMessage in #includingFilePath(#startOffset..#endOffset)" - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -104,7 +104,7 @@ #### Common fixes If the file is intended to be included, then correct the included file to - be valid YAML:: + be valid YAML: ```yaml // %uri="shared.yaml" @@ -130,7 +130,7 @@ parameters: String errorMessage: the error message from the parse error problemMessage: "#errorMessage" - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -171,7 +171,7 @@ String optionName: the option name problemMessage: "The option '#optionName' is no longer supported." correctionMessage: Try removing the option. - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -211,7 +211,7 @@ sharedName: ANALYSIS_OPTION_DEPRECATED problemMessage: "The option '#p0' is no longer supported." correctionMessage: "Try using the new '#p1' option." - hasPublishedDocs: false + hasPublishedDocs: true comment: |- An error code indicating that the given option is deprecated. DEPRECATED_LINT: @@ -220,7 +220,7 @@ String ruleName: the rule name problemMessage: The lint rule '#ruleName' is deprecated and shouldn't be enabled. correctionMessage: Try removing '#ruleName'. - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -279,7 +279,7 @@ String ruleName: the rule name problemMessage: "The rule '#ruleName' is already enabled and doesn't need to be enabled again." correctionMessage: "Try removing all but one occurrence of the rule." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -319,7 +319,7 @@ int endOffset: the ending offset of the text in the file that contains the warning String warningMessage: the warning message problemMessage: "Warning in the included options file #includingFilePath(#startOffset..#endOffset): #warningMessage" - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -359,7 +359,7 @@ String includingFilePath: the path of the file containing the include directive String contextRootPath: the path of the context being analyzed problemMessage: "The URI '#includedUri' included in '#includingFilePath' can't be found when analyzing '#contextRootPath'." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -398,7 +398,7 @@ String incompatibleRules: the incompatible rules problemMessage: "The rule '#ruleName' is incompatible with '#incompatibleRules'." correctionMessage: "Try removing all but one of the incompatible rules." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -441,7 +441,7 @@ sharedName: INCOMPATIBLE_LINT problemMessage: "The rule '#p0' is incompatible with #p1." correctionMessage: "Try locally disabling all but one of the conflicting rules or removing one of the incompatible files." - hasPublishedDocs: false + hasPublishedDocs: true comment: |- An error code indicating an incompatible rule. @@ -456,7 +456,7 @@ sharedName: INCOMPATIBLE_LINT problemMessage: "The rule '#p0' is incompatible with #p1, which is included from #p2 file#p3." correctionMessage: "Try locally disabling all but one of the conflicting rules or removing one of the incompatible files." - hasPublishedDocs: false + hasPublishedDocs: true comment: |- An error code indicating an incompatible rule. @@ -466,7 +466,7 @@ String optionName: the option name String detailMessage: the detail message problemMessage: "Invalid option specified for '#optionName': #detailMessage" - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -514,7 +514,7 @@ parameters: String sectionName: the section name problemMessage: "Invalid format for the '#sectionName' section." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -562,7 +562,7 @@ String contextRoot: the root of the analysis context problemMessage: "Plugins can only be specified in the root of a pub workspace or the root of a package that isn't in a workspace." correctionMessage: "Try specifying plugins in an analysis options file at '#contextRoot'." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -595,7 +595,7 @@ Object includingFilePath: the path of the file containing the include directive problemMessage: "The URI '#includedUri' included in '#includingFilePath' includes '#includingFilePath', creating a circular reference." correctionMessage: "Try changing the chain of 'include's to break the circularity." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -639,7 +639,7 @@ String sdkVersion: the SDK version in which the lint was removed problemMessage: "'#ruleName' was removed in Dart '#sdkVersion'" correctionMessage: "Try removing the reference to '#ruleName'." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -688,7 +688,7 @@ String ruleName: the rule name problemMessage: "'#ruleName' isn't a recognized lint rule." correctionMessage: "Try using the name of a recognized lint rule." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -697,8 +697,8 @@ #### Example - The following code produces this diagnostic because the lint - `this_is_not_a_real_lint` isn't a known lint: + The following code produces this diagnostic because + `implementation_import` isn't a known lint: ```yaml // %uri="analysis_options.yaml" @@ -736,7 +736,7 @@ parameters: String codeName: the unrecognized error code problemMessage: "'#codeName' isn't a recognized diagnostic code." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -788,7 +788,7 @@ sharedName: UNSUPPORTED_OPTION problemMessage: "The option '#optionKey' isn't supported by '#sectionName'." correctionMessage: Try removing the option. - hasPublishedDocs: false + hasPublishedDocs: true comment: |- An error code indicating that a plugin is being configured with an unsupported option and legal options are provided. @@ -801,7 +801,7 @@ sharedName: UNSUPPORTED_OPTION problemMessage: "The option '#optionKey' isn't supported by '#sectionName'." correctionMessage: "Try using the only supported option: '#legalValue', or removing the option." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -851,7 +851,7 @@ sharedName: UNSUPPORTED_OPTION problemMessage: "The option '#optionKey' isn't supported by '#sectionName'." correctionMessage: "Try using one of the supported options: #legalValues." - hasPublishedDocs: false + hasPublishedDocs: true comment: |- An error code indicating that a YAML section is being configured with an unsupported option and legal options are provided. @@ -863,7 +863,7 @@ String legalValues: legal values problemMessage: "The value '#invalidValue' isn't supported by '#optionName'." correctionMessage: "Try using one of the supported values: #legalValues." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -14952,7 +14952,7 @@ String publicName: the corresponding public name of private named parameter problemMessage: "The corresponding public name '#publicName' is already the name of another parameter." correctionMessage: "Try renaming one of the parameters." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description @@ -14981,7 +14981,7 @@ type: compileTimeError parameters: none problemMessage: "A private named parameter must be a public identifier after removing the leading underscore." - hasPublishedDocs: false + hasPublishedDocs: true documentation: |- #### Description