NehanPathan opened a new pull request, #14: URL: https://github.com/apache/lucenenet-codeanalysis-dev/pull/14
**Related Issue:** [[Lucene.NET #1211](https://github.com/apache/lucenenet/issues/1211)](https://github.com/apache/lucenenet/issues/1211) --- **Summary:** This PR adds the analyzers and codefixes for the following LuceneDev rules: * **LuceneDev6001** – String overloads of `StartsWith`/`EndsWith`/`IndexOf`/`LastIndexOf` must specify `StringComparison`. * Split into: * `LuceneDev6001_1`: Missing `StringComparison` → Error * `LuceneDev6001_2`: Invalid `StringComparison` → Warning * **LuceneDev6002** – Span overloads of `StartsWith`/`EndsWith`/`IndexOf`/`LastIndexOf` should not specify `StringComparison.Ordinal` and only allow `Ordinal` or `OrdinalIgnoreCase`. * Split into: * `LuceneDev6002_1`: Redundant `Ordinal` → Warning * `LuceneDev6002_2`: Invalid comparison → Error * **LuceneDev6003** – Single-character string arguments should use the `char` overload instead of a string → Info **Changes included:** * Added analyzers and codefix providers for 6001, 6002, and 6003. * Updated and added unit tests to cover good/bad cases. * Sample files updated to include both correct and incorrect usage patterns. * Adjusted diagnostic IDs to `_1` and `_2` for clarity and control. --- -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
