diff --git a/pkg/linter/lib/src/lint_codes.dart b/pkg/linter/lib/src/lint_codes.dart index a2936c57d27..acc5bbe9cd5 100644 --- a/pkg/linter/lib/src/lint_codes.dart +++ b/pkg/linter/lib/src/lint_codes.dart @@ -17,9 +17,9 @@ class LinterLintCode extends LintCodeWithExpectedTypes { @override String get url { if (hasPublishedDocs) { - return 'https://dart.dev/diagnostics/$name'; + return 'https://dart.dev/diagnostics/$lowerCaseName'; } - return 'https://dart.dev/lints/$name'; + return 'https://dart.dev/lints/$lowerCaseName'; } } diff --git a/pkg/linter/test/lint_code_test.dart b/pkg/linter/test/lint_code_test.dart index 4e08cf17971..a98353e2090 100644 --- a/pkg/linter/test/lint_code_test.dart +++ b/pkg/linter/test/lint_code_test.dart @@ -13,14 +13,16 @@ void main() { test('without published diagnostic docs', () { expect( _customCode.url, - equals('https://dart.dev/lints/${_customCode.name}'), + equals('https://dart.dev/lints/${_customCode.lowerCaseName}'), ); }); test('with published diagnostic docs', () { expect( _customCodeWithDocs.url, - equals('https://dart.dev/diagnostics/${_customCodeWithDocs.name}'), + equals( + 'https://dart.dev/diagnostics/${_customCodeWithDocs.lowerCaseName}', + ), ); }); }); diff --git a/pkg/linter/test/rules/analyzer_public_api_test.dart b/pkg/linter/test/rules/analyzer_public_api_test.dart index 668600ad10a..4338638c2fe 100644 --- a/pkg/linter/test/rules/analyzer_public_api_test.dart +++ b/pkg/linter/test/rules/analyzer_public_api_test.dart @@ -19,18 +19,18 @@ void main() { @reflectiveTest class AnalyzerPublicApiTest extends LintRuleTest { static String get badPartDirective => - diag.analyzerPublicApiBadPartDirective.name; + diag.analyzerPublicApiBadPartDirective.lowerCaseName; - static String get badType => diag.analyzerPublicApiBadType.name; + static String get badType => diag.analyzerPublicApiBadType.lowerCaseName; static String get experimentalInconsistency => - diag.analyzerPublicApiExperimentalInconsistency.name; + diag.analyzerPublicApiExperimentalInconsistency.lowerCaseName; static String get exportsNonPublicName => - diag.analyzerPublicApiExportsNonPublicName.name; + diag.analyzerPublicApiExportsNonPublicName.lowerCaseName; static String get implInPublicApi => - diag.analyzerPublicApiImplInPublicApi.name; + diag.analyzerPublicApiImplInPublicApi.lowerCaseName; String get libFile => '$testPackageRootPath/lib/file.dart'; diff --git a/pkg/linter/tool/machine.dart b/pkg/linter/tool/machine.dart index 95133b042ed..2873ed7e39a 100644 --- a/pkg/linter/tool/machine.dart +++ b/pkg/linter/tool/machine.dart @@ -70,7 +70,11 @@ Future getMachineListing( 'incompatible': rule.incompatibleRules, 'sets': const [], 'fixStatus': - fixStatusMap[rule.diagnosticCodes.first.uniqueName.suffix] ?? + fixStatusMap[rule + .diagnosticCodes + .first + .lowerCaseUniqueName + .suffix] ?? 'unregistered', 'details': info.deprecatedDetails, 'sinceDartSdk': _versionToString(info.states.first.since),