Enable ALL THE LINTS

Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
This commit is contained in:
Ian Hickson
2016-03-10 23:15:31 -08:00
parent 7544514484
commit 1b9cd52081
41 changed files with 271 additions and 264 deletions

View File

@@ -211,7 +211,7 @@ class _Renderer implements md.NodeVisitor {
_Block newBlock = new _Block(element.tag, element.attributes, _markdownStyle, new List<String>.from(_listIndents), blockList.length);
blockList.add(newBlock);
} else {
_LinkInfo linkInfo = null;
_LinkInfo linkInfo;
if (element.tag == 'a') {
linkInfo = _linkHandler.createLinkInfo(element.attributes['href']);
}
@@ -419,7 +419,7 @@ class _Block {
children.add(_stackToTextSpan(list[i]));
}
String text = null;
String text;
if (children.length == 1 && _isPlainText(children[0])) {
text = children[0].text;
children = null;
@@ -493,12 +493,13 @@ class _LinkHandler {
}
}
abstract class SyntaxHighlighter {
abstract class SyntaxHighlighter { // ignore: one_member_abstracts
TextSpan format(String source);
}
class _DefaultSyntaxHighlighter extends SyntaxHighlighter{
_DefaultSyntaxHighlighter(this.style);
final TextStyle style;
TextSpan format(String source) {