Merge branch 'doc-renderer'

This commit is contained in:
Clément Fournier
2020-04-20 09:46:57 +02:00
17 changed files with 1053 additions and 88 deletions

View File

@ -55,6 +55,21 @@ entries:
- title: PMD CLI reference
url: /pmd_userdocs_cli_reference.html
output: web, pdf
- title: PMD Report formats
url: /pmd_userdocs_report_formats.html
output: web, pdf
- title: null
output: web, pdf
subfolders:
- title: CPD reference
output: web, pdf
subfolderitems:
- title: Copy-paste detection
url: /pmd_userdocs_cpd.html
output: web, pdf
- title: CPD Report formats
url: /pmd_userdocs_cpd_report_formats.html
output: web, pdf
- title: null
output: web, pdf
subfolders:
@ -88,9 +103,6 @@ entries:
- title: Testing your rules
url: /pmd_userdocs_extending_testing.html
output: web, pdf
- title: Copy-paste detection
url: /pmd_userdocs_cpd.html
output: web, pdf
- title: null
output: web, pdf
subfolders:

View File

@ -198,76 +198,5 @@ Example:
## Available Report Formats
PMD comes with many different renderers.
The mnemonics in bold are used to select them on the command line, as
arguments to the `-format` option. Some formats accept *properties*,
which can be specified with the `-property` option on the command-line.
All formats are described at [PMD Report formats](pmd_userdocs_report_formats.html)
* **codeclimate**: Renderer for Code Climate JSON format.
* **csv**: Comma-separated values tabular format.
Properties:
* problem: Include problem column. Default: true.
* package: Include package column. Default: true.
* file: Include file column. Default: true.
* priority: Include priority column. Default: true.
* line: Include line column. Default: true.
* desc: Include description column. Default: true.
* ruleSet: Include Rule set column. Default: true.
* rule: Include Rule column. Default: true.
* **emacs**: GNU Emacs integration.
* **html**: HTML format.
Properties:
* linePrefix: Prefix for line number anchor in the source file.
* linkPrefix: Path to HTML source.
* **ideaj**: IntelliJ IDEA integration.
Properties:
* classAndMethodName: Class and method name, pass `.method` when processing a directory.
* sourcePath:
* fileName:
* **summaryhtml**: Summary HTML format.
Properties:
* linePrefix: Prefix for line number anchor in the source file.
* linkPrefix: Path to HTML source.
* **text**: Text format.
* **textcolor**: Text format, with color support (requires ANSI console support, e.g. xterm, rxvt, etc.).
Properties:
* color: Enables colors with anything other than `false` or `0`. Default: yes.
* **textpad**: TextPad integration.
* **vbhtml**: Vladimir Bossicard HTML format.
* **xml**: XML format.
Properties:
* encoding: XML encoding format, defaults to UTF-8.
* **xslt**: XML with a XSL transformation applied.
Properties:
* encoding: XML encoding format, defaults to UTF-8.
* xsltFilename: The XSLT file name.
* **yahtml**: Yet Another HTML format.
Properties:
* outputDir: Output directory.

View File

@ -239,6 +239,7 @@ This behavior has been introduced to ease CPD integration into scripts or hooks,
* csv_with_linecount_per_file
* vs
For details, see [CPD Report Formats](pmd_userdocs_cpd_report_formats.html).
## Ant task

View File

