ktlint reporters generate empty files
opened this issue · comments
Deleted user commented
Hi there,
I have an issue with generating checkstyle reports from ktlint. My Maven configuration for the ktlint-maven-plugin
looks as follows:
<plugin>
<groupId>com.github.gantsign.maven</groupId>
<artifactId>ktlint-maven-plugin</artifactId>
<executions>
<execution>
<id>checkstyle</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<failOnViolation>false</failOnViolation>
<reporters>
<reporter>
<name>checkstyle</name>
<output>${project.build.directory}/checkstyle-ktlint.xml</output>
</reporter>
</reporters>
</configuration>
</execution>
</executions>
</plugin>
During the execution of my build I can see error messages from ktlint in the console output:
[ERROR] src\main\kotlin\com\bbraun\cit\dlm\validation\ValidatableXmlAdapter.kt:5:40: Missing spacing before ":"
[ERROR] src\main\kotlin\com\bbraun\cit\dlm\validation\ValidatableXmlAdapter.kt:12:31: Missing spacing before ":"
[ERROR] src\main\kotlin\com\bbraun\cit\dlm\validation\ValidationError.kt:13:1: Needless blank line(s)
But the resulting output file checkstyle-ktlint.xml
does not contain any entries:
<?xml version="1.0" encoding="utf-8"?>
<checkstyle version="8.0">
</checkstyle>
I also tried the plain
reporter but the resulting text file was empty also.
Do you have an idea on what could be the reason for this?
Thanks in advance
Jens
John Freeman commented
Deleted user commented
Thanks for fixing this!