style: avoid lines longer than 80 characters

This commit is contained in:
Aleksey Kulikov 2021-10-22 17:13:42 +03:00
parent a806d0a312
commit 7b14ee6b9b
76 changed files with 1246 additions and 972 deletions

View file

@ -98,8 +98,8 @@ void main() {
});
test(
'successfully gets the blame for provided file with minMatchCharacters set',
() {
'successfully gets the blame for provided file with '
'minMatchCharacters set', () {
final blame = repo.blame(
path: 'feature_file',
minMatchCharacters: 1,
@ -165,8 +165,8 @@ void main() {
});
test(
'successfully gets the blame for provided file with newestCommit argument',
() {
'successfully gets the blame for provided file with '
'newestCommit argument', () {
final blame = repo.blame(
path: 'feature_file',
newestCommit: repo['fc38877'],
@ -194,8 +194,8 @@ void main() {
});
test(
'successfully gets the blame for provided file with minLine and maxLine set',
() {
'successfully gets the blame for provided file with minLine and '
'maxLine set', () {
final blame = repo.blame(
path: 'feature_file',
minLine: 1,

View file

@ -34,8 +34,8 @@ void main() {
});
test(
'throws when trying to checkout head with invalid alternative directory',
() {
'throws when trying to checkout head with invalid alternative '
'directory', () {
expect(
() => repo.checkout(
refName: 'HEAD',
@ -66,8 +66,8 @@ void main() {
});
test(
'throws when trying to checkout index with invalid alternative directory',
() {
'throws when trying to checkout index with invalid alternative '
'directory', () {
expect(
() => repo.checkout(directory: 'not/there'),
throwsA(
@ -111,8 +111,8 @@ void main() {
});
test(
'throws when trying to checkout tree with invalid alternative directory',
() {
'throws when trying to checkout tree with invalid alternative '
'directory', () {
expect(
() => repo.checkout(
refName: 'refs/heads/feature',

View file

@ -42,8 +42,8 @@ void main() {
});
test(
'opens the global, XDG and system configuration files (if they are present) '
'if no path provided', () {
'opens the global, XDG and system configuration files '
'(if they are present) if no path provided', () {
try {
final config = Config.open();
expect(config, isA<Config>());

View file

@ -153,7 +153,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"Failed to authenticate SSH session: Unable to open public key file",
'Failed to authenticate SSH session: Unable to open public key '
'file',
),
),
);

View file

@ -56,7 +56,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"cannot describe - no tags can describe 'f17d0d48eae3aa08cecf29128a35e310c97b3521'.",
"cannot describe - no tags can describe "
"'f17d0d48eae3aa08cecf29128a35e310c97b3521'.",
),
),
);

View file

@ -112,7 +112,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"could not find '${repo.workdir}not_there' to stat: No such file or directory",
"could not find '${repo.workdir}not_there' to stat: No such file "
"or directory",
),
),
);
@ -141,7 +142,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"cannot create blob from file. This operation is not allowed against bare repositories.",
"cannot create blob from file. This operation is not allowed "
"against bare repositories.",
),
),
);
@ -184,7 +186,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"cannot index add all. This operation is not allowed against bare repositories.",
"cannot index add all. This operation is not allowed against "
"bare repositories.",
),
),
);

View file

@ -148,8 +148,8 @@ void main() {
});
test(
'throws when trying to initialize rebase without upstream and onto provided',
() {
'throws when trying to initialize rebase without upstream and onto '
'provided', () {
expect(
() => Rebase.init(repo: repo),
throwsA(
@ -218,7 +218,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"object not found - failed to find pack entry (790b86f5fb50db485586370f27c5f90bada97d83)",
"object not found - failed to find pack entry "
"(790b86f5fb50db485586370f27c5f90bada97d83)",
),
),
);

View file

@ -201,7 +201,8 @@ void main() {
isA<ArgumentError>().having(
(e) => e.toString(),
'error',
'Invalid argument: "0 must be either Oid or String reference name"',
'Invalid argument: "0 must be either Oid or String reference '
'name"',
),
),
);
@ -462,7 +463,8 @@ void main() {
isA<ArgumentError>().having(
(e) => e.toString(),
'error',
'Invalid argument: "0 must be either Oid or String reference name"',
'Invalid argument: "0 must be either Oid or String reference '
'name"',
),
),
);

View file

@ -337,8 +337,8 @@ void main() {
});
test(
'throws when trying to get remote repo\'s reference list with invalid url',
() {
'throws when trying to get remote repo\'s reference list with '
'invalid url', () {
Remote.setUrl(repo: repo, remote: 'libgit2', url: 'invalid');
final remote = repo.lookupRemote('libgit2');
@ -455,7 +455,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to resolve address for wrong.url: Name or service not known",
"failed to resolve address for wrong.url: Name or service "
"not known",
),
),
);
@ -604,7 +605,8 @@ Total 69 (delta 0), reused 1 (delta 0), pack-reused 68
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to resolve address for wrong.url: Name or service not known",
"failed to resolve address for wrong.url: Name or service "
"not known",
),
),
);

View file

@ -183,7 +183,8 @@ void main() {
isA<ArgumentError>().having(
(e) => e.toString(),
'error',
'Invalid argument: "0 must be either Oid or String reference name"',
'Invalid argument: "0 must be either Oid or String reference '
'name"',
),
),
);
@ -305,7 +306,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"cannot status. This operation is not allowed against bare repositories.",
"cannot status. This operation is not allowed against bare "
"repositories.",
),
),
);

View file

@ -119,8 +119,8 @@ void main() {
});
test(
'.range returns revspec with correct fields values based on provided spec',
() {
'.range returns revspec with correct fields values based on '
'provided spec', () {
var revspec = repo.revParse('master');
expect(revspec.from.oid.sha, headSHA);
@ -165,12 +165,12 @@ void main() {
),
);
expect(
() => repo.revParse('master........5aecfa'),
() => repo.revParse('master.......5aecfa'),
throwsA(
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to parse revision specifier - Invalid pattern '.....5aecfa'",
"failed to parse revision specifier - Invalid pattern '....5aecfa'",
),
),
);

View file

@ -32,22 +32,24 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to parse signature - Signature cannot have an empty name or email",
"failed to parse signature - Signature cannot have an empty name "
"or email",
),
),
);
});
test(
'throws when trying to create with empty name and email and default time',
() {
'throws when trying to create with empty name and email and '
'default time', () {
expect(
() => Signature.create(name: '', email: ''),
throwsA(
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to parse signature - Signature cannot have an empty name or email",
"failed to parse signature - Signature cannot have an empty name "
"or email",
),
),
);

View file

@ -153,7 +153,8 @@ void main() {
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
'failed to resolve address for wrong.url: Name or service not known',
'failed to resolve address for wrong.url: Name or service '
'not known',
),
),
);

View file

@ -53,8 +53,8 @@ void main() {
});
test(
'successfully creates worktree at provided path from provided reference',
() {
'successfully creates worktree at provided path from '
'provided reference', () {
final head = repo.revParseSingle('HEAD');
final worktreeBranch = repo.createBranch(name: 'v1', target: head);
final ref = repo.lookupReference('refs/heads/v1');