/badger

Generates status badges for PMD, Checkstyle, Findbugs and JaCoCo

Primary LanguageJavaMIT LicenseMIT

bordertech badger

Provides a Maven plugin to generate status badges for:

  • CheckStyle
  • PMD
  • FindBugs
  • JaCoCo

Status

CircleCI Codacy Badge

Example Badges

These are the badges for the Badger project itself:

PMD badge Checkstyle Findbugs

Here are some examples of badges where warnings are reported:

PMD badge Checkstyle Findbugs

Here are some examples of badges where issues are detected:

PMD badge Checkstyle Findbugs

Example Usage

<build>
	<plugins>
		<!-- Generate badges. -->
		<plugin>
			<groupId>com.github.bordertech.buildtools</groupId>
			<artifactId>badger</artifactId>
			<version>1.0.0</version>
			<executions>
				<execution>
					<phase>post-site</phase>
					<goals>
						<goal>badges</goal>
					</goals>
					<configuration>
						<skip>${badges.skip}</skip>
						<outputDir>target/site/badges</outputDir>
						<inputFiles>
							<inputFile>target/pmd.xml</inputFile>
							<inputFile>target/findbugs-report.xml</inputFile>
							<inputFile>target/findbugsXml.xml</inputFile>
							<inputFile>target/checkstyle-result.xml</inputFile>
							<inputFile>target/coverage-report.xml</inputFile>
						</inputFiles>
					</configuration>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>