Repository: reef Updated Branches: refs/heads/master d8f216320 -> 50b002946
[REEF-1139] Raise a checkstyle warning on calling System.exit() This patch: Adds System.exit() call check as a warning to checkstyle.xml and checkstyle-strict.xml JIRA: [REEF-1139](https://issues.apache.org/jira/browse/REEF-1139) Pull request: Closes #1067 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/50b00294 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/50b00294 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/50b00294 Branch: refs/heads/master Commit: 50b00294661961316bd36765fb66c66e4c561e9a Parents: d8f2163 Author: Soojeong Kim <[email protected]> Authored: Fri Jul 1 16:35:20 2016 +0900 Committer: Yunseong Lee <[email protected]> Committed: Tue Jul 5 00:30:05 2016 +0900 ---------------------------------------------------------------------- .../reef-common/src/main/resources/checkstyle-strict.xml | 9 +++++++++ lang/java/reef-common/src/main/resources/checkstyle.xml | 9 +++++++++ 2 files changed, 18 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/50b00294/lang/java/reef-common/src/main/resources/checkstyle-strict.xml ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/resources/checkstyle-strict.xml b/lang/java/reef-common/src/main/resources/checkstyle-strict.xml index ab42fc9..de47f56 100644 --- a/lang/java/reef-common/src/main/resources/checkstyle-strict.xml +++ b/lang/java/reef-common/src/main/resources/checkstyle-strict.xml @@ -245,6 +245,15 @@ <property name="ignoredClassNameFormat" value="UnsupportedOperationException|NotImplementedException|NoSuchElementException" /> </module> + <!-- Checks for System.exit() call --> + <!-- See https://issues.apache.org/jira/browse/REEF-1139 --> + <module name="Regexp"> + <property name="severity" value="warning"/> + <property name="format" value="System\.exit\("/> + <property name="illegalPattern" value="true"/> + <property name="ignoreComments" value="true"/> + </module> + </module> </module> http://git-wip-us.apache.org/repos/asf/reef/blob/50b00294/lang/java/reef-common/src/main/resources/checkstyle.xml ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/resources/checkstyle.xml b/lang/java/reef-common/src/main/resources/checkstyle.xml index df8affd..15ec4cb 100644 --- a/lang/java/reef-common/src/main/resources/checkstyle.xml +++ b/lang/java/reef-common/src/main/resources/checkstyle.xml @@ -247,6 +247,15 @@ <property name="ignoredClassNameFormat" value="UnsupportedOperationException|NotImplementedException|NoSuchElementException" /> </module> + <!-- Checks for System.exit() call --> + <!-- See https://issues.apache.org/jira/browse/REEF-1139 --> + <module name="Regexp"> + <property name="severity" value="warning"/> + <property name="format" value="System\.exit\("/> + <property name="illegalPattern" value="true"/> + <property name="ignoreComments" value="true"/> + </module> + </module> </module>
