Skip to content

Commit

Permalink
[FLINK-6778] [dist] Activate strict checkstyle
Browse files Browse the repository at this point in the history
This closes apache#4031
  • Loading branch information
greghogan committed May 31, 2017
1 parent 6ab7719 commit b5eac06
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
36 changes: 36 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,42 @@ under the License.
</configuration>
</plugin>

<!-- Java Code Style -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.19</version>
</dependency>
</dependencies>
<configuration>
<configLocation>/tools/maven/strict-checkstyle.xml</configLocation>
<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
</configuration>
<executions>
<!--
Execute checkstyle after compilation but before tests.
This ensures that any parsing or type checking errors are from
javac, so they look as expected. Beyond that, we want to
fail as early as possible.
-->
<execution>
<phase>test-compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.flink.runtime.taskexecutor.TaskManagerServices;
import org.apache.flink.util.OperatingSystem;
import org.apache.flink.util.TestLogger;

import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -43,7 +44,7 @@
* <tt>taskmanager.sh</tt> returns the same values as the heap size calculation of
* {@link TaskManagerServices#calculateHeapSizeMB(long, Configuration)}.
*
* NOTE: the shell script uses <tt>awk</tt> to perform floating-point arithmetic which uses
* <p>NOTE: the shell script uses <tt>awk</tt> to perform floating-point arithmetic which uses
* <tt>double</tt> precision but our Java code restrains to <tt>float</tt> because we actually do
* not need high precision.
*/
Expand All @@ -55,7 +56,7 @@ public class TaskManagerHeapSizeCalculationJavaBashTest extends TestLogger {
/**
* Number of tests with random values.
*
* NOTE: calling the external test script is slow and thus low numbers are preferred for general
* <p>NOTE: calling the external test script is slow and thus low numbers are preferred for general
* testing.
*/
private static final int NUM_RANDOM_TESTS = 20;
Expand Down

0 comments on commit b5eac06

Please sign in to comment.