Move pkg/analyzer_utilities to package:lints

Change-Id: I1ff5a123065f6b500cfc4cb12ce5dfd387c6cfaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240912
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
Devon Carew 2022-04-14 22:31:04 +00:00 committed by Commit Bot
parent ce94f30150
commit 9637ef7205
5 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,4 @@
include: package:pedantic/analysis_options.1.9.0.yaml
include: package:lints/recommended.yaml
analyzer:
strong-mode:

View file

@ -17,7 +17,7 @@ class CheckTarget<T> {
String get _indent => ' ' * (_depth + 1);
Never fail(String message) {
test_package.fail(_describe() + '\n' + _indent + message);
test_package.fail('${_describe()}\n$_indent$message');
}
/// Chains to the given [value]; if a subsequent check fails, [describe]
@ -27,7 +27,7 @@ class CheckTarget<T> {
String Function(U value) describe,
) {
return CheckTarget(value, _depth + 1, () {
return _describe() + '\n' + _indent + describe(value);
return '${_describe()}\n$_indent${describe(value)}';
});
}

View file

@ -549,7 +549,7 @@ class _HtmlCodeGeneratorState {
var lines = text.split('\n');
if (lines.last.isEmpty) {
lines.removeLast();
buffer.add(dom.Text(lines.join('\n$indent') + '\n'));
buffer.add(dom.Text('${lines.join('\n$indent')}\n'));
indentNeeded = true;
} else {
buffer.add(dom.Text(lines.join('\n$indent')));

View file

@ -13,3 +13,6 @@ dependencies:
path: ../meta
path: any
test: any
dev_dependencies:
lints: any

View file

@ -269,6 +269,7 @@ void main() {
});
});
group('nullability', () {
// ignore: unnecessary_nullable_for_final_variable_declarations
const int? notNullable = 0;
const int? nullable = null;
test('isNotNull', () {