PropertySource
, Renderer
public class TextColorRenderer extends AbstractAccumulatingRenderer
A console renderer with optional color support under *nix systems.
* file: ./src/gilot/Test.java src: Test.java:12 rule: AtLeastOneConstructor msg: Each class should declare at least one constructor code: public class Test * file: ./src/gilot/log/format/LogInterpreter.java src: LogInterpreter.java:317 rule: AvoidDuplicateLiterals msg: The same String literal appears 4 times in this file; the first occurrence is on line 317 code: logger.error( "missing attribute 'app_arg' in rule '" + ((Element)element.getParent()).getAttributeValue( "name" ) + "'" ); src: LogInterpreter.java:317 rule: AvoidDuplicateLiterals msg: The same String literal appears 5 times in this file; the first occurrence is on line 317 code: logger.error( "missing attribute 'app_arg' in rule '" + ((Element)element.getParent()).getAttributeValue( "name" ) + "'" ); * warnings: 3
Colorization is turned on by supplying -Dpmd.color - any value other than '0' or 'false', enables color - including an empty value (''). Nota Bene: colorization is atm only supported under *nix terminals accepting ansi escape sequences, such as xterm, rxvt et cetera.
Modifier and Type | Field | Description |
---|---|---|
static StringProperty |
COLOR |
|
static java.lang.String |
NAME |
report
propertyDescriptors, propertyValuesByDescriptor
description, name, showSuppressedViolations, writer
Constructor | Description |
---|---|
TextColorRenderer() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
defaultFileExtension() |
Return the default filename extension to use.
|
void |
end() |
Subclasses should output the
AbstractAccumulatingRenderer.report . |
protected java.io.Reader |
getReader(java.lang.String sourceFile) |
renderFileReport, start, startFileAnalysis
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
flush, getDescription, getName, getWriter, isShowSuppressedViolations, setDescription, setName, setShowSuppressedViolations, setWriter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
public static final java.lang.String NAME
public static final StringProperty COLOR
public java.lang.String defaultFileExtension()
Renderer
public void end() throws java.io.IOException
AbstractAccumulatingRenderer
AbstractAccumulatingRenderer.report
.
This method is at the very end of the Rendering process, after
Renderer.renderFileReport(Report)
.end
in interface Renderer
end
in class AbstractAccumulatingRenderer
java.io.IOException
protected java.io.Reader getReader(java.lang.String sourceFile) throws java.io.FileNotFoundException
java.io.FileNotFoundException
Copyright © 2002–2018 PMD. All rights reserved.