@ -0,0 +1,220 @@
---
title: Report formats for CPD
tags: [cpd, userdocs]
keywords: [formats, renderers]
summary: "Overview of the built-in report formats for CPD"
permalink: pmd_userdocs_cpd_report_formats.html
author: Andreas Dangel <andreas.dangel@pmd-code.org>
---
## Overview
CPD collects occurrences of found duplications and provides them to the selected report format.
Each found code duplication appears in one or more other files, so that each code duplication can
have multiple locations. Not all report formats display all locations.
The following examples always describe the same duplications:
1. a code block of 239 tokens spanning 33 lines in RuleReferenceTest. This is a duplication within the same file.
2. a code block of 110 tokens spanning 16 lines in JaxenXPathRuleQueryTest. This is a duplication that appears
3 times within the same file.
## text
This is the default format.
All duplications are reported one after another. For each duplication, the complete code snippet is output.
Each duplication is separated by `======`.
Example:
```
Found a 33 line (239 tokens) duplication in the following files:
Starting at line 32 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java
Starting at line 68 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java
public void testOverride() {
final StringProperty PROPERTY1_DESCRIPTOR = new StringProperty("property1", "Test property", null, 0f);
MockRule rule = new MockRule();
rule.definePropertyDescriptor(PROPERTY1_DESCRIPTOR);
rule.setLanguage(LanguageRegistry.getLanguage(Dummy2LanguageModule.NAME));
rule.setName("name1");
rule.setProperty(PROPERTY1_DESCRIPTOR, "value1");
rule.setMessage("message1");
rule.setDescription("description1");
rule.addExample("example1");
rule.setExternalInfoUrl("externalInfoUrl1");
rule.setPriority(RulePriority.HIGH);
final StringProperty PROPERTY2_DESCRIPTOR = new StringProperty("property2", "Test property", null, 0f);
RuleReference ruleReference = new RuleReference();
ruleReference.setRule(rule);
ruleReference.definePropertyDescriptor(PROPERTY2_DESCRIPTOR);
ruleReference.setLanguage(LanguageRegistry.getLanguage(DummyLanguageModule.NAME));
ruleReference
.setMinimumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.3"));
ruleReference
.setMaximumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.7"));
ruleReference.setDeprecated(true);
ruleReference.setName("name2");
ruleReference.setProperty(PROPERTY1_DESCRIPTOR, "value2");
ruleReference.setProperty(PROPERTY2_DESCRIPTOR, "value3");
ruleReference.setMessage("message2");
ruleReference.setDescription("description2");
ruleReference.addExample("example2");
ruleReference.setExternalInfoUrl("externalInfoUrl2");
ruleReference.setPriority(RulePriority.MEDIUM_HIGH);
validateOverridenValues(PROPERTY1_DESCRIPTOR, PROPERTY2_DESCRIPTOR, ruleReference);
=====================================================================
Found a 16 line (110 tokens) duplication in the following files:
Starting at line 66 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java
Starting at line 88 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java
Starting at line 110 of /home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java
JaxenXPathRuleQuery query = createQuery(xpath);
List<String> ruleChainVisits = query.getRuleChainVisits();
Assert.assertEquals(2, ruleChainVisits.size());
Assert.assertTrue(ruleChainVisits.contains("dummyNode"));
// Note: Having AST_ROOT in the rule chain visits is probably a mistake. But it doesn't hurt, it shouldn't
// match a real node name.
Assert.assertTrue(ruleChainVisits.contains(JaxenXPathRuleQuery.AST_ROOT));
DummyNodeWithListAndEnum dummy = new DummyNodeWithListAndEnum(1);
RuleContext data = new RuleContext();
data.setLanguageVersion(LanguageRegistry.findLanguageByTerseName("dummy").getDefaultVersion());
query.evaluate(dummy, data);
// note: the actual xpath queries are only available after evaluating
Assert.assertEquals(2, query.nodeNameToXPaths.size());
Assert.assertEquals("self::node()[(attribute::Test1 = \"false\")][(attribute::Test2 = \"true\")]", query.nodeNameToXPaths.get("dummyNode").get(0).toString());
```
## xml
This format uses XML to output the duplications in a more structured format.
Example:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd>
<duplication lines="33" tokens="239">
<file column="29" endcolumn="75" endline="64" line="32"
path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java"/>
<file column="37" endcolumn="75" endline="100" line="68"
path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java"/>
<codefragment><![CDATA[ public void testOverride() {
final StringProperty PROPERTY1_DESCRIPTOR = new StringProperty("property1", "Test property", null, 0f);
MockRule rule = new MockRule();
rule.definePropertyDescriptor(PROPERTY1_DESCRIPTOR);
rule.setLanguage(LanguageRegistry.getLanguage(Dummy2LanguageModule.NAME));
rule.setName("name1");
rule.setProperty(PROPERTY1_DESCRIPTOR, "value1");
rule.setMessage("message1");
rule.setDescription("description1");
rule.addExample("example1");
rule.setExternalInfoUrl("externalInfoUrl1");
rule.setPriority(RulePriority.HIGH);
final StringProperty PROPERTY2_DESCRIPTOR = new StringProperty("property2", "Test property", null, 0f);
RuleReference ruleReference = new RuleReference();
ruleReference.setRule(rule);
ruleReference.definePropertyDescriptor(PROPERTY2_DESCRIPTOR);
ruleReference.setLanguage(LanguageRegistry.getLanguage(DummyLanguageModule.NAME));
ruleReference
.setMinimumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.3"));
ruleReference
.setMaximumLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getVersion("1.7"));
ruleReference.setDeprecated(true);
ruleReference.setName("name2");
ruleReference.setProperty(PROPERTY1_DESCRIPTOR, "value2");
ruleReference.setProperty(PROPERTY2_DESCRIPTOR, "value3");
ruleReference.setMessage("message2");
ruleReference.setDescription("description2");
ruleReference.addExample("example2");
ruleReference.setExternalInfoUrl("externalInfoUrl2");
ruleReference.setPriority(RulePriority.MEDIUM_HIGH);
validateOverridenValues(PROPERTY1_DESCRIPTOR, PROPERTY2_DESCRIPTOR, ruleReference);]]></codefragment>
</duplication>
<duplication lines="16" tokens="110">
<file column="9" endcolumn="28" endline="81" line="66"
path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/>
<file column="9" endcolumn="28" endline="103" line="88"
path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/>
<file column="9" endcolumn="28" endline="125" line="110"
path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java"/>
<codefragment><![CDATA[ JaxenXPathRuleQuery query = createQuery(xpath);
List<String> ruleChainVisits = query.getRuleChainVisits();
Assert.assertEquals(2, ruleChainVisits.size());
Assert.assertTrue(ruleChainVisits.contains("dummyNode"));
// Note: Having AST_ROOT in the rule chain visits is probably a mistake. But it doesn't hurt, it shouldn't
// match a real node name.
Assert.assertTrue(ruleChainVisits.contains(JaxenXPathRuleQuery.AST_ROOT));
DummyNodeWithListAndEnum dummy = new DummyNodeWithListAndEnum(1);
RuleContext data = new RuleContext();
data.setLanguageVersion(LanguageRegistry.findLanguageByTerseName("dummy").getDefaultVersion());
query.evaluate(dummy, data);
// note: the actual xpath queries are only available after evaluating
Assert.assertEquals(2, query.nodeNameToXPaths.size());
Assert.assertEquals("self::node()[(attribute::Test1 = \"false\")][(attribute::Test2 = \"true\")]", query.nodeNameToXPaths.get("dummyNode").get(0).toString());]]></codefragment>
</duplication>
</pmd-cpd>
```
## csv
This outputs the duplication as comma separated values. It only reports the duplication size (number
of lines and tokens) and the number of occurrences. After that, the begin lines and filenames are reported on
after another.
Example:
```
lines,tokens,occurrences
33,239,2,32,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java,68,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java
16,110,3,66,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,88,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,110,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java
```
## csv_with_linecount_per_file
This format is similar to "csv", but it has one difference: The duplication size in number of lines is reported
for each occurrence separately. While the tokens are the same, due to formatting or comments, the code blocks might be
different. Whitespace and comments are usually ignored when finding duplicated code.
In each line, the duplication size in tokens is reported, then the number of occurrences. And after that, for each
file, the begin line, the number of duplicated lines and the filename.
Example:
```
tokens,occurrences
239,2,32,33,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java,68,33,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenc
eTest.java
110,3,66,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,88,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java,110,16,/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java
```
## vs
This outputs the duplication in a format, that Visual Studio. CPD can be added as a external tool and the output
is shown in the console. You can then click on the filenames to jump to the source where the duplication is located.
Each occurrence of a duplication is reported in a separate line, that's why in this example, we have 5 lines.
Example:
```
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java(32): Between lines 32 and 65
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java(68): Between lines 68 and 101
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java(66): Between lines 66 and 82
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java(88): Between lines 88 and 104
/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQueryTest.java(110): Between lines 110 and 126
```

File diff suppressed because it is too large Load Diff

View File

@ -243,11 +243,11 @@ Here's how to set it up as an "External Tool":
* Name: PMD
* Description: PMD, good for what ails you.
* Menu: Select the "Main menu", "Project views", "Editor menu", and "Search results" checkboxes.
* Program: $JDKPath$\bin\java.exe
* Program: `c:\pmd\bin\pmd.bat`
* For the next parameter you'll need to plug in the location of your PMD installation
and the rulesets you want to use
* Parameters:
`-cp %CLASSPATH%;c:\pmd\lib\pmd-{{pmd.site.version}}.jar;c:\pmd\lib\asm-3.2.jar;c:\pmd\lib\jaxen-1.1.1.jar net.sourceforge.pmd.PMD "$FilePath$" ideaj unusedcode,imports "$Sourcepath$" $FileClass$.method $FileName$`
`-d "$FilePath$" -f ideaj -R rulesets/java/quickstart.xml -P sourcePath="$Sourcepath$" -P classAndMethodName=$FileClass$.method -P fileName=$FileName$`
That's pretty much it. Now you can right click on a source directory and select PMD,
it'll run recursively on the source files, and the results should

View File

@ -47,8 +47,10 @@ Note that XPath 1.0 support, the default XPath version, is deprecated since PMD
* [#2399](https://github.com/pmd/pmd/issues/2399): \[apex] ApexCRUDViolation: false positive with security enforced with line break
* core
* [#2019](https://github.com/pmd/pmd/issues/2019): \[core] Insufficient deprecation warnings for XPath attributes
* doc
* [#2355](https://github.com/pmd/pmd/issues/2355): \[doc] Improve documentation about incremental analysis
* [#2356](https://github.com/pmd/pmd/issues/2356): \[doc] Add missing doc about pmd.github.io
* [#2413](https://github.com/pmd/pmd/issues/2413): \[doc] Improve documentation about the available renderers (PMD/CPD)
* java
* [#2378](https://github.com/pmd/pmd/issues/2378): \[java] AbstractJUnitRule has bad performance on large code bases
* java-bestpractices

View File

@ -0,0 +1,67 @@
<html><head><title>PMD</title></head><body>
<center><h3>PMD report</h3></center><center><h3>Problems found</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>#</th><th>File</th><th>Line</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td align="center">1</td>
<td width="*%"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java#L124">pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java</a></td>
<td align="center" width="5%">124</td>
<td width="*"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#guardlogstatement">Logger calls should be surrounded by log level guards.</a></td>
</tr>
<tr>
<td align="center">2</td>
<td width="*%"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java#L58">pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</a></td>
<td align="center" width="5%">58</td>
<td width="*"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach">This for loop can be replaced by a foreach loop</a></td>
</tr>
</table><hr/><center><h3>Processing errors</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>File</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java#">pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java</a></td>
<td><pre>net.sourceforge.pmd.PMDException: Error while parsing pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: net.sourceforge.pmd.lang.java.ast.ParseException: Encountered " "-" "- "" at line 6, column 30.
Was expecting one of:
"extends" ...
"implements" ...
"{" ...
"<" ...
at net.sourceforge.pmd.lang.java.ast.JavaParser.generateParseException(JavaParser.java:12713)
at net.sourceforge.pmd.lang.java.ast.JavaParser.jj_consume_token(JavaParser.java:12597)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:1554)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceDeclaration(JavaParser.java:732)
at net.sourceforge.pmd.lang.java.ast.JavaParser.TypeDeclaration(JavaParser.java:639)
at net.sourceforge.pmd.lang.java.ast.JavaParser.CompilationUnit(JavaParser.java:373)
at net.sourceforge.pmd.lang.java.AbstractJavaParser.parse(AbstractJavaParser.java:62)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:121)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:185)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107)
... 10 more
</pre></td>
</tr>
</table><hr/><center><h3>Suppressed warnings</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>File</th><th>Line</th><th>Rule</th><th>NOPMD or Annotation</th><th>Reason</th></tr>
<tr bgcolor="lightgrey">
<td align="left"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/PMD.java#L505">pmd-core/src/main/java/net/sourceforge/pmd/PMD.java</a></td>
<td align="center">505</td>
<td align="center"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_errorprone.html#closeresource">CloseResource</a></td>
<td align="center">Annotation</td>
<td align="center"></td>
</tr>
</table><hr/><center><h3>Configuration errors</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>Rule</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_design.html#loosepackagecoupling">LoosePackageCoupling</a></td>
<td>No packages or classes specified</td>
</tr>
</table></body></html>

View File

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:pmd="http://pmd.sourceforge.net/report/2.0.0">
<head>
<title>PMD 6.22.0 Report</title>
<style type="text/css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10px;
margin-right: 10px;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0px;
}
.p1 { background:#FF9999; }
.p2 { background:#FFCC66; }
.p3 { background:#FFFF99; }
.p4 { background:#99FF99; }
.p5 { background:#a6caf0; }
</style>
</head>
<body>
<a name="top"/>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bannercell" rowspan="2"/>
<td class="text-align:right">
<h2>PMD 6.22.0 Report. Generated on 2020-04-11 - 19:23:45</h2>
</td>
</tr>
</table>
<hr size="1"/>
<h3>Summary</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th style="width:25%">Files</th>
<th>Total</th>
<th>
<div class="p1">Priority 1</div>
</th>
<th>
<div class="p2">Priority 2</div>
</th>
<th>
<div class="p3">Priority 3</div>
</th>
<th>
<div class="p4">Priority 4</div>
</th>
<th>
<div class="p5">Priority 5</div>
</th>
</tr>
<tr class="a">
<td>2</td>
<td>2</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
</table>
<hr size="1" width="100%" align="left"/>
<h3>Rules</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th style="width:84%">Rule</th>
<th style="width:8%">Violations</th>
<th style="width:8%">Severity</th>
</tr>
<tr class="a">
<td>
[Best Practices] GuardLogStatement</td>
<td>1</td>
<td>
<div class="p2"> 2</div>
</td>
</tr>
<tr class="b">
<td>
[Best Practices] ForLoopCanBeForeach</td>
<td>1</td>
<td>
<div class="p3"> 3</div>
</td>
</tr>
</table>
<hr size="1" width="100%" align="left"/>
<h3>Files</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>File</th>
<th style="width:40px">
<div class="p5">5</div>
</th>
<th style="width:40px">
<div class="p4">4</div>
</th>
<th style="width:40px">
<div class="p3">3</div>
</th>
<th style="width:40px">
<div class="p2">2</div>
</th>
<th style="width:40px">
<div class="p1">1</div>
</th>
</tr>
<tr class="a">
<td>
<a href="#f-pmd-core_src_main_java_net_sourceforge_pmd_RuleContext.java">/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java</a>
</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="b">
<td>
<a href="#f-pmd-core_src_main_java_net_sourceforge_pmd_benchmark_Benchmarker.java">/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</a>
</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
</table>
<hr size="1" width="100%" align="left"/>
<a name="f-pmd-core_src_main_java_net_sourceforge_pmd_RuleContext.java"/>
<h3>File /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th style="width:60px;">Violation</th>
<th>Error Description</th>
<th style="width:40px;">Line</th>
</tr>
<tr class="a">
<td>
<div class="p2">2</div>
</td>
<td>
[Best Practices.GuardLogStatement]
-
<a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#guardlogstatement">
Logger calls should be surrounded by log level guards.
</a>
</td>
<td>124 - 125</td>
</tr>
</table>
<a href="#top">Back to top</a>
<a name="f-pmd-core_src_main_java_net_sourceforge_pmd_benchmark_Benchmarker.java"/>
<h3>File /home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th style="width:60px;">Violation</th>
<th>Error Description</th>
<th style="width:40px;">Line</th>
</tr>
<tr class="a">
<td>
<div class="p3">3</div>
</td>
<td>
[Best Practices.ForLoopCanBeForeach]
-
<a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach">
This for loop can be replaced by a foreach loop
</a>
</td>
<td>58 - 62</td>
</tr>
</table>
<a href="#top">Back to top</a>
<hr size="1" width="100%" align="left"/>
</body>
</html>

View File

@ -0,0 +1,74 @@
<html><head><title>PMD</title></head><body>
<center><h2>Summary</h2></center>
<table align="center" cellspacing="0" cellpadding="3">
<tr><th>Rule name</th><th>Number of violations</th></tr>
<tr><td>GuardLogStatement</td><td align=center>1</td></tr>
<tr><td>ForLoopCanBeForeach</td><td align=center>1</td></tr>
</table>
<center><h2>Detail</h2></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<center><h3>PMD report</h3></center><center><h3>Problems found</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>#</th><th>File</th><th>Line</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td align="center">1</td>
<td width="*%"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java#L124">pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java</a></td>
<td align="center" width="5%">124</td>
<td width="*"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#guardlogstatement">Logger calls should be surrounded by log level guards.</a></td>
</tr>
<tr>
<td align="center">2</td>
<td width="*%"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java#L58">pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</a></td>
<td align="center" width="5%">58</td>
<td width="*"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_bestpractices.html#forloopcanbeforeach">This for loop can be replaced by a foreach loop</a></td>
</tr>
</table><hr/><center><h3>Processing errors</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>File</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java#">pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java</a></td>
<td><pre>net.sourceforge.pmd.PMDException: Error while parsing pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:1)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: net.sourceforge.pmd.lang.java.ast.ParseException: Encountered " "-" "- "" at line 6, column 30.
Was expecting one of:
"extends" ...
"implements" ...
"{" ...
"<" ...
at net.sourceforge.pmd.lang.java.ast.JavaParser.generateParseException(JavaParser.java:12731)
at net.sourceforge.pmd.lang.java.ast.JavaParser.jj_consume_token(JavaParser.java:12615)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:1574)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceDeclaration(JavaParser.java:779)
at net.sourceforge.pmd.lang.java.ast.JavaParser.TypeDeclaration(JavaParser.java:686)
at net.sourceforge.pmd.lang.java.ast.JavaParser.CompilationUnit(JavaParser.java:420)
at net.sourceforge.pmd.lang.java.AbstractJavaParser.parse(AbstractJavaParser.java:62)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:121)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:185)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107)
... 10 more
</pre></td>
</tr>
</table><hr/><center><h3>Suppressed warnings</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>File</th><th>Line</th><th>Rule</th><th>NOPMD or Annotation</th><th>Reason</th></tr>
<tr bgcolor="lightgrey">
<td align="left"><a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/PMD.java#L505">pmd-core/src/main/java/net/sourceforge/pmd/PMD.java</a></td>
<td align="center">505</td>
<td align="center"><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_errorprone.html#closeresource">CloseResource</a></td>
<td align="center">Annotation</td>
<td align="center"></td>
</tr>
</table><hr/><center><h3>Configuration errors</h3></center><table align="center" cellspacing="0" cellpadding="3"><tr>
<th>Rule</th><th>Problem</th></tr>
<tr bgcolor="lightgrey">
<td><a href="https://pmd.github.io/pmd-6.22.0/pmd_rules_java_design.html#loosepackagecoupling">LoosePackageCoupling</a></td>
<td>No packages or classes specified</td>
</tr>
</table></tr></table></body></html>

View File

@ -0,0 +1,42 @@
<html><head><title>PMD</title></head><style type="text/css"><!--
body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size: 16px; font-style: italic; color: black; }
.title { font-family: verdana, arial, helvetica,geneva; font-size: 12px; font-weight:bold; color: white; }
.body { font-family: verdana, arial, helvetica, geneva; font-size: 12px; font-weight:plain; color: black; }
#TableHeader { background-color: #003366; }
#RowColor1 { background-color: #eeeeee; }
#RowColor2 { background-color: white; }
--></style><body><center><table border="0" width="80%"><tr id=TableHeader><td colspan="2"><font class=title>&nbsp;/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/RuleContext.java</font></tr>
<tr id=RowColor2><td width="50" align="right"><font class=body>124&nbsp;&nbsp;&nbsp;</font></td><td><font class=body>Logger calls should be surrounded by log level guards.</font></td></tr>
</table><table border="0" width="80%"><tr id=TableHeader><td colspan="2"><font class=title>&nbsp;/home/pmd/source/pmd-core/src/main/java/net/sourceforge/pmd/benchmark/Benchmarker.java</font></tr>
<tr id=RowColor2><td width="50" align="right"><font class=body>58&nbsp;&nbsp;&nbsp;</font></td><td><font class=body>This for loop can be replaced by a foreach loop</font></td></tr>
</table><br><table border="0" width="80%"><tr id=TableHeader><td colspan="2"><font class=title>&nbsp;Problems found</font></td></tr><tr id=RowColor2><td><font class=body>/home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java</font></td><td><font class=body><pre>net.sourceforge.pmd.PMDException: Error while parsing /home/pmd/source/pmd-core/src/test/resources/net/sourceforge/pmd/cpd/files/file_with_ISO-8859-1_encoding.java
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:110)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: net.sourceforge.pmd.lang.java.ast.ParseException: Encountered " "-" "- "" at line 6, column 30.
Was expecting one of:
"extends" ...
"implements" ...
"{" ...
"<" ...
at net.sourceforge.pmd.lang.java.ast.JavaParser.generateParseException(JavaParser.java:12713)
at net.sourceforge.pmd.lang.java.ast.JavaParser.jj_consume_token(JavaParser.java:12597)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceBody(JavaParser.java:1554)
at net.sourceforge.pmd.lang.java.ast.JavaParser.ClassOrInterfaceDeclaration(JavaParser.java:732)
at net.sourceforge.pmd.lang.java.ast.JavaParser.TypeDeclaration(JavaParser.java:639)
at net.sourceforge.pmd.lang.java.ast.JavaParser.CompilationUnit(JavaParser.java:373)
at net.sourceforge.pmd.lang.java.AbstractJavaParser.parse(AbstractJavaParser.java:62)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:121)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:185)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107)
... 10 more
</pre></font></td></tr></table><table border="0" width="80%"><tr id=TableHeader><td colspan="2"><font class=title>&nbsp;Configuration problems found</font></td></tr><tr id=RowColor2><td><font class=body>LoosePackageCoupling</font></td><td><font class=body>No packages or classes specified</font></td></tr></table></center></body></html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PMD - Benchmarker</title>
</head>
<body>
<h2>Class View</h2>
<h3 align="center">Class: Benchmarker</h3>
<table border="" align="center" cellspacing="0" cellpadding="3">
<tr><th>Method</th><th>Violation</th></tr>
<tr><td>findBooleanSwitch</td><td><table border="0"><tr><td><b>Rule:</b></td><td>ForLoopCanBeForeach</td></tr><tr><td><b>Description:</b></td><td>This for loop can be replaced by a foreach loop</td></tr><tr><td><b>Line:</b></td><td>58 and 62</td></tr></table></td></tr>
</table>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PMD - RuleContext</title>
</head>
<body>
<h2>Class View</h2>
<h3 align="center">Class: RuleContext</h3>
<table border="" align="center" cellspacing="0" cellpadding="3">
<tr><th>Method</th><th>Violation</th></tr>
<tr><td>setSourceCodeFilename</td><td><table border="0"><tr><td><b>Rule:</b></td><td>GuardLogStatement</td></tr><tr><td><b>Description:</b></td><td>Logger calls should be surrounded by log level guards.</td></tr><tr><td><b>Line:</b></td><td>124 and 125</td></tr></table></td></tr>
</table>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PMD</title>
</head>
<body>
<h2>Package View</h2>
<table border="1" align="center" cellspacing="0" cellpadding="3">
<tr><th>Package</th><th>Class</th><th>#</th></tr>
<tr><td><b>Aggregate</b></td> <td>-</td> <td>2</td></tr>
<tr><td><b>net</b></td> <td>-</td> <td>2</td></tr>
<tr><td><b>net.sourceforge</b></td> <td>-</td> <td>2</td></tr>
<tr><td><b>net.sourceforge.pmd</b></td> <td>-</td> <td>2</td></tr>
<tr><td><b>net.sourceforge.pmd</b></td> <td><a href="RuleContext.html">RuleContext</a></td> <td>1</td></tr>
<tr><td><b>net.sourceforge.pmd.benchmark</b></td> <td>-</td> <td>1</td></tr>
<tr><td><b>net.sourceforge.pmd.benchmark</b></td> <td><a href="Benchmarker.html">Benchmarker</a></td> <td>1</td></tr>
</table>
</body>
</html>

View File

@ -33,7 +33,7 @@ public class CodeClimateRenderer extends AbstractIncrementingRenderer {
public static final int REMEDIATION_POINTS_DEFAULT = 50000;
public static final String[] CODECLIMATE_DEFAULT_CATEGORIES = new String[] {"Style"};
// Note: required by https://github.com/codeclimate/spec/blob/master/SPEC.md
// Note: required by https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md
protected static final String NULL_CHARACTER = "\u0000";
protected static final List<String> INTERNAL_DEV_PROPERTIES = Arrays.asList("version", "xpath");
private static final String PMD_PROPERTIES_URL = getPmdPropertiesURL();
@ -146,9 +146,9 @@ public class CodeClimateRenderer extends AbstractIncrementingRenderer {
private <T> String getBody() {
String result = "## " + rule.getName() + "\\n\\n" + "Since: PMD " + rule.getSince() + "\\n\\n" + "Priority: "
+ rule.getPriority() + "\\n\\n"
+ "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): "
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): "
+ Arrays.toString(getCategories()).replaceAll("[\\[\\]]", "") + "\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): "
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): "
+ getRemediationPoints() + "\\n\\n" + cleaned(rule.getDescription());
if (!rule.getExamples().isEmpty()) {

View File

@ -30,8 +30,8 @@ public class CodeClimateRendererTest extends AbstractRendererTest {
public String getExpected() {
return "{\"type\":\"issue\",\"check_name\":\"Foo\",\"description\":\"blah\","
+ "\"content\":{\"body\":\"## Foo\\n\\nSince: PMD null\\n\\nPriority: Low\\n\\n"
+ "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n"
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "desc\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
@ -45,8 +45,8 @@ public class CodeClimateRendererTest extends AbstractRendererTest {
public String getExpectedWithProperties() {
return "{\"type\":\"issue\",\"check_name\":\"Foo\",\"description\":\"blah\","
+ "\"content\":{\"body\":\"## Foo\\n\\nSince: PMD null\\n\\nPriority: Low\\n\\n"
+ "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n"
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "desc\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
@ -67,8 +67,8 @@ public class CodeClimateRendererTest extends AbstractRendererTest {
public String getExpectedMultiple() {
return "{\"type\":\"issue\",\"check_name\":\"Foo\",\"description\":\"blah\","
+ "\"content\":{\"body\":\"## Foo\\n\\nSince: PMD null\\n\\nPriority: Low\\n\\n"
+ "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n"
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "desc\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"
@ -77,8 +77,8 @@ public class CodeClimateRendererTest extends AbstractRendererTest {
+ "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"" + getSourceCodeFilename() + "\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}"
+ "\u0000" + PMD.EOL + "{\"type\":\"issue\",\"check_name\":\"Foo\",\"description\":\"blah\","
+ "\"content\":{\"body\":\"## Foo\\n\\nSince: PMD null\\n\\nPriority: Low\\n\\n"
+ "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n"
+ "[Categories](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#categories): Style\\n\\n"
+ "[Remediation Points](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#remediation-points): 50000\\n\\n"
+ "desc\\n\\n"
+ "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n"
+ "Name | Value | Description\\n" + "--- | --- | ---\\n"

View File

@ -177,6 +177,12 @@ public class DeadLinksChecker {
} else {
linkOk = linkTarget.isEmpty() || htmlPages.contains(linkTarget);
}
// maybe a local file
if (!linkOk) {
Path localResource = docsDirectory.resolve(linkTarget);
linkOk = Files.exists(localResource);
}
}
if (!linkOk) {