Skip to content

Commit e271a0e

Browse files
committed
(maint) Fix warnings about lack of culture info
1 parent b7cdf40 commit e271a0e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/GitReleaseManager.Core/ReleaseNotes/ReleaseNotesBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public async Task<string> BuildReleaseNotesAsync(string user, string repository,
6060

6161
if (issues.Count == 0)
6262
{
63-
var logMessage = string.Format("No closed issues have been found for milestone {0}, or all assigned issues are meant to be excluded from release notes, aborting creation of release.", _milestoneTitle);
63+
var logMessage = string.Format(CultureInfo.InvariantCulture, "No closed issues have been found for milestone {0}, or all assigned issues are meant to be excluded from release notes, aborting creation of release.", _milestoneTitle);
6464
throw new InvalidOperationException(logMessage);
6565
}
6666

src/GitReleaseManager.Core/VcsService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.IO;
45
using System.Linq;
56
using System.Security.Cryptography;
@@ -141,7 +142,7 @@ private async Task AddAssetsAsync(string owner, string repository, string tagNam
141142
{
142143
if (!File.Exists(asset))
143144
{
144-
var message = string.Format("Requested asset to be uploaded doesn't exist: {0}", asset);
145+
var message = string.Format(CultureInfo.InvariantCulture, "Requested asset to be uploaded doesn't exist: {0}", asset);
145146
throw new FileNotFoundException(message);
146147
}
147148

@@ -185,7 +186,7 @@ private async Task AddAssetsAsync(string owner, string repository, string tagNam
185186
if (!release.Body.Contains(_configuration.Create.ShaSectionHeading))
186187
{
187188
_logger.Debug("Creating SHA section header");
188-
stringBuilder.AppendLine(string.Format("### {0}", _configuration.Create.ShaSectionHeading));
189+
stringBuilder.AppendLine(string.Format(CultureInfo.InvariantCulture, "### {0}", _configuration.Create.ShaSectionHeading));
189190
}
190191

191192
foreach (var asset in assets)
@@ -199,7 +200,7 @@ private async Task AddAssetsAsync(string owner, string repository, string tagNam
199200

200201
_logger.Debug("Creating SHA checksum for {Name}.", file.Name);
201202

202-
stringBuilder.AppendFormat(_configuration.Create.ShaSectionLineFormat, file.Name, ComputeSha256Hash(asset));
203+
stringBuilder.AppendFormat(CultureInfo.InvariantCulture, _configuration.Create.ShaSectionLineFormat, file.Name, ComputeSha256Hash(asset));
203204
stringBuilder.AppendLine();
204205
}
205206

0 commit comments

Comments
 (0)