Skip to content

Commit f9e44b0

Browse files
committed
code formatting
1 parent f828c84 commit f9e44b0

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

src/GitVersion.Core/Helpers/FileSystemHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ public static string GetTempPath()
8888

8989
public static string GetDirectoryName(string? path)
9090
{
91-
ArgumentNullException.ThrowIfNull(path, nameof(path));
91+
ArgumentNullException.ThrowIfNull(path);
9292

9393
return fileSystem.Path.GetDirectoryName(path)!;
9494
}
9595

9696
public static string GetFileName(string? path)
9797
{
98-
ArgumentNullException.ThrowIfNull(path, nameof(path));
98+
ArgumentNullException.ThrowIfNull(path);
9999

100100
return fileSystem.Path.GetFileName(path);
101101
}
@@ -116,7 +116,7 @@ public static string Combine(string? path1, string? path2)
116116

117117
public static string Combine(string? path1)
118118
{
119-
ArgumentNullException.ThrowIfNull(path1, nameof(path1));
119+
ArgumentNullException.ThrowIfNull(path1);
120120

121121
return fileSystem.Path.Combine(path1);
122122
}

src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ internal BranchCollection(LibGit2Sharp.BranchCollection collection, Diff diff, G
1818
this.repo = repo.NotNull();
1919
}
2020

21-
public IEnumerator<IBranch> GetEnumerator()
22-
=> this.branches.Value.GetEnumerator();
21+
public IEnumerator<IBranch> GetEnumerator() => this.branches.Value.GetEnumerator();
2322

2423
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
2524

src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ internal CommitCollection(ICommitLog collection, Diff diff, GitRepository repo)
1818
this.repo = repo.NotNull();
1919
}
2020

21-
public IEnumerator<ICommit> GetEnumerator()
22-
=> this.commits.Value.GetEnumerator();
21+
public IEnumerator<ICommit> GetEnumerator() => this.commits.Value.GetEnumerator();
2322

2423
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
2524

src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public IEnumerator<IReference> GetEnumerator()
1515
return this.references.GetEnumerator();
1616
}
1717

18+
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
19+
1820
public void Add(string name, string canonicalRefNameOrObject, bool allowOverwrite = false) => this.innerCollection.Add(name, canonicalRefNameOrObject, allowOverwrite);
1921

2022
public void UpdateTarget(IReference directRef, IObjectId targetId)
@@ -23,8 +25,6 @@ public void UpdateTarget(IReference directRef, IObjectId targetId)
2325
this.references = null;
2426
}
2527

26-
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
27-
2828
public IReference? this[string name]
2929
{
3030
get

src/GitVersion.LibGit2Sharp/Git/TagCollection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ internal TagCollection(LibGit2Sharp.TagCollection collection, LibGit2Sharp.Diff
1414
this.tags = new Lazy<IReadOnlyCollection<ITag>>(() => [.. collection.Select(tag => repo.GetOrCreate(tag, diff))]);
1515
}
1616

17-
public IEnumerator<ITag> GetEnumerator()
18-
=> this.tags.Value.GetEnumerator();
17+
public IEnumerator<ITag> GetEnumerator() => this.tags.Value.GetEnumerator();
1918

2019
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
2120
}

src/GitVersion.Output/TemplateManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal class TemplateManager(TemplateType templateType)
1616

1717
public string? GetTemplateFor(string? fileExtension)
1818
{
19-
ArgumentNullException.ThrowIfNull(fileExtension, nameof(fileExtension));
19+
ArgumentNullException.ThrowIfNull(fileExtension);
2020

2121
string? result = null;
2222

@@ -30,7 +30,7 @@ internal class TemplateManager(TemplateType templateType)
3030

3131
public string? GetAddFormatFor(string? fileExtension)
3232
{
33-
ArgumentNullException.ThrowIfNull(fileExtension, nameof(fileExtension));
33+
ArgumentNullException.ThrowIfNull(fileExtension);
3434

3535
string? result = null;
3636

0 commit comments

Comments
 (0)