Skip to content

Commit 08299eb

Browse files
committed
add some lints
1 parent ff9de15 commit 08299eb

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

.analysis_options

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
11
analyzer:
22
strong-mode: true
3+
linter:
4+
rules:
5+
# Errors
6+
- avoid_empty_else
7+
- comment_references
8+
- control_flow_in_finally
9+
- empty_statements
10+
#- hash_and_equals
11+
- test_types_in_equals
12+
- throw_in_finally
13+
- unrelated_type_equality_checks
14+
- valid_regexps
15+
16+
# Style
17+
#- annotate_overrides
18+
- avoid_init_to_null
19+
- avoid_return_types_on_setters
20+
- await_only_futures
21+
- camel_case_types
22+
- empty_catches
23+
- empty_constructor_bodies
24+
- library_names
25+
- library_prefixes
26+
- non_constant_identifier_names
27+
- prefer_is_not_empty
28+
- slash_for_doc_comments
29+
- type_init_formals

test/annotation_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ ClassElement _getAnnotatedClass(LibraryElement lib, String className) =>
236236
.expand((cu) => cu.types)
237237
.singleWhere((cd) => cd.name == className);
238238

239-
/// Returns a mock [ElementAnnotationImpl] whose
239+
/// Returns a mock [MockElementAnnotation] whose
240240
/// `evaluationResult.value.type.element.library.source` is `libraryUri` and
241241
/// whose `evaluationResult.value.type.name` is `typeName`.
242242
ElementAnnotation _mockElementAnnotation(String typeName, Uri libraryUri) {

test/builder_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Future _simpleTest() => _generateTest(
102102
_testGenPartContent);
103103

104104
Future _generateTest(CommentGenerator gen, String expectedContent) async {
105-
var srcs = await _createPackageStub(pkgName);
105+
var srcs = _createPackageStub(pkgName);
106106
var phaseGroup = new PhaseGroup.singleAction(new GeneratorBuilder([gen]),
107107
new InputSet(pkgName, ['lib/test_lib.dart']));
108108

test/src/test_phases.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void checkOutputs(Map<String, dynamic> outputs, BuildResult result) {
4343
var id = new AssetId.parse(serializedId);
4444
remainingOutputIds.remove(id);
4545

46-
/// Check that the assets exist in [result.outputs].
46+
// Check that the assets exist in [result.outputs].
4747
var actual = result.outputs
4848
.firstWhere((output) => output.id == id, orElse: () => null);
4949
expect(actual, isNotNull,

0 commit comments

Comments
 (0)