-
Notifications
You must be signed in to change notification settings - Fork 100
PMD validate error #567
Comments
Azure Pipelines using sfpowerscripts azure pipelines is deprecated. Please use sfpowerkit directly using cli |
@abrm099 sfpowerscripts provide the functionality whether to break etc. sfpowerkit just run's PMD and produce a report. You might need to use this command |
Please refer to https://github.com/Accenture/sfpowerkit/issues/514 for the enhancement done on PMD command |
Ok so based on all my trials and tribulations, at the end of the day SFPowerscripts changed how they handle PMD and how PMD responds, SFPowerscripts have made changes to respond in the same manner as PMD. So any violation regardless of its priority returns and exit code of 4. This happens when calling the command directly or using PMD SFPowscript tasks. So for now what I have decided todo is to comment out all none priority 1 rules and run PMD using command line task. |
Ah got it, sfpowerscripts haven't properly handled sfpowerkit PMD changes. Will fix it in this release |
@abrm099 if you are using sfpowerkit directly, you can use the following flags to control when PMD should "fail":
@azlam-abdulsalam It seems that the README in sfpowerkit is not up to date for the PMD command. I've raised an issue for that at https://github.com/Accenture/sfpowerkit/issues/547 |
Yep, @Caitlyn-Mills will be updating this shortly. Thanks @rody |
Describe the bug
When the Azure Devops pipeline runs PMD static code analysis via sfpowerscripts sfpowerkit as per the following command line,
npx sfdx sfpowerkit:source:pmd -d force-app-package_src_delta/force-app -f text -r setup/pmd-ruleset.xml --version=6.36.0 --loglevel INFO
I gives the following warning
{"name":"Pmd","hostname":"fv-az69-443","pid":2528,"level":40,"msg":"[\n 'WARNING:',\n '--ruleset has been deprecated and will be removed in a future version. Use --rulesets instead.'\n]","time":"2021-06-28T09:50:29.900Z","v":0}
WARNING: --ruleset has been deprecated and will be removed in a future version. Use --rulesets instead.
and the tasks exist with error code 4
##[error]Exit with error code 4
To Reproduce
Expected behavior
None of the errors highlighted where critical errors so the task should have passed.
Screenshots
Desktop (please complete the following information):
Installing plugin sfpowerkit... yarn add v1.22.10
Installing plugin sfpowerkit... info No lockfile found.Installing plugin sfpowerkit... [1/4] Resolving packages...Installing plugin sfpowerkit... [2/4] Fetching packages...Installing plugin sfpowerkit... [3/4] Linking dependencies...Installing plugin sfpowerkit... [4/4] Building fresh packages...Installing plugin sfpowerkit... success Saved lockfile.Installing plugin sfpowerkit... success Saved 339 new dependencies.Installing plugin sfpowerkit... info Direct dependenciesInstalling plugin sfpowerkit... └─ [email protected] plugin sfpowerkit... info All dependenciesInstalling plugin sfpowerkit... ├─ @hapi/[email protected] plugin sfpowerkit... ├─ @salesforce/[email protected] plugin sfpowerkit... ├─ @types/[email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... ├─ [email protected] plugin sfpowerkit... └─ [email protected] plugin sfpowerkit... Done in 13.01s.Installing plugin sfpowerkit... installed v3.1.5
warning sfpowerkit > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
warning sfpowerkit > [email protected]: request has been deprecated, see request/request#3142
warning sfpowerkit > salesforce-alm > [email protected]: request has been deprecated, see request/request#3142
warning sfpowerkit > salesforce-alm > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
warning sfpowerkit > @salesforce/core > jsforce > [email protected]: request has been deprecated, see request/request#3142
warning sfpowerkit > request > [email protected]: this library is no longer supported
warning sfpowerkit > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning sfpowerkit > salesforce-alm > @salesforce/source-deploy-retrieve > @salesforce/core > jsforce > [email protected]: request has been deprecated, see request/request#3142
warning "sfpowerkit > [email protected]" has unmet peer dependency "typescript@>=2.7".
warning "sfpowerkit > @salesforce/command > @oclif/[email protected]" has unmet peer dependency "@oclif/config@^1".
The plugin [sfpowerkit] is not digitally signed but it is allow-listed.
Finished digital signature check.
The text was updated successfully, but these errors were encountered: