Skip to content

Add Case property to FormatConfig#2

Merged
hogimn merged 8 commits into
hogimn:mainfrom
asherber:case
May 2, 2026
Merged

Add Case property to FormatConfig#2
hogimn merged 8 commits into
hogimn:mainfrom
asherber:case

Conversation

@asherber
Copy link
Copy Markdown
Contributor

@asherber asherber commented May 2, 2026

My team prefers lowercasing sql reserved words.

This PR replaces the boolean Uppercase property with a CaseTypes enum supporting NONE, UPPER, and LOWER. The formatter's Show() method is updated to apply .ToLower() or .ToUpper() based on the enum value.

The previous bool uppercase constructor and Uppercase(bool) builder method are preserved but marked [Obsolete], delegating to the new CaseTypes-based path. The Uppercase property is similarly obsoleted but kept for backwards compatibility, deriving its value from Case == CaseTypes.UPPER.

Tests cover all three CaseTypes values for both formatting behavior and the legacy Uppercase property.

@hogimn hogimn merged commit 9fcd372 into hogimn:main May 2, 2026
3 checks passed
@hogimn
Copy link
Copy Markdown
Owner

hogimn commented May 2, 2026

Thank you for the great PR! I really appreciate how you handled the backward compatibility with [Obsolete] while introducing the new CaseTypes enum.

@asherber
Copy link
Copy Markdown
Contributor Author

asherber commented May 2, 2026

Thanks for accepting, and sorry about the several style violations.

@hogimn
Copy link
Copy Markdown
Owner

hogimn commented May 3, 2026

No problem at all. Thank you for contributing. (^▽^)

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.

2 participants