Dedupe report findings
What does this MR do?
PMD seems to report duplicate results. Seems this has always been the case? This is primarily handled in the rails parser which already dedupes but we should keep our reports clean regardless. This is also problematic during QA in terms of checking our report comparisons
Example of duplicate results:
❯ docker run --volume $PWD:/tmp/project --env CI_PROJECT_DIR=/tmp/project registry.gitlab.com/gitlab-org/security-products/analyzers/pmd-apex:2 /analyzer analyze /tmp/project
[INFO] [pmd-apex] [2020-08-04T22:09:04Z] ▶ Running analyzer
<?xml version="1.0" encoding="UTF-8"?>
<pmd xmlns="http://pmd.sourceforge.net/report/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/report/2.0.0 http://pmd.sourceforge.net/report_2_0_0.xsd"
version="6.25.0" timestamp="2020-08-04T22:09:05.541">
<file name="/tmp/project/src/classes/AppWorker.cls">
<violation beginline="12" endline="12" begincolumn="25" endcolumn="39" rule="ApexSuggestUsingNamedCred" ruleset="Security" externalInfoUrl="https://pmd.github.io/pmd-6.25.0/pmd_rules_apex_security.html#apexsuggestusingnamedcred" priority="3">
Suggest named credentials for authentication
</violation>
<violation beginline="12" endline="12" begincolumn="25" endcolumn="39" rule="ApexSuggestUsingNamedCred" ruleset="Security" externalInfoUrl="https://pmd.github.io/pmd-6.25.0/pmd_rules_apex_security.html#apexsuggestusingnamedcred" priority="3">
Suggest named credentials for authentication
</violation>
</file>
</pmd>
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Lucas Charles