style: no implicit casts and dynamic

This commit is contained in:
Aleksey Kulikov 2021-10-22 17:25:06 +03:00
parent 7b14ee6b9b
commit f3fbc80f8e
11 changed files with 49 additions and 36 deletions

View file

@ -46,7 +46,7 @@ void main() {
});
test('returns a list of remote branches', () {
expect(repo.branchesRemote, []);
expect(repo.branchesRemote, <Branch>[]);
});
test('throws when trying to return list and error occurs', () {

View file

@ -199,7 +199,7 @@ void main() {
});
test('returns empty list if multivar not found', () {
expect(config.multivar(variable: 'not.there'), []);
expect(config.multivar(variable: 'not.there'), <String>[]);
});
});
@ -249,7 +249,7 @@ void main() {
variable: 'core.gitproxy',
regexp: 'for kernel.org\$',
),
[],
<String>[],
);
});
@ -265,7 +265,7 @@ void main() {
config.deleteMultivar(variable: 'core.gitproxy', regexp: '');
expect(config.multivar(variable: 'core.gitproxy'), []);
expect(config.multivar(variable: 'core.gitproxy'), <String>[]);
});
});

View file

@ -148,7 +148,7 @@ void main() {
walker.reset();
final commits = walker.walk();
expect(commits, []);
expect(commits, <Commit>[]);
walker.free();
});

View file

@ -30,7 +30,7 @@ void main() {
group('Worktree', () {
test('successfully creates worktree at provided path', () {
expect(repo.worktrees, []);
expect(repo.worktrees, <String>[]);
final worktree = repo.createWorktree(
name: worktreeName,
@ -58,7 +58,7 @@ void main() {
final head = repo.revParseSingle('HEAD');
final worktreeBranch = repo.createBranch(name: 'v1', target: head);
final ref = repo.lookupReference('refs/heads/v1');
expect(repo.worktrees, []);
expect(repo.worktrees, <String>[]);
final worktree = repo.createWorktree(
name: worktreeName,
@ -75,7 +75,7 @@ void main() {
worktreeDir.deleteSync(recursive: true);
worktree.prune();
expect(repo.worktrees, []);
expect(repo.worktrees, <String>[]);
expect(worktreeBranch.isCheckedOut, false);
expect(branches.any((branch) => branch.name == 'v1'), true);
@ -162,7 +162,7 @@ void main() {
});
test('successfully prunes worktree', () {
expect(repo.worktrees, []);
expect(repo.worktrees, <String>[]);
final worktree = repo.createWorktree(
name: worktreeName,
@ -177,7 +177,7 @@ void main() {
expect(worktree.isValid, false);
worktree.prune();
expect(repo.worktrees, []);
expect(repo.worktrees, <String>[]);
worktree.free();
});