Skip to content

Commit

Permalink
(maint) Fix warnings about lack of culture info
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Sep 12, 2023
1 parent e80a070 commit ad6a575
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public async Task<string> BuildReleaseNotesAsync(string user, string repository,

if (issues.Count == 0)
{
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);
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);
throw new InvalidOperationException(logMessage);
}

Expand Down
7 changes: 4 additions & 3 deletions src/GitReleaseManager.Core/VcsService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
Expand Down Expand Up @@ -141,7 +142,7 @@ private async Task AddAssetsAsync(string owner, string repository, string tagNam
{
if (!File.Exists(asset))
{
var message = string.Format("Requested asset to be uploaded doesn't exist: {0}", asset);
var message = string.Format(CultureInfo.InvariantCulture, "Requested asset to be uploaded doesn't exist: {0}", asset);
throw new FileNotFoundException(message);
}

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

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

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

stringBuilder.AppendFormat(_configuration.Create.ShaSectionLineFormat, file.Name, ComputeSha256Hash(asset));
stringBuilder.AppendFormat(CultureInfo.InvariantCulture, _configuration.Create.ShaSectionLineFormat, file.Name, ComputeSha256Hash(asset));
stringBuilder.AppendLine();
}

Expand Down

0 comments on commit ad6a575

Please sign in to comment.