Checkstyle Rules

The Checkstyle Rules project

Лицензия

Лицензия

Категории

Категории

Checkstyle Тестирование приложения и мониторинг Code Analysis
Группа

Группа

com.github.nhojpatrick.qa
Идентификатор

Идентификатор

nhojpatrick-checkstyle-rules
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Checkstyle Rules
The Checkstyle Rules project
Ссылка на сайт

Ссылка на сайт

https://github.com/nhojpatrick/nhojpatrick-checkstyle-rules
Система контроля версий

Система контроля версий

http://github.com/nhojpatrick/nhojpatrick-checkstyle-rules/tree/master

Скачать nhojpatrick-checkstyle-rules

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Checkstyle Custom Configuration

Maven Central CircleCI coveralls Known Vulnerabilities GitHub

Checkstyle is a static code analysis tool to see if code adheres to 'your' coding standing. This project contains custom checkstyle rules.

The initial version just does checks for line length and tabs.

To use checkstyle the following best practice is suggested, with these notes;

  • Put into your parent pom so to simplify your projects.
  • Configure the plugin via pluginManagement, as tools like versions-maven-plugin can detect available updates.
  • Configure version range of this i.e. <version>[1.0.0,1.0.999)</version>, so latest 1.0.x will automatically be used.
  • Execution is done via a profile.
  • Execution is as simple as;
    • fail at 1st violation, use ./mvnw -Pqa_checkstyle.
    • find all violations (i.e. jenkins report), use ./mvnw -Pqa_checkstyle -Dcheckstyle.maxAllowedViolations=999999.
<project>
	...
	<build>
		...
		<pluginManagement>
			<plugins>
				...
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${plugins.maven.maven-checkstyle-plugin}</version>
					<configuration>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${version.com.puppycrawl.tools.checkstyle}</version>
						</dependency>
						<dependency>
							<groupId>com.github.nhojpatrick.qa</groupId>
							<artifactId>nhojpatrick-qa-ruleset-checkstyle</artifactId>
							<version>[1.0.0,1.0.999)</version>
						</dependency>
					</dependencies>
				</plugin>
				...
			<plugins>
		<pluginManagement>
		...
	<build>
	...
	<profiles>
		...
			<id>qa_checkstyle</id>
			<build>
				<defaultGoal>verify</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<executions>
							<execution>
								<id>checkstyle-check</id>
								<phase>validate</phase>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<properties>
				<skipTests>true</skipTests>
				<sort.skip>true</sort.skip>
			</properties>
		</profile>
		...
	</profiles>
	...
	<properties>
		<checkstyle.config.location>com/github/nhojpatrick/qa/ruleset/checkstyle/rules.xml</checkstyle.config.location>
		<checkstyle.maxAllowedViolations>0</checkstyle.maxAllowedViolations>
		<plugins.maven.maven-checkstyle-plugin>3.1.1</plugins.maven.maven-checkstyle-plugin>
		<version.com.puppycrawl.tools.checkstyle>8.30</version.com.puppycrawl.tools.checkstyle>
	</properties>
</project>

Версии библиотеки

Версия
1.0.1
1.0.0