Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW(pmd): @W-17310939@: Add in more AppExchange rules for XML language #174

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

stephen-carter-at-sf
Copy link
Collaborator

@stephen-carter-at-sf stephen-carter-at-sf commented Dec 18, 2024

No description provided.

@stephen-carter-at-sf stephen-carter-at-sf force-pushed the sc/pmdAppExchange branch 2 times, most recently from 246441e to ed71dad Compare December 19, 2024 21:06
@stephen-carter-at-sf stephen-carter-at-sf changed the title NEW(pmd): @W-17310939@: Add in 3 more AppExchange rules... NEW(pmd): @W-17310939@: Add in more AppExchange rules for XML language Dec 19, 2024
NAMES OF THE FILES IN A SALESFORCE PROJECT. THIS RULE REALLY ISN'T ONE THAT SHOULD BE WRITTEN AS A PMD RULE IN
MY OPINION SINCE WHILE PROCESSING A *.field-meta.xml FILE IT ATTEMPTS TO ALSO LOOK AT AND PROCESS
*.object-meta.xml FILES AS WELL, WHICH THIS TYPE OF TESTING FRAMEWORK CAN'T HANDLE.
SO THE SECURITY TEAM WILL HAVE TO WRITE A CUSTOM TEST FOR THIS IF WE WANT COVERAGE FOR THIS RULE.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this dependency being tracked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I have a list of all PMD AppExchange rules that we need to pull into code analyzer 5 and their statuses. This rule is marked as only being partially complete so far.

// https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_remotesitesetting.htm
// specifies that .remoteSite is the file extension for remote site settings files.
'.remoteSite'
'.xml'
Copy link
Contributor

Choose a reason for hiding this comment

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

Dumb question: Do we have a way of enforcing that the rules are run against *-meta.xml files only, as opposed to all XML files?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's probably fine for now. But it might be worth considering in the future. It'd be annoying for a user if some totally unrelated XML file tripped a rule by accident.

@stephen-carter-at-sf stephen-carter-at-sf merged commit d19b4dc into dev Dec 20, 2024
7 checks passed
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