-
Notifications
You must be signed in to change notification settings - Fork 125
Fix lints and warnings accumulated in dartdoc #1635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,13 +47,10 @@ | |
library fake; | ||
|
||
import 'dart:async'; | ||
|
||
import 'dart:collection'; | ||
|
||
import 'example.dart'; | ||
|
||
import 'css.dart' as css; | ||
|
||
import 'example.dart'; | ||
import 'two_exports.dart' show BaseClass; | ||
|
||
abstract class ImplementingThingy implements BaseThingy {} | ||
|
@@ -224,6 +221,7 @@ typedef int LotsAndLotsOfParameters(so, many, parameters, it, should, wrap, | |
|
||
/// This class is cool! | ||
class Cool { | ||
// ignore: missing_return | ||
Cool returnCool() {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aside: why not just return There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test package is intended to be a bit strange, using outdated, error-prone and/or obsolete constructions in some places. So I don't want to accidentally make the test package too "clean". I shouldn't be doing that anywhere outside testing/ though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. Thanks! |
||
} | ||
|
||
|
@@ -258,7 +256,9 @@ class SuperAwesomeClass { | |
/// | ||
/// Another comment line. | ||
void fly(int height, Cool superCool, {String msg}) { | ||
// ignore: unused_local_variable, avoid_init_to_null | ||
var x = null; | ||
// ignore: unused_local_variable | ||
int i, y; | ||
for (int z = 0; z < 100; z++) { | ||
print('hi'); | ||
|
@@ -400,6 +400,7 @@ class ClassWithUnusualProperties extends ImplicitProperties { | |
/// | ||
/// The rest of this is not in the first paragraph. | ||
@Annotation('value') | ||
// ignore: deprecated_member_use | ||
class LongFirstLine extends SuperAwesomeClass | ||
with MixMeIn | ||
implements Interface, AnotherInterface { | ||
|
@@ -649,14 +650,18 @@ class HasGenericWithExtends<T extends Foo2> {} | |
|
||
/// Extends [ListBase] | ||
class SpecialList<E> extends ListBase<E> { | ||
// ignore: annotate_overrides | ||
E operator [](int index) { | ||
return null; | ||
} | ||
|
||
// ignore: annotate_overrides | ||
int get length => 0; | ||
|
||
// ignore: annotate_overrides | ||
void set length(int length) {} | ||
|
||
// ignore: annotate_overrides | ||
void operator []=(int index, E value) {} | ||
} | ||
|
||
|
@@ -676,6 +681,7 @@ class BaseForDocComments { | |
/// | ||
/// Reference to another method in this class [anotherMethod] xx | ||
/// | ||
// ignore: deprecated_member_use | ||
/// Reference to a top-level function in this library [topLevelFunction] xx | ||
/// | ||
/// Reference to a top-level function in another library that is imported into this library (example lib) [function1] xx | ||
|
@@ -771,6 +777,7 @@ class ReferringClass { | |
abstract class MIEEMixinWithOverride<K, V> = MIEEBase<K, V> with _MIEEPrivateOverride<K, V>; | ||
|
||
abstract class _MIEEPrivateOverride<K, V> implements MIEEThing<K, V> { | ||
// ignore: annotate_overrides | ||
void operator[]=(K key, V value) { | ||
throw new UnsupportedError("Never use this"); | ||
} | ||
|
@@ -779,6 +786,7 @@ abstract class _MIEEPrivateOverride<K, V> implements MIEEThing<K, V> { | |
abstract class MIEEBase<K, V> extends MIEEMixin<K, V> {} | ||
|
||
abstract class MIEEMixin<K, V> implements MIEEThing<K, V> { | ||
// ignore: annotate_overrides | ||
operator []=(K key, V value); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constraint is handy to know. Thanks!