NightOwl888 commented on code in PR #1056: URL: https://github.com/apache/lucenenet/pull/1056#discussion_r1884154424
########## src/Lucene.Net.Highlighter/VectorHighlight/FieldPhraseList.cs: ########## @@ -470,6 +470,31 @@ public override bool Equals(object obj) return true; } + #region Operator overrides + #nullable enable Review Comment: Actually, it is sensible to have `#region` indented because that is the way Visual Studio formats it. `#nullable` acts like `#pragma` in that they don't need to be paired and don't need to respect other code elements such as curly brackets. These are both compiler directives. `#region` is something that only an IDE understands and must be paired with `#endregion`. Hopefully, we will eventually move the `#nullable` statements up to the top of the file or to an MSBuild file. It is helpful to have them left aligned to make them stand apart because eventually they may be removed, but we don't want to remove the `#region` when that happens. ########## src/Lucene.Net.Suggest/Suggest/Lookup.cs: ########## @@ -124,20 +124,13 @@ public int CompareTo(LookupResult o) } // LUCENENET specific - per CS0660 and CS0661, we need to override Equals and GetHashCode - public override bool Equals(object obj) => ReferenceEquals(this, obj); + // ReSharper disable once BaseObjectEqualsIsObjectEquals + // ReSharper disable once RedundantOverriddenMember + public override bool Equals(object obj) => base.Equals(obj); - public override int GetHashCode() - { - unchecked Review Comment: Let's open a new issue to review and use `unchecked` on each `GetHashCode()` method where it would make a difference. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org