Skip to content

Comments

Changed '_' into 'ˍ' ( "Modifier Letter Low Line" U+02CD )#1766

Open
RalfKoban wants to merge 8 commits intomasterfrom
MiKo_1300_Underscore_alternative
Open

Changed '_' into 'ˍ' ( "Modifier Letter Low Line" U+02CD )#1766
RalfKoban wants to merge 8 commits intomasterfrom
MiKo_1300_Underscore_alternative

Conversation

@RalfKoban
Copy link
Owner

No description provided.

@RalfKoban RalfKoban moved this to In progress in MiKo Analyzers Dec 12, 2025
@RalfKoban RalfKoban requested a review from Copilot December 12, 2025 15:27
@RalfKoban RalfKoban moved this from In progress to On hold in MiKo Analyzers Dec 12, 2025
@RalfKoban RalfKoban moved this from On hold to Review in progress in MiKo Analyzers Dec 12, 2025
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 replaces the standard ASCII underscore character ('_') with the Unicode "Modifier Letter Low Line" character ('ˍ', U+02CD) throughout lambda identifier constants and test cases. This change affects the default naming convention for lambda expressions.

  • Updated all lambda identifier constants from using '_' to 'ˍ'
  • Modified test cases to validate the new Unicode character usage
  • Updated code fix verification to use the new character format

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
MiKo.Analyzer.Shared/Constants.cs Changed lambda identifier constants from ASCII underscore to Unicode modifier letter low line
MiKo.Analyzer.Tests/Rules/Naming/MiKo_1300_SimpleLambdaExpressionIdentifierAnalyzerTests.cs Updated test cases and code fix expectations to use the new Unicode character

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

Comment on lines +1202 to +1211
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

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

Using the Unicode character 'ˍ' (U+02CD) instead of the standard ASCII underscore '_' will make the code significantly harder to maintain and understand. This character is visually similar to underscore but is not standard in C# naming conventions, which could confuse developers, make code reviews difficult, and create issues with tooling that may not handle this Unicode character consistently. Consider reverting to the standard underscore character.

Suggested change
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
internal const string Default = "_";
internal const string FallbackUnderscores2 = "__";
internal const string FallbackUnderscores3 = "___";
internal const string FallbackUnderscores4 = "____";
internal const string Fallback0 = "_0";
internal const string Fallback1 = "_1";
internal const string Fallback2 = "_2";
internal const string Fallback3 = "_3";
internal const string Fallback4 = "_4";
internal const string Fallback5 = "_5";

Copilot uses AI. Check for mistakes.
Comment on lines +1202 to +1211
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

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

The Unicode character 'ˍ' (U+02CD) violates C# naming conventions and best practices. Standard C# conventions use ASCII characters for identifiers. This non-standard character may cause compatibility issues with various development tools, IDEs, and static analysis tools that expect ASCII-based identifiers.

Suggested change
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
internal const string Default = "_";
internal const string FallbackUnderscores2 = "__";
internal const string FallbackUnderscores3 = "___";
internal const string FallbackUnderscores4 = "____";
internal const string Fallback0 = "_0";
internal const string Fallback1 = "_1";
internal const string Fallback2 = "_2";
internal const string Fallback3 = "_3";
internal const string Fallback4 = "_4";
internal const string Fallback5 = "_5";

Copilot uses AI. Check for mistakes.
Comment on lines +1202 to +1211
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

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

The Unicode character 'ˍ' may create accessibility issues as screen readers and other assistive technologies may not properly announce or distinguish this character from a standard underscore. This could make the code less accessible to developers using assistive technologies.

Suggested change
internal const string Default = "ˍ";
internal const string FallbackUnderscores2 = "ˍˍ";
internal const string FallbackUnderscores3 = "ˍˍˍ";
internal const string FallbackUnderscores4 = "ˍˍˍˍ";
internal const string Fallback0 = "ˍ0";
internal const string Fallback1 = "ˍ1";
internal const string Fallback2 = "ˍ2";
internal const string Fallback3 = "ˍ3";
internal const string Fallback4 = "ˍ4";
internal const string Fallback5 = "ˍ5";
internal const string Default = "_";
internal const string FallbackUnderscores2 = "__";
internal const string FallbackUnderscores3 = "___";
internal const string FallbackUnderscores4 = "____";
internal const string Fallback0 = "_0";
internal const string Fallback1 = "_1";
internal const string Fallback2 = "_2";
internal const string Fallback3 = "_3";
internal const string Fallback4 = "_4";
internal const string Fallback5 = "_5";

Copilot uses AI. Check for mistakes.
@RalfKoban RalfKoban moved this from Review in progress to On hold in MiKo Analyzers Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: On hold

Development

Successfully merging this pull request may close these issues.

1 participant