Merged
Conversation
tyevco
pushed a commit
that referenced
this pull request
Nov 20, 2025
…ng operators This commit addresses several code quality issues: 1. Enhanced Constants Class (Issue #13): - Added comprehensive constants for generated code - Organized into logical sections: GeneratedClasses, GeneratedMethods, AttributeNames - Provides single source of truth for framework strings - Includes XML documentation for clarity 2. New Duplicate Name Analyzer (Issue #12): - CLI007: Detects duplicate action names within a command class - CLI008: Detects duplicate option names within a method - CLI009: Detects conflicting argument positions - Prevents runtime errors by catching naming conflicts at compile time - Uses case-insensitive comparison for action and option names 3. Reduced Null-Forgiving Operators (Issue #17): - Replaced `.Value!` with safer null-coalescing patterns - Changed `optionName.Value!.ToString()` to `optionName.Value?.ToString() ?? fallback` - Changed `(char)shortName.Value!` to pattern matching: `shortName.Value is char ch ? ch : '\0'` - Eliminated 6 instances of null-forgiving operator usage - More explicit about null handling without suppressing warnings Benefits: - Better compile-time validation through new analyzer - Clearer code intent with explicit null handling - Centralized string constants reduce typo risks - Improved maintainability
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.
No description provided.