Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: lib/src/rules.dart

Issue 1767843002: Lint for `@mustCallSuper` (#194). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/src/rules/must_call_super.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library linter.src.rules; 5 library linter.src.rules;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:linter/src/config.dart'; 9 import 'package:linter/src/config.dart';
10 import 'package:linter/src/linter.dart'; 10 import 'package:linter/src/linter.dart';
11 import 'package:linter/src/rules/always_declare_return_types.dart'; 11 import 'package:linter/src/rules/always_declare_return_types.dart';
12 import 'package:linter/src/rules/always_specify_types.dart'; 12 import 'package:linter/src/rules/always_specify_types.dart';
13 import 'package:linter/src/rules/annotate_overrides.dart'; 13 import 'package:linter/src/rules/annotate_overrides.dart';
14 import 'package:linter/src/rules/avoid_as.dart'; 14 import 'package:linter/src/rules/avoid_as.dart';
15 import 'package:linter/src/rules/avoid_empty_else.dart'; 15 import 'package:linter/src/rules/avoid_empty_else.dart';
16 import 'package:linter/src/rules/avoid_init_to_null.dart'; 16 import 'package:linter/src/rules/avoid_init_to_null.dart';
17 import 'package:linter/src/rules/avoid_return_types_on_setters.dart'; 17 import 'package:linter/src/rules/avoid_return_types_on_setters.dart';
18 import 'package:linter/src/rules/camel_case_types.dart'; 18 import 'package:linter/src/rules/camel_case_types.dart';
19 import 'package:linter/src/rules/constant_identifier_names.dart'; 19 import 'package:linter/src/rules/constant_identifier_names.dart';
20 import 'package:linter/src/rules/empty_constructor_bodies.dart'; 20 import 'package:linter/src/rules/empty_constructor_bodies.dart';
21 import 'package:linter/src/rules/hash_and_equals.dart'; 21 import 'package:linter/src/rules/hash_and_equals.dart';
22 import 'package:linter/src/rules/implementation_imports.dart'; 22 import 'package:linter/src/rules/implementation_imports.dart';
23 import 'package:linter/src/rules/library_names.dart'; 23 import 'package:linter/src/rules/library_names.dart';
24 import 'package:linter/src/rules/library_prefixes.dart'; 24 import 'package:linter/src/rules/library_prefixes.dart';
25 import 'package:linter/src/rules/must_call_super.dart';
25 import 'package:linter/src/rules/non_constant_identifier_names.dart'; 26 import 'package:linter/src/rules/non_constant_identifier_names.dart';
26 import 'package:linter/src/rules/one_member_abstracts.dart'; 27 import 'package:linter/src/rules/one_member_abstracts.dart';
27 import 'package:linter/src/rules/package_api_docs.dart'; 28 import 'package:linter/src/rules/package_api_docs.dart';
28 import 'package:linter/src/rules/package_prefixed_library_names.dart'; 29 import 'package:linter/src/rules/package_prefixed_library_names.dart';
29 import 'package:linter/src/rules/prefer_is_not_empty.dart'; 30 import 'package:linter/src/rules/prefer_is_not_empty.dart';
30 import 'package:linter/src/rules/pub/package_names.dart'; 31 import 'package:linter/src/rules/pub/package_names.dart';
31 import 'package:linter/src/rules/public_member_api_docs.dart'; 32 import 'package:linter/src/rules/public_member_api_docs.dart';
32 import 'package:linter/src/rules/slash_for_doc_comments.dart'; 33 import 'package:linter/src/rules/slash_for_doc_comments.dart';
33 import 'package:linter/src/rules/sort_constructors_first.dart'; 34 import 'package:linter/src/rules/sort_constructors_first.dart';
34 import 'package:linter/src/rules/sort_unnamed_constructors_first.dart'; 35 import 'package:linter/src/rules/sort_unnamed_constructors_first.dart';
(...skipping 10 matching lines...) Expand all
45 ..register(new AvoidAs()) 46 ..register(new AvoidAs())
46 ..register(new AvoidEmptyElse()) 47 ..register(new AvoidEmptyElse())
47 ..register(new AvoidReturnTypesOnSetters()) 48 ..register(new AvoidReturnTypesOnSetters())
48 ..register(new AvoidInitToNull()) 49 ..register(new AvoidInitToNull())
49 ..register(new CamelCaseTypes()) 50 ..register(new CamelCaseTypes())
50 ..register(new ConstantIdentifierNames()) 51 ..register(new ConstantIdentifierNames())
51 ..register(new EmptyConstructorBodies()) 52 ..register(new EmptyConstructorBodies())
52 ..register(new HashAndEquals()) 53 ..register(new HashAndEquals())
53 ..register(new ImplementationImports()) 54 ..register(new ImplementationImports())
54 ..register(new LibraryNames()) 55 ..register(new LibraryNames())
56 ..register(new MustCallSuper())
55 ..register(new LibraryPrefixes()) 57 ..register(new LibraryPrefixes())
56 ..register(new NonConstantIdentifierNames()) 58 ..register(new NonConstantIdentifierNames())
57 ..register(new PreferIsNotEmpty()) 59 ..register(new PreferIsNotEmpty())
58 ..register(new OneMemberAbstracts()) 60 ..register(new OneMemberAbstracts())
59 ..register(new PackageApiDocs()) 61 ..register(new PackageApiDocs())
60 ..register(new PackagePrefixedLibraryNames()) 62 ..register(new PackagePrefixedLibraryNames())
61 ..register(new PublicMemberApiDocs()) 63 ..register(new PublicMemberApiDocs())
62 ..register(new PubPackageNames()) 64 ..register(new PubPackageNames())
63 ..register(new SlashForDocComments()) 65 ..register(new SlashForDocComments())
64 ..register(new SortConstructorsFirst()) 66 ..register(new SortConstructorsFirst())
(...skipping 25 matching lines...) Expand all
90 /// enables `my_rule`. 92 /// enables `my_rule`.
91 /// 93 ///
92 /// Unspecified rules are treated as disabled by default. 94 /// Unspecified rules are treated as disabled by default.
93 Iterable<LintRule> enabled(LintConfig config) => rules 95 Iterable<LintRule> enabled(LintConfig config) => rules
94 .where((rule) => config.ruleConfigs.any((rc) => rc.enables(rule.name))); 96 .where((rule) => config.ruleConfigs.any((rc) => rc.enables(rule.name)));
95 97
96 void register(LintRule rule) { 98 void register(LintRule rule) {
97 _ruleMap[rule.name] = rule; 99 _ruleMap[rule.name] = rule;
98 } 100 }
99 } 101 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/rules/must_call_super.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698