A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pmd-code.org/latest/pmd_languages_configuration.html below:

Language configuration | PMD Source Code Analyzer

Summary of language configuration options and properties

Table of Contents Language properties

Since PMD 7.0.0, languages may be directly configured via properties. The properties can be specified via environment variables or programmatically.

The name of the environment variables follow the following pattern, completely in uppercase:

PMD_<LanguageId>_<PropertyName>

LanguageId is the short name of the language, which is being configured. This is e.g. “JAVA” or “APEX”.

PropertyName is the name of the property converted to SCREAMING_SNAKE_CASE, that is set to a specific value, e.g. “SUPPRESS_MARKER” for “suppressMarker”.

As a convention, properties whose name start with an x are internal and may be removed or changed without notice.

Properties whose name start with CPD are used to configure CPD CpdLexer options.

Programmatically, the language properties can be set on PMDConfiguration (or CPDConfiguration) before using the PmdAnalysis (or CpdAnalysis) instance to start the analysis:

PMDConfiguration configuration = new PMDConfiguration();
LanguagePropertyBundle properties = configuration.getLanguageProperties(LanguageRegistry.PMD.getLanguageById("java"));
properties.setProperty(LanguagePropertyBundle.SUPPRESS_MARKER, "PMD");
Common language properties

All languages support the following properties:

CPD language properties

Many languages support the following properties, which are centrally defined in CpdLanguageProperties:

Note: CPDConfiguration has convenience methods to control these options, e.g. setIgnoreAnnotations.

Java language properties

The Java language can be configured with the following properties:

Apex language properties Visualforce language properties CPP language properties

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4