@Deprecated public static final String EOL
The line delimiter used by PMD in outputs. Usually the platform specific line separator.
@Deprecated public static final String SUPPRESS_MARKER
The default suppress marker string.
@Deprecated protected final PMDConfiguration configuration
Contains the configuration with which this PMD instance has been created.
@Deprecated public static final String VERSION
Constant that contains always the current version of PMD.
@Deprecated public PMD()
Create a PMD instance using a default Configuration. Changes to the configuration may be required.
@Deprecated public PMD(PMDConfiguration configuration)
Create a PMD instance using the specified Configuration.
configuration
- The runtime Configuration of PMD to use.
@Deprecated public static List<DataSource> getURIDataSources(String uriString) throws PMDException
Parses the given string as a database uri and returns a list of datasources.
uriString
- the URI to parse
PMDException
- if the URI couldn't be parsed
DBURI
@Deprecated @InternalApi public static Parser parserFor(LanguageVersion languageVersion, PMDConfiguration configuration)
Helper method to get a configured parser for the requested language. The parser is configured based on the given
PMDConfiguration
.
languageVersion
- the requested language
configuration
- the given configuration
@Deprecated public PMDConfiguration getConfiguration()
Get the runtime configuration. The configuration can be modified to affect how PMD behaves.
PMDConfiguration
@Deprecated public SourceCodeProcessor getSourceCodeProcessor()
Gets the source code processor.
@Deprecated @InternalApi public static int doPMD(PMDConfiguration configuration)
This method is the main entry point for command line usage.
configuration
- the configuration to use
@Deprecated public static RuleContext newRuleContext(String sourceCodeFilename, File sourceCodeFile)
Creates a new rule context, initialized with a new, empty report.
sourceCodeFilename
- the source code filename
sourceCodeFile
- the source code file
@Deprecated public static void processFiles(PMDConfiguration configuration, RuleSetFactory ruleSetFactory, List<DataSource> files, RuleContext ctx, List<Renderer> renderers)
Run PMD on a list of files using multiple threads - if more than one is available
configuration
- Configuration
ruleSetFactory
- RuleSetFactory
files
- List of DataSource
s
ctx
- RuleContext
renderers
- List of Renderer
s
@Deprecated public static Report processFiles(PMDConfiguration configuration, List<RuleSet> rulesets, Collection<? extends DataSource> files, List<Renderer> renderers)
Run PMD using the given configuration. This replaces the other overload.
configuration
- Configuration for the run. Note that the files, and rulesets, are ignored, as they are supplied as parameters
rulesets
- Parsed rulesets
files
- Files to process, will be closed by this method.
renderers
- Renderers that render the report
RuntimeException
- If processing fails
@Deprecated public static List<DataSource> getApplicableFiles(PMDConfiguration configuration, Set<Language> languages)
Determines all the files, that should be analyzed by PMD.
configuration
- contains either the file path or the DB URI, from where to load the files
languages
- used to filter by file extension
DataSource
of files
public static void main(String[] args)
Deprecated.
Entry to invoke PMD as command line tool. Note that this will invoke
System.exit(int)
.
args
- command line arguments
@Deprecated public static int run(String[] args)
Parses the command line arguments and executes PMD. Returns the exit code without exiting the VM.
args
- command line arguments
0
means successful execution, 1
means error, 4
means there have been violations found.
public static PMD.StatusCode runPmd(String... args)
Deprecated.
Parses the command line arguments and executes PMD. Returns the status code without exiting the VM. Note that the arguments parsing may itself fail and produce a
PMD.StatusCode.ERROR
. This will print the error message to standard error.
args
- command line arguments
PMDConfiguration.isFailOnViolation()
(flag --failOnViolation
) may turn an PMD.StatusCode.OK
into a PMD.StatusCode.VIOLATIONS_FOUND
.
public static PMD.StatusCode runPmd(PMDConfiguration configuration)
Deprecated.
Execute PMD from a configuration. Returns the status code without exiting the VM. This is the main entry point to run a full PMD run with a manually created configuration.
configuration
- Configuration to run
PMDConfiguration.isFailOnViolation()
(flag --failOnViolation
) may turn an PMD.StatusCode.OK
into a PMD.StatusCode.VIOLATIONS_FOUND
.
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