NightOwl888 commented on code in PR #897: URL: https://github.com/apache/lucenenet/pull/897#discussion_r1462151858
########## src/Lucene.Net.Tests/Util/TestMathUtil.cs: ########## @@ -58,10 +57,11 @@ internal static long RandomLong() } // slow version used for testing - private static bool TryGetGcd(long a, long b, out long result) + // LUCENENET: semantics changed to a Try pattern as BigInteger could overflow long + private static bool TryGetGcd(long l1, long l2, out long result) { result = 0; - var c = System.Numerics.BigInteger.GreatestCommonDivisor(a, b); + var c = System.Numerics.BigInteger.GreatestCommonDivisor(l1, l2); Review Comment: According to ChatGPT: > If contributors are using different IDEs with different default settings for adding an extra line at the end of files, and you want to enforce a consistent behavior for your project, you can use .editorconfig to specify rules that align with your desired conventions. > > Here is an example .editorconfig configuration to enforce that every file must end with a newline: > > ``` > insert_final_newline = true > ``` > > By setting `insert_final_newline` to `true`, you ensure that a newline is added at the end of each file. > > However, it's important to note that the effectiveness of this approach might depend on the specific settings and behavior of the contributors' IDEs. Some IDEs might override the .editorconfig settings with their own project or user-specific settings. > > If you're using ReSharper in Rider, you might also consider the following ReSharper specific setting in your .editorconfig: > > ``` > [*.{cs,txt,md}] > resharper_enforce_empty_line_at_end_of_file = true > ``` > This setting specifically targets C#, text, and markdown files and enforces an empty line at the end. > > Keep in mind that contributors need to be aware of these settings and may need to adjust their local IDE or ReSharper settings if necessary. It's also a good idea to communicate these conventions and expectations to contributors so that everyone is on the same page regarding file ending practices. We already setup .editorconfig for the project, so perhaps we should do some experimenting with these settings. -- 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