Skip to content

Commit e0b0ff7

Browse files
committed
(build) fix formatting issues in src project
1 parent 19dffc2 commit e0b0ff7

File tree

6 files changed

+10
-30
lines changed

6 files changed

+10
-30
lines changed

src/GitVersion.Core/Configuration/BranchConfigurationCalculator.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ public bool Equals(IBranch b1, IBranch b2)
253253
return b1.Name.WithoutRemote.Equals(b2.Name.WithoutRemote);
254254
}
255255

256-
public int GetHashCode(IBranch b)
257-
{
258-
return b.Name.WithoutRemote.GetHashCode();
259-
}
256+
public int GetHashCode(IBranch b) => b.Name.WithoutRemote.GetHashCode();
260257
}
261258
}

src/GitVersion.Core/Configuration/ConfigurationBuilder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,6 @@ private static Config CreateDefaultConfiguration()
278278

279279
return config;
280280

281-
void AddBranchConfig(string name, BranchConfig overrides)
282-
{
283-
config.Branches[name] = BranchConfig.CreateDefaultBranchConfig(name).Apply(overrides);
284-
}
281+
void AddBranchConfig(string name, BranchConfig overrides) => config.Branches[name] = BranchConfig.CreateDefaultBranchConfig(name).Apply(overrides);
285282
}
286283
}

src/GitVersion.Core/Extensions/StringExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public static void AppendLineFormat(this StringBuilder stringBuilder, string for
9696
public static bool IsEquivalentTo(this string self, string? other) =>
9797
string.Equals(self, other, StringComparison.OrdinalIgnoreCase);
9898

99-
/// <inheritdoc cref="string.IsNullOrEmpty()"/>
99+
/// <inheritdoc cref="string.IsNullOrEmpty"/>
100100
public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] this string? value) => string.IsNullOrEmpty(value);
101101

102-
/// <inheritdoc cref="string.IsNullOrWhiteSpace()"/>
102+
/// <inheritdoc cref="string.IsNullOrWhiteSpace"/>
103103
public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] this string? value) => string.IsNullOrWhiteSpace(value);
104104
}

src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionBuildMetaData.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,9 @@ public string ToString(string? format, IFormatProvider? formatProvider = null)
110110
public static bool operator !=(SemanticVersionBuildMetaData? left, SemanticVersionBuildMetaData? right) =>
111111
!Equals(left, right);
112112

113-
public static implicit operator string?(SemanticVersionBuildMetaData? preReleaseTag)
114-
{
115-
return preReleaseTag?.ToString();
116-
}
113+
public static implicit operator string?(SemanticVersionBuildMetaData? preReleaseTag) => preReleaseTag?.ToString();
117114

118-
public static implicit operator SemanticVersionBuildMetaData(string preReleaseTag)
119-
{
120-
return Parse(preReleaseTag);
121-
}
115+
public static implicit operator SemanticVersionBuildMetaData(string preReleaseTag) => Parse(preReleaseTag);
122116

123117
public static SemanticVersionBuildMetaData Parse(string? buildMetaData)
124118
{

src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionPreReleaseTag.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,9 @@ public SemanticVersionPreReleaseTag(SemanticVersionPreReleaseTag? preReleaseTag)
5555
public static bool operator <=(SemanticVersionPreReleaseTag? left, SemanticVersionPreReleaseTag? right) =>
5656
StringComparerUtils.IgnoreCaseComparer.Compare(left?.Name, right?.Name) != 1;
5757

58-
public static implicit operator string?(SemanticVersionPreReleaseTag? preReleaseTag)
59-
{
60-
return preReleaseTag?.ToString()!;
61-
}
58+
public static implicit operator string?(SemanticVersionPreReleaseTag? preReleaseTag) => preReleaseTag?.ToString()!;
6259

63-
public static implicit operator SemanticVersionPreReleaseTag(string? preReleaseTag)
64-
{
65-
return Parse(preReleaseTag);
66-
}
60+
public static implicit operator SemanticVersionPreReleaseTag(string? preReleaseTag) => Parse(preReleaseTag);
6761

6862
public static SemanticVersionPreReleaseTag Parse(string? preReleaseTag)
6963
{

src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ internal sealed class CommitCollection : ICommitCollection
1414
public IEnumerable<ICommit> GetCommitsPriorTo(DateTimeOffset olderThan) => this.SkipWhile(c => c.When > olderThan);
1515
public IEnumerable<ICommit> QueryBy(CommitFilter commitFilter)
1616
{
17-
static object? GetReacheableFrom(object? item)
18-
{
19-
return item switch
17+
static object? GetReacheableFrom(object? item) =>
18+
item switch
2019
{
2120
Commit c => (LibGit2Sharp.Commit)c,
2221
Branch b => (LibGit2Sharp.Branch)b,
2322
_ => null
2423
};
25-
}
2624

2725
var includeReachableFrom = GetReacheableFrom(commitFilter.IncludeReachableFrom);
2826
var excludeReachableFrom = GetReacheableFrom(commitFilter.ExcludeReachableFrom);

0 commit comments

Comments
 (0)