This is an automated email from the ASF dual-hosted git repository.
mmuzaf pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 037354a IGNITE-12954: Fix checkstyle rules for ML (#7736)
037354a is described below
commit 037354ac49fbe3d0dd53f85ed67fa242e4d35d6d
Author: Maxim Muzafarov <[email protected]>
AuthorDate: Mon Apr 27 19:19:13 2020 +0300
IGNITE-12954: Fix checkstyle rules for ML (#7736)
---
checkstyle/checkstyle-suppressions.xml | 3 -
.../ml/xgboost/parser/XGBoostModelLexer.java | 62 +++++++++++++++--
.../ml/xgboost/parser/XGBoostModelParser.java | 81 ++++++++++++++++++++--
3 files changed, 132 insertions(+), 14 deletions(-)
diff --git a/checkstyle/checkstyle-suppressions.xml
b/checkstyle/checkstyle-suppressions.xml
index 6b7fdfa..250e0fa 100644
--- a/checkstyle/checkstyle-suppressions.xml
+++ b/checkstyle/checkstyle-suppressions.xml
@@ -23,8 +23,5 @@
<suppressions>
<suppress checks="EmptyLineSeparator|MethodParamPad|SingleSpaceSeparator"
files="BCrypt\.java|ConcurrentLinkedDeque8\.java"/>
-
- <suppress checks="EmptyLineSeparator|MethodParamPad"
files="XGBoostModelLexer\.java|XGBoostModelParser\.java"/>
-
<suppress checks="NoWhitespaceBefore"
files="ConcurrentLinkedHashMap\.java"/>
</suppressions>
diff --git
a/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelLexer.java
b/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelLexer.java
index 3f1c710..974400a 100644
---
a/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelLexer.java
+++
b/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelLexer.java
@@ -45,10 +45,64 @@ public class XGBoostModelLexer extends Lexer {
protected static final PredictionContextCache _sharedContextCache = new
PredictionContextCache();
/** */
- public static final int
- YES = 1, NO = 2, MISSING = 3, EQ = 4, COMMA = 5, PLUS = 6, MINUS = 7,
DOT = 8, EXP = 9,
- BOOSTER = 10, LBRACK = 11, RBRACK = 12, COLON = 13, LEAF = 14, INT =
15, DOUBLE = 16,
- STRING = 17, NEWLINE = 18, LT = 19, WS = 20;
+ public static final int YES = 1;
+
+ /** */
+ public static final int NO = 2;
+
+ /** */
+ public static final int MISSING = 3;
+
+ /** */
+ public static final int EQ = 4;
+
+ /** */
+ public static final int COMMA = 5;
+
+ /** */
+ public static final int PLUS = 6;
+
+ /** */
+ public static final int MINUS = 7;
+
+ /** */
+ public static final int DOT = 8;
+
+ /** */
+ public static final int EXP = 9;
+
+ /** */
+ public static final int BOOSTER = 10;
+
+ /** */
+ public static final int LBRACK = 11;
+
+ /** */
+ public static final int RBRACK = 12;
+
+ /** */
+ public static final int COLON = 13;
+
+ /** */
+ public static final int LEAF = 14;
+
+ /** */
+ public static final int INT = 15;
+
+ /** */
+ public static final int DOUBLE = 16;
+
+ /** */
+ public static final int STRING = 17;
+
+ /** */
+ public static final int NEWLINE = 18;
+
+ /** */
+ public static final int LT = 19;
+
+ /** */
+ public static final int WS = 20;
/** Channel names. */
public static String[] channelNames = {
diff --git
a/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelParser.java
b/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelParser.java
index 999144d..d12a8b1 100644
---
a/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelParser.java
+++
b/modules/ml/xgboost-model-parser/src/main/java/org/apache/ignite/ml/xgboost/parser/XGBoostModelParser.java
@@ -53,15 +53,82 @@ public class XGBoostModelParser extends Parser {
protected static final PredictionContextCache _sharedContextCache = new
PredictionContextCache();
/** */
- public static final int
- YES = 1, NO = 2, MISSING = 3, EQ = 4, COMMA = 5, PLUS = 6, MINUS = 7,
DOT = 8, EXP = 9,
- BOOSTER = 10, LBRACK = 11, RBRACK = 12, COLON = 13, LEAF = 14, INT =
15, DOUBLE = 16,
- STRING = 17, NEWLINE = 18, LT = 19, WS = 20;
+ public static final int YES = 1;
/** */
- public static final int
- RULE_xgValue = 0, RULE_xgHeader = 1, RULE_xgNode = 2, RULE_xgLeaf = 3,
- RULE_xgTree = 4, RULE_xgModel = 5;
+ public static final int NO = 2;
+
+ /** */
+ public static final int MISSING = 3;
+
+ /** */
+ public static final int EQ = 4;
+
+ /** */
+ public static final int COMMA = 5;
+
+ /** */
+ public static final int PLUS = 6;
+
+ /** */
+ public static final int MINUS = 7;
+
+ /** */
+ public static final int DOT = 8;
+
+ /** */
+ public static final int EXP = 9;
+
+ /** */
+ public static final int BOOSTER = 10;
+
+ /** */
+ public static final int LBRACK = 11;
+
+ /** */
+ public static final int RBRACK = 12;
+
+ /** */
+ public static final int COLON = 13;
+
+ /** */
+ public static final int LEAF = 14;
+
+ /** */
+ public static final int INT = 15;
+
+ /** */
+ public static final int DOUBLE = 16;
+
+ /** */
+ public static final int STRING = 17;
+
+ /** */
+ public static final int NEWLINE = 18;
+
+ /** */
+ public static final int LT = 19;
+
+ /** */
+ public static final int WS = 20;
+
+ /** */
+ public static final int RULE_xgValue = 0;
+
+ /** */
+ public static final int RULE_xgHeader = 1;
+
+ /** */
+ public static final int RULE_xgNode = 2;
+
+ /** */
+ public static final int RULE_xgLeaf = 3;
+
+ /** */
+ public static final int RULE_xgTree = 4;
+
+ /** */
+ public static final int RULE_xgModel = 5;
/** Rule names. */
public static final String[] ruleNames = {