private void renderSuppressedViolations()

in src/main/java/org/apache/maven/plugins/pmd/PmdReportRenderer.java [316:359]


    private void renderSuppressedViolations() {
        if (suppressedViolations.isEmpty()) {
            return;
        }

        startSection(getI18nString("suppressedViolations.title"));

        List<SuppressedViolation> suppressedViolationsCopy = new ArrayList<>(suppressedViolations);
        Collections.sort(suppressedViolationsCopy, new Comparator<SuppressedViolation>() {
            @Override
            public int compare(SuppressedViolation o1, SuppressedViolation o2) {
                return o1.getFilename().compareTo(o2.getFilename());
            }
        });

        startTable();
        tableHeader(new String[] {
            getI18nString("suppressedViolations.column.filename"),
            getI18nString("suppressedViolations.column.ruleMessage"),
            getI18nString("suppressedViolations.column.suppressionType"),
            getI18nString("suppressedViolations.column.userMessage")
        });

        for (SuppressedViolation suppressedViolation : suppressedViolationsCopy) {
            String filename = suppressedViolation.getFilename();
            PmdFileInfo fileInfo = determineFileInfo(filename);
            filename = shortenFilename(filename, fileInfo);

            // May contain content not legit for #tableCell()
            sink.tableRow();
            tableCell(filename);
            sink.tableCell();
            sink.text(suppressedViolation.getRuleMessage());
            sink.tableCell_();
            tableCell(suppressedViolation.getSuppressionType());
            sink.tableCell();
            sink.text(suppressedViolation.getUserMessage());
            sink.tableCell_();
            sink.tableRow_();
        }

        endTable();
        endSection();
    }