Skip to content

Update dev analyzers; fix some findings (#1168, #924, #1211, #1097)#1294

Open
paulirwin wants to merge 5 commits intoapache:masterfrom
paulirwin:issue/1168-924-1211-1097
Open

Update dev analyzers; fix some findings (#1168, #924, #1211, #1097)#1294
paulirwin wants to merge 5 commits intoapache:masterfrom
paulirwin:issue/1168-924-1211-1097

Conversation

@paulirwin
Copy link
Copy Markdown
Contributor

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

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.

@paulirwin paulirwin requested a review from NightOwl888 May 4, 2026 03:38
@paulirwin paulirwin added the notes:improvement An enhancement to an existing feature label May 4, 2026
@paulirwin paulirwin requested review from Copilot May 4, 2026 13:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Dev dependency to 1.0.0-alpha.36.
  • Added solution-wide NoWarn suppressions for newly introduced/noisy analyzer IDs (dictionary indexer + numeric formatting rules).
  • Fixed a handful of new diagnostics by explicitly specifying StringComparison on string APIs and simplifying span StartsWith/EndsWith calls.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:improvement An enhancement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Roslyn Analyzers for String/Span/Char Overloads in Lucene.NET NoInlining Dev Analyzer Rules

2 participants