Skip to content

Correctly handling consecutive uppercase characters; fixes #4593#4605

Merged
jbogard merged 1 commit intomainfrom
4593-pascalcasenamingconvention-is-splitting-formxml-to-form-x-m-l
Feb 21, 2026
Merged

Correctly handling consecutive uppercase characters; fixes #4593#4605
jbogard merged 1 commit intomainfrom
4593-pascalcasenamingconvention-is-splitting-formxml-to-form-x-m-l

Conversation

@jbogard
Copy link
Contributor

@jbogard jbogard commented Feb 21, 2026

No description provided.

Copy link
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

This PR aims to fix name tokenization for PascalCase member matching so that consecutive uppercase sequences (acronyms like XML) are handled as a single token, improving convention-based member resolution and flattening scenarios (per #4593).

Changes:

  • Update PascalCaseNamingConvention.Split to avoid splitting inside consecutive-uppercase runs (acronym-aware splitting).
  • Add a new unit test intended to validate flattening behavior with acronyms in destination member names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/AutoMapper/Configuration/INamingConvention.cs Adjusts PascalCase splitting logic to treat acronyms as single tokens.
src/UnitTests/Bug/NamingConventions.cs Adds a regression test around flattening an acronym-containing member name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jbogard jbogard merged commit eb80840 into main Feb 21, 2026
10 checks passed
@jbogard jbogard deleted the 4593-pascalcasenamingconvention-is-splitting-formxml-to-form-x-m-l branch February 21, 2026 19:28
This was referenced Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PascalCaseNamingConvention is splitting "FormXML" to "Form" "X" "M" "L"

2 participants