Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jul 15, 2024
1 parent cb017de commit 13ccb8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/GitVersion.App.Tests/HelpWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public void AllArgsAreInHelp()

private static bool IsNotInHelp(IReadOnlyDictionary<string, string> lookup, string propertyName, string helpText)
{
if (lookup.ContainsKey(propertyName))
return !helpText.Contains(lookup[propertyName]);
if (lookup.TryGetValue(propertyName, out var value))
return !helpText.Contains(value);

return !helpText.Contains("/" + propertyName.ToLower());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void FeatureFromDevelopBranchWithMainline(bool withPullRequestIntoDevelop
var configuration = GitFlowConfigurationBuilder.New
.WithNextVersion("1.2.0")
.WithVersionStrategies(VersionStrategies.ConfiguredNextVersion, VersionStrategies.Mainline)
.WithBranch("feature", _ => _.WithIncrement(IncrementStrategy.Minor))
.WithBranch("feature", builder => builder.WithIncrement(IncrementStrategy.Minor))
.Build();

using var fixture = new EmptyRepositoryFixture();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ private IReadOnlyCollection<ICommit> GetCommitHistory(string? tagPrefix, Semanti
var targetShas = new Lazy<HashSet<string>>(() =>
taggedSemanticVersionRepository
.GetTaggedSemanticVersions(tagPrefix, semanticVersionFormat, ignore)
.SelectMany(_ => _)
.Where(_ => _.Value.IsMatchForBranchSpecificLabel(label))
.Select(_ => _.Tag.TargetSha)
.SelectMany(versionWithTags => versionWithTags)
.Where(versionWithTag => versionWithTag.Value.IsMatchForBranchSpecificLabel(label))
.Select(versionWithTag => versionWithTag.Tag.TargetSha)
.ToHashSet()
);

Expand Down

0 comments on commit 13ccb8f

Please sign in to comment.