mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
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:
parent
ce94f30150
commit
9637ef7205
5 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
include: package:pedantic/analysis_options.1.9.0.yaml
|
||||
include: package:lints/recommended.yaml
|
||||
|
||||
analyzer:
|
||||
strong-mode:
|
||||
|
|
|
@ -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)}';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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')));
|
||||
|
|
|
@ -13,3 +13,6 @@ dependencies:
|
|||
path: ../meta
|
||||
path: any
|
||||
test: any
|
||||
|
||||
dev_dependencies:
|
||||
lints: any
|
||||
|
|
|
@ -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', () {
|
||||
|
|
Loading…
Reference in a new issue