Skip to content

Commit

Permalink
Inlined rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
pq committed May 12, 2015
1 parent aa783b3 commit b9c31b7
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions lib/src/plugin/linter_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ final LinterPlugin linterPlugin = new LinterPlugin();
/// inherently defined by the linter.
class LinterPlugin implements Plugin {

/// A subset of rules that we are considering enabled by "default".
static final List<LintRule> _rules = [
new CamelCaseTypes(),
new ConstantIdentifierNames(),
new EmptyConstructorBodies(),
new LibraryNames(),
new LibraryPrefixes(),
new NonConstantIdentifierNames(),
new OneMemberAbstracts(),
new SlashForDocComments(),
new SuperGoesLast(),
new TypeInitFormals(),
new UnnecessaryBraceInStringInterp()
];

/// The unique identifier of this plugin.
static const String UNIQUE_IDENTIFIER = 'linter.core';

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

@override
void registerExtensions(RegisterExtension registerExtension) {
_rules.forEach((LintRule rule) =>
/// A subset of rules that we are considering enabled by "default".
[
new CamelCaseTypes(),
new ConstantIdentifierNames(),
new EmptyConstructorBodies(),
new LibraryNames(),
new LibraryPrefixes(),
new NonConstantIdentifierNames(),
new OneMemberAbstracts(),
new SlashForDocComments(),
new SuperGoesLast(),
new TypeInitFormals(),
new UnnecessaryBraceInStringInterp()
].forEach((LintRule rule) =>
registerExtension(LINT_RULE_EXTENSION_POINT_ID, rule));
}

Expand Down

0 comments on commit b9c31b7

Please sign in to comment.