Skip to content

Commit

Permalink
Fix comparsion
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Feb 21, 2025
1 parent 1f5d73a commit 26c58c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/UniGetUI.Core.Tools/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public static async Task<long> GetFileSizeAsyncAsLong(Uri? url)
}

Check warning on line 317 in src/UniGetUI.Core.Tools/Tools.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Avoid multiple blank lines (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2000)

Check warning on line 317 in src/UniGetUI.Core.Tools/Tools.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Avoid multiple blank lines (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2000)

public struct Version: IComparable<Version>, IEquatable<Version>
public struct Version: IComparable
{
public static readonly Version Null = new(-1, -1, -1, -1);

Expand All @@ -333,8 +333,10 @@ public Version(int major, int minor = 0, int patch = 0, int remainder = 0)
Remainder = remainder;
}

public int CompareTo(Version other)
public int CompareTo(object? other_)
{
if (other_ is not Version other) return 0;

int major = Major.CompareTo(other.Major);
if (major != 0) return major;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace UniGetUI.PackageEngine.Managers.ChocolateyManager
public class Chocolatey : BaseNuGet
{
public static new string[] FALSE_PACKAGE_IDS = ["Directory", "", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "Output is package name ", "operable", "Invalid"];
public static new string[] FALSE_PACKAGE_VERSIONS = ["", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "packages", "current version", "installed version", "is", "program", "validations", "argument", "no"];
public static new string[] FALSE_PACKAGE_VERSIONS = ["", "of", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "packages", "current version", "installed version", "is", "program", "validations", "argument", "no"];

public Chocolatey()
{
Expand Down

0 comments on commit 26c58c1

Please sign in to comment.