-
Notifications
You must be signed in to change notification settings - Fork 30
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
PMD Ruleset Configuration Error and Technical Definition Visibility Loss in Pipeline #643
Comments
hi @yamioliva :) I think it's related to the newest version of MegaLinter, that contains sfdx-scanner v4, that contains PMD7 (previous was PMD6) Some PMD6 rules has been removed, so you can just remove the crashing part (the custom Xpath rule) in your PMD ruleset XML file, and it should be ok :) Best regards |
@yamioliva I think I solved the issue on the online default PMD rulesets file :) Please can yo ucheck again ? :) |
Hi Nico,
Thanks for the quick response!
Ok! I’ll keep you posted on the outcome.
Best regards,
Yamilet
El vie, 12 jul 2024, 14:50, Nicolas Vuillamy ***@***.***>
escribió:
… @yamioliva <https://github.com/yamioliva> I think I solved the issue on
the online default PMD rulesets file :)
Please can yo ucheck again ? :)
—
Reply to this email directly, view it on GitHub
<#643 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJDGDT5DW3NL25FBIJ36IYTZL7GI3AVCNFSM6AAAAABKXNJ25KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVGUYTCMJYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Nico, Petite question. I understand that removing the custom XPath rule might fix the immediate problem, but this rule helps us a lot. It ensures we don't hardcode callout endpoint URLs in our Apex code, and instead, use Named Credentials. This is important for keeping our code secure and flexible. I want to make sure we keep this functionality. Does MegaLinter have a similar rule or check that enforces this practice? If not, is there a way to update or adapt this rule to work with PMD7 in MegaLinter? Your help would be really appreciated. Thanks! |
@yamioliva I don't know if it is a default PMD7 rule, I'll have a look :) ps: maybe @maximeg44 know ^^ |
Ok, thanks! |
@yamioliva hmmm sfdx-scanner is not great for Aura / LWC ... I'm in vacations, before we make a call when I come back, I suggest you disable this linter by adding the following line in your .mega-linter.yml :) SALESFORCE_SFDX_SCANNER_LWC_DISABLE_ERRORS=true |
@nvuillam no problem, as I mentioned in my initial description, I have already done that to avoid errors during deployments. However, this prevents the technical definition from being displayed. I just wanted to solve the error, but of course, it can wait ;) |
Hey team, we've run into an issue with the PMD ruleset configuration while using the
sfdx-hardis
plugin.So, here's what's happening:
sfdx-hardis
plugin.Expected Behavior:
The PMD ruleset should run without errors, and the technical definitions should be visible in the pipeline.
Actual Behavior:
Or
Screenshots:
Initial Error in PMD Ruleset Configuration:
Configuration Workaround:
Missing Technical Definitions in Pipeline:
PMD Ruleset XML Configuration:
Environment:
Additional Context:
We applied the workaround by skipping the error in the YAML file, which fixed the initial problem but caused us to lose the technical definition visibility in the pipeline.
We're looking for help to solve the PMD ruleset configuration error without losing the technical definitions in the pipeline. Has anyone else faced this? Any known fixes?
Thanks for your support!
The text was updated successfully, but these errors were encountered: