Jenkins understands the format of compiler warnings. When this option is configured, Jenkins can provide useful information about the compiler warnings, such as historical result trend, web UI for viewing analysis reports, and so on. To use this feature, configure your compiler to write all warnings to the log file.
To get the Ant javac task to include compiler warnings in the build output you must
(a) avoid specifying nowarn="on"
("off"
is the default) and
(b) include the -Xlint
compiler argument (or some variant thereof). Example:
<javac deprecation="true" destdir="classes">
<compilerarg value="-Xlint"/>
</javac>
If you are using maven to compile your sources, place the following snippet into your pom.xml to enable the compiler warnings.
<plugins>
[...]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
[...]
</plugins>
SELECT dao.owner, dao.object_name, dao.object_type, dao.status, dae.line, dae.position, dae.text
FROM dba_objects dao, dba_errors dae
WHERE dao.status = 'INVALID'
AND dao.owner = dae.owner(+)
AND dao.object_name = dae.name(+)
AND dao.object_type = dae.type(+)
ORDER BY object_type, object_name;
To be able to grab puppet-lint output, you will need a recent enough version that supports
the --log-format flag
.
When running puppet-lint, make sure you use the following log format:
%{path}:%{line}:%{check}:%{KIND}:%{message}
Complete example:
find . -iname *.pp -exec puppet-lint --log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" {} \;
To be able to grab ansible lint output, you will need to add
the -p flag
.
Example:
ansible-lint -p example_file.yml
Various versions/forks of jslint are supported. So far tested with:
npm install jshint
jshint --jslint-reporter *.js > jslint.xml || true
java -jar jslint4java-2.0.2.jar --report xml *.js > jslint.xml