Validate string escapes, static inner methods, and comment/annotation interaction#409
Closed
metalshark wants to merge 4 commits into
Closed
Validate string escapes, static inner methods, and comment/annotation interaction#409metalshark wants to merge 4 commits into
metalshark wants to merge 4 commits into
Conversation
Added validation for invalid escape sequences in string literals and for static methods declared within inner classes. Updated tests to cover these cases and improved error reporting for both issues.
Introduces tests to verify that annotations following or separated by comments on the same line before class, inner class, or method declarations are correctly flagged as errors. This ensures proper enforcement of annotation placement rules.
Adds validation to prevent comments between annotations/modifiers and their target declarations (classes, methods, fields, etc). Updates modifier logic to call the new validation and logs issues immediately for class declarations. Test cases are updated to assert on the new error conditions.
Added a note about improved validation for comment placement between annotations/modifiers and their targets.
Contributor
|
Thanks for this! I'm going to split this into separate PRs so I can merge each feature independently. Appreciate the contribution. |
kjonescertinia
added a commit
that referenced
this pull request
Jan 24, 2026
Static methods are not allowed in inner classes in Apex. This change adds validation to detect and report this error. Based on work by @metalshark in PR #409.
2 tasks
kjonescertinia
added a commit
that referenced
this pull request
Jan 24, 2026
Static methods are not allowed in inner classes in Apex. This change adds validation to detect and report this error. Based on work by @metalshark in PR #409.
kjonescertinia
added a commit
that referenced
this pull request
Jan 24, 2026
Static methods are not allowed in inner classes in Apex. This change adds validation to detect and report this error. Based on work by @metalshark in PR #409.
kjonescertinia
added a commit
that referenced
this pull request
Jan 24, 2026
Static methods are not allowed in inner classes in Apex. This change adds validation to detect and report this error. Based on work by @metalshark in PR #409.
This was referenced Jan 25, 2026
Contributor
|
Thanks again for the contribution here. This PR bundled several independent checks, so we split the work into focused follow-ups:
Since the actionable work has either landed or has a focused tracking issue, I am closing this stale aggregate PR rather than trying to merge it as-is. |
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.
Added validation for invalid escape sequences in string literals, or static methods declared within inner classes, and annotation/comment positioning that fails to compile.
Updated tests to cover these cases and improved error reporting for both issues.
There were no language errors when these mistakes were being inserted by Agentforce vibes.