Skip to content

[MCHECKSTYLE-431] Avoid creating unnecessary target files for pom projects #341

@jira-importer

Description

@jira-importer

Alexis Jehan opened MCHECKSTYLE-431 and commented

Because pom projects do not have Java code, It is not necessary to create "target/checkstyle-cachefile", "target/checkstyle-checker.xml", "target/checkstyle-result.xml" and "target/checkstyle-suppressions.xml" files for these projects.

Maven configuration:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-checkstyle-plugin</artifactId>
	<version>3.2.1</version>
	<dependencies>
		<dependency>
			<groupId>com.puppycrawl.tools</groupId>
			<artifactId>checkstyle</artifactId>
			<version>10.9.3</version>
		</dependency>
	</dependencies>
	<configuration>
		<configLocation>checkstyle.xml</configLocation>
		<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
		<includeTestSourceDirectory>true</includeTestSourceDirectory>
		<violationSeverity>info</violationSeverity>
	</configuration>
	<executions>
		<execution>
			<id>checkstyle-check</id>
			<phase>validate</phase>
			<goals>
				<goal>check</goal>
			</goals>
		</execution>
	</executions>
</plugin>

Maven output:

[INFO] --- checkstyle:3.2.1:check (checkstyle-check) @ parent-project ---
[INFO] You have 0 Checkstyle violations.

Content of the generated "target/checkstyle-result.xml":

<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="10.9.3">
</checkstyle>

Affects: 3.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions