Skip to content

Support Anonymous Apex#70

Merged
pwrightcertinia merged 10 commits intomainfrom
anonymous-unit
May 21, 2025
Merged

Support Anonymous Apex#70
pwrightcertinia merged 10 commits intomainfrom
anonymous-unit

Conversation

@pwrightcertinia
Copy link
Contributor

@pwrightcertinia pwrightcertinia commented May 21, 2025

closes #65

Mostly a stripped down copy of the trigger member implementation for anonymousUnit. Does not impose any of the anonymous restrictions like disallowing static. Simply allows you to parse things like classes, methods and statements in the same file/block of text as you would find in a .apex script file.

Previously the check system tests only read sfdx-project directories, which avoided various invalid .cls template files that contain tokens like %variable%. Unfortunately this also means it won't pick up any .apex script files since they are outside projects. So it now runs an additional check using a list of certain samples that are known to have script files.

Manual test running check on samples had many broken .cls files, but no errors on .apex files:

Parsed 6246 '.cls' files in: /apex-samples
Parsed 227 '.trigger' files in: /apex-samples
Parsed 41 '.apex' files in: /apex-samples

@pwrightcertinia pwrightcertinia merged commit 2464c34 into main May 21, 2025
1 check passed
@pwrightcertinia pwrightcertinia deleted the anonymous-unit branch May 21, 2025 15:21
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.

Support Anonymous Apex scripts (.apex)

1 participant