Require Javadoc Tag

A simple example of custom checkstyle rule. It checks the existence of a javadoc tag

License

License

Categories

Categories

Checkstyle Application Testing & Monitoring Code Analysis
GroupId

GroupId

com.github.bmaggi
ArtifactId

ArtifactId

checkstyle-requirejavadoctag
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

Require Javadoc Tag
A simple example of custom checkstyle rule. It checks the existence of a javadoc tag
Project URL

Project URL

http://github.com/bmaggi/checkstyle-requirejavadoctag
Source Code Management

Source Code Management

http://github.com/bmaggi/checkstyle-requirejavadoctag/tree/master

Download checkstyle-requirejavadoctag

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.bmaggi/checkstyle-requirejavadoctag/ -->
<dependency>
    <groupId>com.github.bmaggi</groupId>
    <artifactId>checkstyle-requirejavadoctag</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.bmaggi/checkstyle-requirejavadoctag/
implementation 'com.github.bmaggi:checkstyle-requirejavadoctag:0.1.2'
// https://jarcasting.com/artifacts/com.github.bmaggi/checkstyle-requirejavadoctag/
implementation ("com.github.bmaggi:checkstyle-requirejavadoctag:0.1.2")
'com.github.bmaggi:checkstyle-requirejavadoctag:jar:0.1.2'
<dependency org="com.github.bmaggi" name="checkstyle-requirejavadoctag" rev="0.1.2">
  <artifact name="checkstyle-requirejavadoctag" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.bmaggi', module='checkstyle-requirejavadoctag', version='0.1.2')
)
libraryDependencies += "com.github.bmaggi" % "checkstyle-requirejavadoctag" % "0.1.2"
[com.github.bmaggi/checkstyle-requirejavadoctag "0.1.2"]

Dependencies

compile (1)

Group / Artifact Type Version
com.puppycrawl.tools : checkstyle jar 7.6

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

checkstyle-requirejavadoctag

A simple example of a checkstyle extension to check if a javadoc tag is missing

Status

Codeship Status for bmaggi/checkstyle-requirejavadoctag Maven Central

Usage

Create a checkstyle.xml file

<?xml version="1.0" ?>
 
<!DOCTYPE module PUBLIC
  "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
  "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
	<module name="TreeWalker">
		<module name="com.github.bmaggi.checks.RequiredJavadocTagCheck">
			<property name="customtag" value="@Requirement"/>
		</module>
	</module>
</module>

Configure the pom.xml

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.17</version>
				<dependencies>
					<dependency>
						<groupId>com.github.bmaggi</groupId>
						<artifactId>checkstyle-requirejavadoctag</artifactId>
						<version>0.1.1</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>checkstyle</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<configLocation>requirejavadoctag/checkstyle.xml</configLocation>
							<failOnViolation>true</failOnViolation>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.17</version>
				<configuration>
					<configLocation>requirejavadoctag/checkstyle.xml</configLocation>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

Find version in GitHub releases tab

How to make a release

Check that you are using latest version

mvn versions:display-dependency-updates
mvn versions:display-plugin-updates

To release on maven central.

mvn release:clean release:prepare 

follow by

mvn release:perform

Versions

Version
0.1.2
0.1.1