You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gr...@apache.org on 2017/05/31 20:57:18 UTC
[3/5] flink git commit: [FLINK-6778] [dist] Activate strict checkstyle
[FLINK-6778] [dist] Activate strict checkstyle
This closes #4031
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/b5eac06d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/b5eac06d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/b5eac06d
Branch: refs/heads/master
Commit: b5eac06d7cca8317a0f10e08bd5aae654a587a13
Parents: 6ab7719
Author: Greg Hogan <co...@greghogan.com>
Authored: Tue May 30 15:26:19 2017 -0400
Committer: Greg Hogan <co...@greghogan.com>
Committed: Wed May 31 15:59:09 2017 -0400
----------------------------------------------------------------------
flink-dist/pom.xml | 36 ++++++++++++++++++++
...kManagerHeapSizeCalculationJavaBashTest.java | 5 +--
2 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/b5eac06d/flink-dist/pom.xml
----------------------------------------------------------------------
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index b037e55..c7af451 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -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>
http://git-wip-us.apache.org/repos/asf/flink/blob/b5eac06d/flink-dist/src/test/java/org/apache/flink/dist/TaskManagerHeapSizeCalculationJavaBashTest.java
----------------------------------------------------------------------
diff --git a/flink-dist/src/test/java/org/apache/flink/dist/TaskManagerHeapSizeCalculationJavaBashTest.java b/flink-dist/src/test/java/org/apache/flink/dist/TaskManagerHeapSizeCalculationJavaBashTest.java
index 11d8ec7..c037426 100644
--- a/flink-dist/src/test/java/org/apache/flink/dist/TaskManagerHeapSizeCalculationJavaBashTest.java
+++ b/flink-dist/src/test/java/org/apache/flink/dist/TaskManagerHeapSizeCalculationJavaBashTest.java
@@ -23,6 +23,7 @@ import org.apache.flink.configuration.TaskManagerOptions;
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;
@@ -43,7 +44,7 @@ import static org.junit.Assert.assertThat;
* <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.
*/
@@ -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;