Create new incremental analysis page, make linking to CLI options possible

This commit is contained in:
Clément Fournier 2018-06-12 00:22:38 +02:00
parent f74b7194a4
commit c0077a2eed
6 changed files with 64 additions and 33 deletions

View File

@ -46,6 +46,9 @@ entries:
- title: Suppressing warnings
url: /pmd_userdocs_suppressing_warnings.html
output: web, pdf
- title: Incremental analysis
url: /pmd_userdocs_incremental_analysis.html
output: web, pdf
- title: PMD CLI reference
url: /pmd_userdocs_cli_reference.html
output: web, pdf

View File

@ -1,4 +1,5 @@
<!-- Row of the CLI reference table, describing an option -->
<!-- Rows can be linked to the name of the option (without leading dash) -->
<!-- Argument summary: -->
<!-- options: comma separated list of aliases for the option.-->
<!-- option_arg: optional name for the argument of the option, eg 'arg', will be formatted eg to '<arg>'-->
@ -9,8 +10,11 @@
{% assign arg = {{ include.option_arg | prepend: "&nbsp;<" | append: ">" | escape_once | keep_if: include.option_arg }} %}
{% capture required_label %}{% if include.required %}<span class="label label-primary">Required</span> {% endif %}{% endcapture %}
<!-- fragment id in the page -->
{% assign option_id = include.options | split: ',' | first | replace_first: '-', '' | prepend: {{ table_id }} | url_encode %}
<tr>
<td><code>{{ include.options | split: ',' | mappend: arg | join: "</code><br/><code>" }}</code></td>
<td><a style="pointer-events: none; cursor: default;" name="{{ option_id }}"><code>{{ include.options | split: ',' | mappend: arg | join: "</code><br/><code>" }}</code></a></td>
<td>{{ required_label }}{{ include.description | render_markdown }}</td>
<td><code>{{ include.default }}</code></td>
<td>{{ include.languages }}</td>

View File

@ -73,6 +73,9 @@
</head>
<body>
<!-- Content is offset by the height of the topnav bar. -->
<!-- There's already a padding-top rule in modern-business.css, but it apparently doesn't work on Firefox 60 and Chrome 67 -->
<div id="topbar-content-offset">
{% include topnav.html %}
<!-- Page Content -->
<div class="container">
@ -81,22 +84,22 @@
<div class="row">
{% assign content_col_size = "col-md-12" %}
{% unless page.hide_sidebar %}
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
{% include sidebar.html %}
</div>
{% assign content_col_size = "col-md-9" %}
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
{% include sidebar.html %}
</div>
{% assign content_col_size = "col-md-9" %}
{% endunless %}
<!-- Content Column -->
<div class="{{content_col_size}}" id="tg-sb-content">
{{content}}
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<!-- /.row -->
</div>
<!-- /.container -->
</div>
</div>
</body>
{% if site.google_analytics %}
{% include google_analytics.html %}

View File

@ -11,3 +11,12 @@
.landing-page.cat-description {
margin-top: .4cm;
}
/* Offsets contents by the height of the nav bar */
#topbar-content-offset {
overflow: scroll;
position: absolute;
top: 50px; /* height of the nav bar */
bottom: 0px;
width: 100%;
}

View File

@ -2,6 +2,7 @@
title: PMD CLI reference
summary: "Full reference for PMD's command-line interface, including options, output formats and supported languages"
tags: [userdocs]
keywords: [command, line, options, help, formats, renderers]
permalink: pmd_userdocs_cli_reference.html
author: Tom Copeland <tom@infoether.com>, Xavier Le Vourch <xlv@users.sourceforge.net>, Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
---
@ -240,26 +241,3 @@ which can be specified with the `-property` option on the command-line.
Properties:
* outputDir: Output directory.
## Incremental Analysis
Ever since PMD 5.6.0, PMD has been able to perform Incremental Analysis.
When performing Incremental Analysis for the first time, PMD will cache analysis data and results.
This allows subsequent analysis to only look into those files that are new / have changed. For
a typical development environment, where you are only changing a few files at a time, this can
reduce analysis time dramatically.
The generated report will be *exactly the same* as it would if running without incremental analysis.
Files included in the final report will reflect exactly those files in your filesystem. Even if
untouched, files with violations will be listed with full detail.
### Enabling Incremental Analysis
Incremental analysis is enabled automatically once a location to store the cache has been defined.
From Command Line that is done through the `-cache` argument, but support for the feature is
available for tools integrating PMD such as [Ant](pmd_userdocs_tools_ant.html),
[Maven](pmd_userdocs_tools_maven.html), and Gradle.

View File

@ -0,0 +1,34 @@
---
title: Installation and basic CLI usage
keywords: [pmd, options, command, incremental, analysis, performance]
tags: [userdocs]
summary: "Explains how to use incremental analysis to speed up analysis"
permalink: pmd_userdocs_incremental_analysis.html
sidebar: pmd_sidebar
---
Ever since PMD 5.6.0, PMD has been able to perform Incremental Analysis.
When performing Incremental Analysis for the first time, PMD will cache analysis data and results.
This allows subsequent analysis to only look into those files that are new / have changed. For
a typical development environment, where you only change a few files at a time, this can reduce
analysis time dramatically.
The generated report will be *exactly the same* as it would if running without incremental analysis.
Files included in the final report will reflect exactly those files in your filesystem. Even if
untouched, files with violations will be listed with full detail.
### Enabling incremental analysis
Incremental analysis is enabled automatically once a location to store the cache has been defined.
From command-line that is done through the [`-cache`](pmd_userdocs_cli_reference.html#cache) argument, but support for the feature is
available for tools integrating PMD such as [Ant](pmd_userdocs_tools_ant.html),
[Maven](pmd_userdocs_tools_maven.html), and Gradle.
### Disabling incremental analysis
By default, PMD will suggest to use an analysis cache by logging a warning.
If you'd like to disable this warning, or ignore the analysis cache for a
few runs, you can use the [`-no-cache`](pmd_userdocs_cli_reference.html#no-cache) switch.