Skip to content

Commit

Permalink
Linter version 0.1.16.
Browse files Browse the repository at this point in the history
Includes:

* Fix for false positive in `overriden_field`s.
* New `unrelated_type_equality_checks` lint.
* Fix to accept `$` identifiers in string interpolation lint (#214).
* Update to new `plugin` API (`0.2.0`).
* Strong mode cleanup.

BUG=

Review URL: https://codereview.chromium.org//1972183002 .
  • Loading branch information
pq committed May 12, 2016
1 parent e8dd8e0 commit b343332
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.1.16

* Fix for false positive in `overriden_field`s.
* New `unrelated_type_equality_checks` lint.
* Fix to accept `$` identifiers in string interpolation lint (#214).
* Update to new `plugin` API (`0.2.0`).
* Strong mode cleanup.

# 0.1.15

* Fix to allow simple getter/setters when a decl is ``@protected` (#215).
Expand Down
4 changes: 2 additions & 2 deletions lib/src/rules.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import 'package:linter/src/rules/await_only_futures.dart';
import 'package:linter/src/rules/camel_case_types.dart';
import 'package:linter/src/rules/constant_identifier_names.dart';
import 'package:linter/src/rules/control_flow_in_finally.dart';
import 'package:linter/src/rules/dont_compare_unrelated_types_for_equality.dart';
import 'package:linter/src/rules/empty_constructor_bodies.dart';
import 'package:linter/src/rules/hash_and_equals.dart';
import 'package:linter/src/rules/implementation_imports.dart';
Expand All @@ -43,6 +42,7 @@ import 'package:linter/src/rules/type_annotate_public_apis.dart';
import 'package:linter/src/rules/type_init_formals.dart';
import 'package:linter/src/rules/unnecessary_brace_in_string_interp.dart';
import 'package:linter/src/rules/unnecessary_getters_setters.dart';
import 'package:linter/src/rules/unrelated_type_equality_checks.dart';

final Registry ruleRegistry = new Registry()
..register(new AlwaysDeclareReturnTypes())
Expand All @@ -55,7 +55,7 @@ final Registry ruleRegistry = new Registry()
..register(new AwaitOnlyFutures())
..register(new CamelCaseTypes())
..register(new ConstantIdentifierNames())
..register(new DontCompareUnrelatedTypesForEquality())
..register(new UnrelatedTypeEqualityChecks())
..register(new EmptyConstructorBodies())
..register(new TestTypesInEquals())
..register(new OverridenField())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library linter.src.rules.dont_compare_unrelated_types_for_equality;
library linter.src.rules.unrelated_type_equality_checks;

import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
Expand Down Expand Up @@ -126,11 +126,11 @@ class DerivedClass2 extends ClassBase with Mixin {}
```
''';

class DontCompareUnrelatedTypesForEquality extends LintRule {
class UnrelatedTypeEqualityChecks extends LintRule {
_Visitor _visitor;

DontCompareUnrelatedTypesForEquality() : super(
name: 'dont_compare_unrelated_types_for_equality',
UnrelatedTypeEqualityChecks() : super(
name: 'unrelated_type_equality_checks',
description: _desc,
details: _details,
group: Group.errors,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: linter
version: 0.1.15
version: 0.1.16
author: Dart Team <misc@dartlang.org>
description: Style linter for Dart.
homepage: https://github.com/dart-lang/linter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// test w/ `dart test/util/solo_test.dart dont_compare_unrelated_types_for_equality`
// test w/ `dart test/util/solo_test.dart unrelated_type_equality_checks`

void someFunction() {
var x = '1';
Expand Down

0 comments on commit b343332

Please sign in to comment.