Skip to content

Commit

Permalink
Fix code style errors that started appearing in VS2022 17.12.0: (#65)
Browse files Browse the repository at this point in the history
MacSdkSetup.cs: error IDE0120: Simplify LINQ expression
RedpointSelfVersion.cs: error IDE0280: Use 'nameof'
UpdateUPluginCommand.cs: error CA1853: Do not guard 'Dictionary.Remove(key)' with 'Dictionary.ContainsKey(key)'
  • Loading branch information
JasperDeLaat94 authored Nov 30, 2024
1 parent ac031ef commit 0a1206f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion UET/Redpoint.SelfVersion/RedpointSelfVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

internal class RedpointSelfVersion
{
[return: NotNullIfNotNull("attribute")]
[return: NotNullIfNotNull(nameof(attribute))]
public static string? GetInformationalVersion(AssemblyInformationalVersionAttribute? attribute)
{
if (attribute == null)
Expand Down
3 changes: 1 addition & 2 deletions UET/Redpoint.Uet.SdkManagement/Sdk/MacSdkSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ await monitor.MonitorAsync(
_logger.LogInformation($"Setting up symbolic link for Xcode.app...");
var xcodeDirectory = Directory.GetDirectories(sdkPackagePath)
.Select(x => Path.GetFileName(x))
.Where(x => x.StartsWith("Xcode", StringComparison.Ordinal))
.First();
.First(x => x.StartsWith("Xcode", StringComparison.Ordinal));
File.CreateSymbolicLink(
Path.Combine(sdkPackagePath, "Xcode.app"),
xcodeDirectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ public async Task<int> ExecuteAsync(InvocationContext context)
else
{
var obj = node.AsObject();
if (obj.ContainsKey("EnabledByDefault"))
{
obj.Remove("EnabledByDefault");
}
obj.Remove("EnabledByDefault");

foreach (var module in node["Modules"]?.AsArray() ?? new JsonArray())
{
Expand Down

0 comments on commit 0a1206f

Please sign in to comment.