Skip to content

Reject reversed ignore character ranges - #2650

Merged
Widthdom merged 3 commits into
mainfrom
codex/fix-issue1624-current
May 24, 2026
Merged

Reject reversed ignore character ranges#2650
Widthdom merged 3 commits into
mainfrom
codex/fix-issue1624-current

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Reject reversed ignore character-class ranges such as [z-a] during .gitignore / .cdidxignore parsing.
  • Preserve the existing malformed-rule warning path and add coverage for the specific reversed-range diagnostic.
  • Add bilingual changelog fragment changelog.d/unreleased/1624.fixed.md.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests.ScanFilesDetailed_SkipsMalformedIgnoreRulesWithoutAborting"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~FileIndexerTests"
  • dotnet build CodeIndex.sln
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Adversarial review: No blocking/actionable issues found.

Full dotnet test CodeIndex.sln was attempted earlier but was stopped after running for more than 17 minutes alongside other long-running test hosts; the focused scanner coverage and build passed.

Documentation / Changelog

  • Added changelog.d/unreleased/1624.fixed.md.
  • No README or guide update was needed because this aligns malformed ignore-rule handling with the existing warning behavior.

Fixes #1624

@Widthdom
Widthdom merged commit 60a9088 into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue1624-current branch May 24, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reversed character-class range like [z-a] silently accepted as vacuous regex

1 participant