Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit b9c31b7

Browse files
committed
Inlined rules.
1 parent aa783b3 commit b9c31b7

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

lib/src/plugin/linter_plugin.dart

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,6 @@ final LinterPlugin linterPlugin = new LinterPlugin();
2626
/// inherently defined by the linter.
2727
class LinterPlugin implements Plugin {
2828

29-
/// A subset of rules that we are considering enabled by "default".
30-
static final List<LintRule> _rules = [
31-
new CamelCaseTypes(),
32-
new ConstantIdentifierNames(),
33-
new EmptyConstructorBodies(),
34-
new LibraryNames(),
35-
new LibraryPrefixes(),
36-
new NonConstantIdentifierNames(),
37-
new OneMemberAbstracts(),
38-
new SlashForDocComments(),
39-
new SuperGoesLast(),
40-
new TypeInitFormals(),
41-
new UnnecessaryBraceInStringInterp()
42-
];
43-
4429
/// The unique identifier of this plugin.
4530
static const String UNIQUE_IDENTIFIER = 'linter.core';
4631

@@ -65,7 +50,20 @@ class LinterPlugin implements Plugin {
6550

6651
@override
6752
void registerExtensions(RegisterExtension registerExtension) {
68-
_rules.forEach((LintRule rule) =>
53+
/// A subset of rules that we are considering enabled by "default".
54+
[
55+
new CamelCaseTypes(),
56+
new ConstantIdentifierNames(),
57+
new EmptyConstructorBodies(),
58+
new LibraryNames(),
59+
new LibraryPrefixes(),
60+
new NonConstantIdentifierNames(),
61+
new OneMemberAbstracts(),
62+
new SlashForDocComments(),
63+
new SuperGoesLast(),
64+
new TypeInitFormals(),
65+
new UnnecessaryBraceInStringInterp()
66+
].forEach((LintRule rule) =>
6967
registerExtension(LINT_RULE_EXTENSION_POINT_ID, rule));
7068
}
7169

0 commit comments

Comments
 (0)