Skip to content

Commit eba3b64

Browse files
ykmnkmiGZGavinZhao
authored andcommitted
Static analysis fixes.
Signed-off-by: Gavin Zhao <git@gzgz.dev>
1 parent 343abda commit eba3b64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+84
-93
lines changed

ngast/lib/src/ast/content.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract mixin class EmbeddedContentAst implements StandaloneTemplateAst {
4646
///
4747
/// May be null if and only if decorator 'select' is defined,
4848
/// but no value is assigned.
49-
/// If 'select' is not defined at all (simple <ng-content>), then the value
49+
/// If 'select' is not defined at all (simple `<ng-content>`), then the value
5050
/// will default to '*'.
5151
String? get selector;
5252

@@ -58,7 +58,7 @@ abstract mixin class EmbeddedContentAst implements StandaloneTemplateAst {
5858
/// Reference assignment.
5959
ReferenceAst? get reference;
6060

61-
/// </ng-content> that is paired to this <ng-content>.
61+
/// `</ng-content>` that is paired to this `<ng-content>`.
6262
CloseElementAst get closeComplement;
6363
set closeComplement(CloseElementAst closeComplement);
6464

ngast/lib/src/expression/micro/scanner.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class NgMicroScanner {
5555
return _scanLetAssignment();
5656
case _NgMicroScannerState.scanLetIdentifier:
5757
return _scanLetIdentifier();
58-
default:
59-
throw _unexpected();
6058
}
6159
}
6260

ngast/lib/src/recovery_protocol/angular_analyzer_protocol.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
part of angular_ast.src.recovery_protocol.recovery_protocol;
1+
part of 'recovery_protocol.dart';
22

33
class NgAnalyzerRecoveryProtocol extends RecoveryProtocol {
44
@override

ngast/lib/src/recovery_protocol/recovery_protocol.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
library angular_ast.src.recovery_protocol.recovery_protocol;
2-
31
import '../parser/reader.dart';
42
import '../scanner.dart';
53
import '../token/tokens.dart';

ngast/lib/src/scanner.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,8 @@ class NgScanner {
12061206
}
12071207

12081208
/// For consistency purposes:
1209-
/// Element `Open` indicates <blah>
1210-
/// Element `Close` indicates </blah>
1209+
/// Element `Open` indicates `<blah>`
1210+
/// Element `Close` indicates `</blah>`
12111211
///
12121212
/// Start indicates the left bracket (< or </)
12131213
/// End indicates the right bracket (> or />)

ngast/lib/src/token/lexeme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
part of ngast.src.token.tokens;
1+
part of 'tokens.dart';
22

33
/// A [NgSimpleToken] that has a custom lexeme, i.e. not predefined by type.
44
///

ngast/lib/src/token/token_types.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
part of ngast.src.token.tokens;
1+
part of 'tokens.dart';
22

33
/// The types of tokens that can be returned by the NgStringTokenizer
44
enum NgSimpleTokenType {

ngast/lib/src/token/tokens.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
library ngast.src.token.tokens;
2-
31
part 'lexeme.dart';
42
part 'token_types.dart';
53

ngast/test/random_generator_test/random_tester.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ NgSimpleTokenType generateRandomSimple(State state) {
8080
case State.text:
8181
var i = rng.nextInt(textMap.length);
8282
return textMap[i];
83-
default:
84-
return NgSimpleTokenType.unexpectedChar;
8583
}
8684
}
8785

@@ -144,8 +142,6 @@ String generateHtmlString() {
144142
sb.write('lorem ipsum');
145143
}
146144
break;
147-
default:
148-
sb.write('');
149145
}
150146
}
151147
return sb.toString();

ngcompiler/lib/v1/cli.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
///
77
/// **NOTE**: This is not an externally stable API. Use at your own risk.
88
@experimental
9-
library angular_compiler.cli;
9+
library;
1010

1111
import 'package:meta/meta.dart';
1212

0 commit comments

Comments
 (0)