Repository navigation
Ignore a trailing dot in FullFileExtension, as FileExtension does [patch] - #544
Merged
Merged
Conversation
…tch] report. and .bashrc. now have no full extension, and archive.tar. gives .tar instead of .tar., so FullFileExtension agrees with FileExtension and RemoveExtension on the same file. Fixes #542 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5NekzZxVh2CVpGC1W
|
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.



Fixes #542
What changed
SemanticFilePath.FullFileExtensionnow drops a trailing dot before it looks for the first extension dot.FileExtensionandWeakStringWithoutExtensionalready did this.FullFileExtensionbeforereport..""archive.tar..tar..tar.bashrc..""archive.tar.gz.tar.gz.tar.gz(unchanged)I also updated the
<remarks>to describe the trailing-dot rule.Tests
SemanticFilePath_Extensions_IgnoreATrailingDotcovers the three trailing-dot rows from the issue, for both absolute and relative paths. It checksFileExtension,FullFileExtensionandRemoveExtension().FullFileExtension. With the fix in place they pass.Semantics.Testsuite passes on net10.0: 1998 passed, 14 skipped, 0 failed.Semantics.Pathsbuilds for all its targets.Generated by Claude Code