Update dev analyzers; fix some findings (#1168, #924, #1211, #1097)#1294
Open
paulirwin wants to merge 5 commits intoapache:masterfrom
Open
Update dev analyzers; fix some findings (#1168, #924, #1211, #1097)#1294paulirwin wants to merge 5 commits intoapache:masterfrom
paulirwin wants to merge 5 commits intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Lucene.Net.CodeAnalysis.Dev analyzer package and adjusts the codebase to satisfy (or suppress) new analyzer findings, primarily around culture-safe string operations and span comparison APIs.
Changes:
- Bumped
Lucene.Net.CodeAnalysis.Devdependency to1.0.0-alpha.36. - Added solution-wide
NoWarnsuppressions for newly introduced/noisy analyzer IDs (dictionary indexer + numeric formatting rules). - Fixed a handful of new diagnostics by explicitly specifying
StringComparisonon string APIs and simplifying spanStartsWith/EndsWithcalls.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Lucene.Net.Tests/Support/TestHelpers.cs |
Suppresses a new NoInlining-related analyzer warning around a specific attribute usage in test helpers. |
src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs |
Makes IndexOf calls culture-safe via StringComparison.Ordinal. |
src/Lucene.Net.TestFramework/Support/Util/NUnitTestFixtureBuilder.cs |
Makes StartsWith culture-safe via StringComparison.Ordinal. |
src/Lucene.Net.Analysis.Common/Analysis/Util/StemmerUtil.cs |
Uses span overloads without StringComparison for StartsWith/EndsWith. |
src/dotnet/Lucene.Net.Tests.CodeAnalysis/Verifiers/DiagnosticVerifier.cs |
Makes extension detection culture-safe via StringComparison.OrdinalIgnoreCase. |
Directory.Build.targets |
Adds global NoWarn entries for new analyzer IDs that are currently too noisy. |
.build/dependencies.props |
Updates the analyzer package version property to 1.0.0-alpha.36. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates Lucene.Net.CodeAnalysis.Dev analyzer package to latest version, fixes some analysis warnings.
Related #1168
Related #924
Fixes #1211
Fixes #1097
Description
This updates the Lucene.Net.CodeAnalysis.Dev package to alpha 36. See the release notes for alpha 34 and alpha 36:
https://github.com/apache/lucenenet-codeanalysis-dev/releases/tag/v1.0.0-alpha.34
https://github.com/apache/lucenenet-codeanalysis-dev/releases/tag/v1.0.0-alpha.36
This update adds several new analyzers. The dictionary ones (1007-1008) and numeric formatting ones (2000-2007) were very noisy with several thousand combined warnings, so they have been suppressed with NoWarn except for a couple that had just a few findings and were easy to fix.
The remaining findings should be addressed as separate PRs.