Skip to content

Commit 018ded5

Browse files
bwilkersoncommit-bot@chromium.org
authored andcommitted
Support setting unique names for lint codes
Change-Id: I815a519ea0278a6ea33c6f8d83ddac4f3cfd2a58 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153561 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent fd432fe commit 018ded5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pkg/analyzer/lib/src/dart/error/lint_codes.dart

+19
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ class LintCode extends ErrorCode {
3535
bool operator ==(other) => uniqueName == other.uniqueName;
3636
}
3737

38+
class LintCodeWithUniqueName extends LintCode {
39+
@override
40+
final String uniqueName;
41+
42+
const LintCodeWithUniqueName(String name, this.uniqueName, String message,
43+
{String correction})
44+
: super(name, message, correction: correction);
45+
}
46+
3847
/// Defines security-related best practice recommendations.
3948
///
4049
/// The primary difference from [LintCode]s is that these codes cannot be
@@ -46,3 +55,13 @@ class SecurityLintCode extends LintCode {
4655
@override
4756
bool get isIgnorable => false;
4857
}
58+
59+
class SecurityLintCodeWithUniqueName extends SecurityLintCode {
60+
@override
61+
final String uniqueName;
62+
63+
const SecurityLintCodeWithUniqueName(
64+
String name, this.uniqueName, String message,
65+
{String correction})
66+
: super(name, message, correction: correction);
67+
}

0 commit comments

Comments
 (0)