Report()
Deprecated.@Deprecated @InternalApi public Report()
@Deprecated @InternalApi public static Report createReport(RuleContext ctx, String fileName)
Creates a new, initialized, empty report for the given file name.
ctx
- The context to use to connect to the report
fileName
- the filename used to report any violations
public void suppress(Map<Integer,String> lines)
Configure the lines, that are suppressed via a NOPMD comment.
lines
- the suppressed lines
@Deprecated public Map<String,Integer> getCountSummary()
Calculate a summary of violation counts per fully classified class name.
@Deprecated public ReportTree getViolationTree()
@Deprecated public Map<String,Integer> getSummary()
Calculate a summary of violations per rule.
@Deprecated public void addListener(ThreadSafeReportListener listener)
Deprecated.
Registers a report listener
listener
- the listener
@Deprecated public List<Report.SuppressedViolation> getSuppressedRuleViolations()
Returns the suppressed violations.
@Deprecated @InternalApi public void addRuleViolation(RuleViolation violation)
Adds a new rule violation to the report and notify the listeners.
violation
- the violation to add
@Deprecated public void addMetric(Metric metric)
Adds a new metric to the report and notify the listeners
metric
- the metric to add
@Deprecated @InternalApi public void addConfigError(Report.ConfigurationError error)
Adds a new configuration error to the report.
error
- the error to add
@Deprecated @InternalApi public void addError(Report.ProcessingError error)
Adds a new processing error to the report.
error
- the error to add
@Deprecated @InternalApi public void merge(Report r)
This is synchronized on an internal lock (note that other mutation operations are not synchronized, todo for pmd 7).
r
- the report to be merged into this.
AbstractAccumulatingRenderer
@Deprecated public boolean hasMetrics()
Check whether any metrics have been reported
true
if there are metrics, false
otherwise
@Deprecated public Iterator<Metric> metrics()
Iterate over the metrics.
@Deprecated public boolean isEmpty()
Checks whether there are no violations and no processing errors. That means, that PMD analysis yielded nothing to worry about.
@Deprecated public boolean hasErrors()
Checks whether any processing errors have been reported.
true
if there were any processing errors, false
otherwise
@Deprecated public boolean hasConfigErrors()
Checks whether any configuration errors have been reported.
true
if there were any configuration errors, false
otherwise
@Deprecated public boolean treeIsEmpty()
Checks whether no violations have been reported.
true
if no violations have been reported, false
otherwise
@Deprecated public Iterator<RuleViolation> treeIterator()
Returns an iteration over the reported violations.
@Deprecated public Iterator<RuleViolation> iterator()
iterator
in interface Iterable<RuleViolation>
public final List<Report.SuppressedViolation> getSuppressedViolations()
Returns an unmodifiable list of violations that were suppressed.
public final List<RuleViolation> getViolations()
The violations list is sorted with RuleViolation.DEFAULT_COMPARATOR
.
public final List<Report.ProcessingError> getProcessingErrors()
Returns an unmodifiable list of processing errors that have been recorded until now.
public final List<Report.ConfigurationError> getConfigurationErrors()
Returns an unmodifiable list of configuration errors that have been recorded until now.
@Deprecated public Iterator<Report.ProcessingError> errors()
Returns an iterator of the reported processing errors.
@Deprecated public Iterator<Report.ConfigurationError> configErrors()
Returns an iterator of the reported configuration errors.
@Deprecated public int treeSize()
The number of violations.
@Deprecated public int size()
The number of violations.
@Deprecated public void start()
Mark the start time of the report. This is used to get the elapsed time in the end.
getElapsedTimeInMillis()
@Deprecated public void end()
Mark the end time of the report. This is ued to get the elapsed time.
getElapsedTimeInMillis()
@Deprecated public long getElapsedTimeInMillis()
@Deprecated public List<ThreadSafeReportListener> getListeners()
@Deprecated public void addListeners(List<ThreadSafeReportListener> allListeners)
Adds all given listeners to this report
allListeners
- the report listeners
@Experimental public Report filterViolations(Predicate<RuleViolation> filter)
Creates a new report taking all the information from this report, but filtering the violations.
filter
- when true, the violation will be kept.
@Experimental public Report union(Report other)
Creates a new report by combining this report with another report. This is similar to
merge(Report)
, but instead a new report is created. The lowest start time and greatest end time are kept in the copy.
other
- the other report to combine
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