Fixed linter warnings
This commit is contained in:
parent
9865ed93d2
commit
4199da654b
4 changed files with 14 additions and 6 deletions
|
@ -66,7 +66,9 @@ class JaelFormatter {
|
|||
{bool isFirst = false, bool isLast = false}) {
|
||||
if (child == null) {
|
||||
return lineLength;
|
||||
} else if (child is Element) return _formatElement(child, lineLength);
|
||||
} else if (child is Element) {
|
||||
return _formatElement(child, lineLength);
|
||||
}
|
||||
String s;
|
||||
if (child is Interpolation) {
|
||||
var b = StringBuffer('{{');
|
||||
|
|
|
@ -16,14 +16,18 @@ Document? parseDocument(String text,
|
|||
|
||||
if (scanner.errors.isNotEmpty && onError != null) {
|
||||
scanner.errors.forEach(onError);
|
||||
} else if (scanner.errors.isNotEmpty) throw scanner.errors.first;
|
||||
} else if (scanner.errors.isNotEmpty) {
|
||||
throw scanner.errors.first;
|
||||
}
|
||||
|
||||
var parser = Parser(scanner, asDSX: asDSX);
|
||||
var doc = parser.parseDocument();
|
||||
|
||||
if (parser.errors.isNotEmpty && onError != null) {
|
||||
parser.errors.forEach(onError);
|
||||
} else if (parser.errors.isNotEmpty) throw parser.errors.first;
|
||||
} else if (parser.errors.isNotEmpty) {
|
||||
throw parser.errors.first;
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ void main() {
|
|||
});
|
||||
|
||||
test('sets etag, cache-control, expires, last-modified', () async {
|
||||
var response = await client.get(Uri.parse('$url'));
|
||||
var response = await client.get(Uri.parse(url));
|
||||
|
||||
print('Response status: ${response.statusCode}');
|
||||
print('Response body: ${response.body}');
|
||||
|
@ -60,7 +60,7 @@ void main() {
|
|||
});
|
||||
|
||||
test('if-modified-since', () async {
|
||||
var response = await client.get(Uri.parse('$url'), headers: {
|
||||
var response = await client.get(Uri.parse(url), headers: {
|
||||
'if-modified-since':
|
||||
HttpDate.format(DateTime.now().add(Duration(days: 365)))
|
||||
});
|
||||
|
|
|
@ -11,7 +11,9 @@ ContextAwareMatcher predicateWithContext(
|
|||
ContextAwareMatcher wrapContextAwareMatcher(x) {
|
||||
if (x is ContextAwareMatcher) {
|
||||
return x;
|
||||
} else if (x is Matcher) return _WrappedContextAwareMatcher(x);
|
||||
} else if (x is Matcher) {
|
||||
return _WrappedContextAwareMatcher(x);
|
||||
}
|
||||
return wrapContextAwareMatcher(wrapMatcher(x));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue