Skip to content

Commit 2cd44b4

Browse files
committed
Address Resharper inspections
1 parent 02bbada commit 2cd44b4

File tree

9 files changed

+25
-20
lines changed

9 files changed

+25
-20
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
3+
<s:Boolean x:Key="/Default/UserDictionary/Words/=HashiCorp/@EntryIndexedValue">True</s:Boolean>
4+
<s:Boolean x:Key="/Default/UserDictionary/Words/=PostgreSQL/@EntryIndexedValue">True</s:Boolean>
5+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Steeltoe/@EntryIndexedValue">True</s:Boolean>
6+
</wpf:ResourceDictionary>

src/Content/NetCoreTool.Template.WebApi/CSharp/.template.config/ide.host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
"text": "Use dynamic Serilog logger"
296296
},
297297
"description": {
298-
"text": "Enables dynamically changing minimum levels at runtime using Serlog."
298+
"text": "Enables dynamically changing minimum levels at runtime using Serilog."
299299
},
300300
"isVisible": true
301301
},

src/Content/NetCoreTool.Template.WebApi/CSharp/.template.config/template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@
635635
"LoggingDynamicSerilogOption": {
636636
"type": "parameter",
637637
"datatype": "bool",
638-
"description": "Enable dynamically changing minimum levels at runtime using Serlog.",
638+
"description": "Enable dynamically changing minimum levels at runtime using Serilog.",
639639
"defaultValue": "false"
640640
},
641641
"HasLoggingDynamicSerilogInSteeltoeV3": {

test/NetCoreTool.Template.WebApi.Test/CircuitBreakerHystrixOptionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected override async Task AssertProjectGeneration(ProjectOptions options)
2525

2626
if (options.SteeltoeVersion == SteeltoeVersion.Steeltoe32)
2727
{
28-
Logger.WriteLine($"asserting HelloHystrixCommand");
28+
Logger.WriteLine("asserting HelloHystrixCommand");
2929
var sourceFile = GetSourceFileForLanguage("HelloHystrixCommand", options.Language);
3030
var source = await Sandbox.GetFileTextAsync(sourceFile);
3131
source.Should().ContainSnippet("class HelloHystrixCommand");

test/NetCoreTool.Template.WebApi.Test/LoggingDynamicSerilogOptionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Steeltoe.NetCoreTool.Template.WebApi.Test;
66

77
public class LoggingDynamicSerilogOptionTest(ITestOutputHelper logger)
8-
: ProjectOptionTest("logging-dynamic-serilog", "Enable dynamically changing minimum levels at runtime using Serlog.", logger)
8+
: ProjectOptionTest("logging-dynamic-serilog", "Enable dynamically changing minimum levels at runtime using Serilog.", logger)
99
{
1010
protected override void AssertPackageReferencesHook(ProjectOptions options, List<(string, string)> packages)
1111
{

test/NetCoreTool.Template.WebApi.Test/TemplateTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected TemplateTest(string option, string description, ITestOutputHelper logg
2929
[Trait("Category", "Smoke")]
3030
public async Task Smoke_Test()
3131
{
32-
Logger.WriteLine($"smoke testing help");
32+
Logger.WriteLine("smoke testing help");
3333
using var helpBox = await TemplateSandbox("--help");
3434

3535
if (Option != null)
@@ -42,7 +42,7 @@ public async Task Smoke_Test()
4242
helpBox.CommandOutput.Should().Contain(Description);
4343
}
4444

45-
Logger.WriteLine($"smoke testing option");
45+
Logger.WriteLine("smoke testing option");
4646
using var smokeBox = await TemplateSandbox($"{GetSmokeTestArgs()}");
4747
}
4848

test/NetCoreTool.Template.WebApi.Test/Utilities/Command.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class Command
7676
var output = $"{outputBuilder}${errorBuilder}";
7777
// if (process.ExitCode != 0)
7878
// {
79-
// throw new Exception($"'{command}' exited with exit code {process.ExitCode}:\n\n{output}");
79+
// throw new Exception($"'{command}' exited with exit code {process.ExitCode}:\n\n{output}");
8080
// }
8181

8282
return (process.ExitCode, output);

test/NetCoreTool.Template.WebApi.Test/Utilities/Sandbox.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Steeltoe.NetCoreTool.Template.WebApi.Test.Utilities
99
{
1010
public class Sandbox : TempDirectory
1111
{
12-
private static JsonSerializerOptions Options { get; } = new JsonSerializerOptions
12+
private static JsonSerializerOptions Options { get; } = new()
1313
{
1414
PropertyNameCaseInsensitive = true,
1515
ReadCommentHandling = JsonCommentHandling.Skip,
@@ -21,10 +21,7 @@ public class Sandbox : TempDirectory
2121

2222
public string CommandOutput { get; private set; }
2323

24-
public string Name
25-
{
26-
get => System.IO.Path.GetFileName(Path);
27-
}
24+
public string Name => System.IO.Path.GetFileName(Path);
2825

2926
public Sandbox(ITestOutputHelper logger) : base(
3027
$"DotNetNewTemplatesSandboxes{System.IO.Path.DirectorySeparatorChar}P_{Guid.NewGuid():N}")

test/NetCoreTool.Template.WebApi.Test/Utilities/SteeltoeWebApiTemplateInstaller.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,31 @@ public void Install()
1313
Installer.EnsureInstalled(logger);
1414
}
1515

16-
private class Installer
16+
private static class Installer
1717
{
1818
static Installer()
1919
{
20-
var p = Process.Start(
20+
var process = Process.Start(
2121
new ProcessStartInfo
2222
{
2323
FileName = "dotnet",
2424
Arguments = $"new uninstall {Directory.GetCurrentDirectory()}/../../../../../src/Content",
2525
}
2626
);
27-
Assert.NotNull(p);
28-
p.WaitForExit();
29-
p = Process.Start(
27+
Assert.NotNull(process);
28+
29+
process.WaitForExit();
30+
process = Process.Start(
3031
new ProcessStartInfo
3132
{
3233
FileName = "dotnet",
3334
Arguments = $"new install {Directory.GetCurrentDirectory()}/../../../../../src/Content",
3435
}
3536
);
36-
p.Should().NotBeNull();
37-
p.WaitForExit();
38-
p.ExitCode.Should().Be(0);
37+
Assert.NotNull(process);
38+
39+
process.WaitForExit();
40+
process.ExitCode.Should().Be(0);
3941
}
4042

4143
internal static void EnsureInstalled(ITestOutputHelper logger)

0 commit comments

Comments
 (0)