Link to dart.dev for linter rules

This allows more flexibility as we can configure the redirect overtime, compared to the GitHub hosted site which we have less control over. It could even redirect to the old linter site in the meantime if desired.

Contributes to https://github.com/dart-lang/linter/issues/4411 and https://github.com/dart-lang/site-www/issues/4498

Change-Id: I3512002cdf7f62c0338d67cec0d7091f1166479d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307000
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Parker Lougheed 2023-06-02 18:26:13 +00:00 committed by Commit Queue
parent 605e89d3bd
commit 25c0ae1c42
3 changed files with 3 additions and 4 deletions

View file

@ -186,7 +186,7 @@ class AnalysisErrorTest {
},
MESSAGE: 'my message',
CODE: 'my_lint',
URL: 'https://dart-lang.github.io/linter/lints/my_lint.html',
URL: 'https://dart.dev/lints/my_lint',
HAS_FIX: false
});
}

View file

@ -101,7 +101,7 @@ See the [LICENSE] file.
[serverapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html
[dart analyze]: https://dart.dev/tools/dart-analyze
[list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
[lintrules]: https://dart-lang.github.io/linter/lints/
[lintrules]: https://dart.dev/lints
[glob]: https://pub.dev/packages/glob
[LICENSE]: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/LICENSE
[dart format]: https://github.com/dart-lang/dart_style

View file

@ -35,8 +35,7 @@ class LintCode extends ErrorCode {
ErrorType get type => ErrorType.LINT;
@override
String get url =>
_url ?? 'https://dart-lang.github.io/linter/lints/$name.html';
String get url => _url ?? 'https://dart.dev/lints/$name';
@override
bool operator ==(Object other) =>