Skip to content

Commit

Permalink
code analysis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssg committed Jul 11, 2023
1 parent f973fa4 commit fb6cc96
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = silent
2 changes: 1 addition & 1 deletion BoolToColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public object Convert(object value, Type targetType, object parameter, CultureIn

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value.ToString() == "Green" ? true : false;
return value.ToString() == "Green";
}
}
}
2 changes: 1 addition & 1 deletion GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void changeStateInBackground(string verb, GameControllerState newState,
const string standardArguments = "-InformationAction SilentlyContinue -PassThru -Confirm:$false";

ErrorMessage = null;
ThreadPool.QueueUserWorkItem(delegate
_ = ThreadPool.QueueUserWorkItem(delegate
{
string command = $"{verb} {standardArguments} -InstanceId '{DeviceId}'";
var result = PowerShell.RunElevated(command);
Expand Down
2 changes: 1 addition & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private void OnErrorCloseButtonClicked(object sender, RoutedEventArgs e)

private void nameLink_Click(object sender, RoutedEventArgs e)
{
Process.Start("https://github.com/ssg/NoJoy");
_ = Process.Start("https://github.com/ssg/NoJoy");
}
}
}
1 change: 1 addition & 0 deletions NoJoy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include=".editorconfig" />
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
Expand Down
4 changes: 2 additions & 2 deletions WmiControllerEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public MainWindowViewModel GetControllers()
Debug.WriteLine($"Testing game controller: {device.FullName}");

// Saitek hack to identify correct device
var newDevice = identifySaitekParent(results, device);
var newDevice = identifySaitekParent(device);
if (newDevice != null)
{
device = newDevice;
Expand All @@ -92,7 +92,7 @@ public MainWindowViewModel GetControllers()
return controllers;
}

private static DeviceInfo identifySaitekParent(ManagementObjectCollection results, DeviceInfo device)
private static DeviceInfo identifySaitekParent(DeviceInfo device)
{
if (!device.Name.EndsWith(saitekHidSuffix))
{
Expand Down

0 comments on commit fb6cc96

Please sign in to comment.