ソースを参照

忽略E0601错误

root 2 年 前
コミット
4de4b5d3e9

+ 1 - 0
api-common/src/main/java/api/common/util/PythonUtil.java

@@ -23,6 +23,7 @@ public class PythonUtil {
     public static String W = "W";
     public static String E = "E";
     public static String E0401 = "E0401";
+    public static String E0601 = "E0601";
     public static String F = "F";
     public static String PASS = "Your code has been rated at 10.00/10";
 

+ 2 - 2
simulation-resource-server/src/main/java/com/css/simulation/resource/project/impl/SimulationProjectServiceImpl.java

@@ -1960,10 +1960,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         for (int i = 0; i < maxHeaderNumber - fieldNumber; i++) {
             addHeaders(i, headerList);
         }
-        headerList.add(ImmutableMap.builder().put("label", "场景数").put("prop", "sceneNum").build());
+        headerList.add(ImmutableMap.builder().put("label", "场景数").put("prop", "sceneNum").build());
         headerList.add(ImmutableMap.builder().put("label", "仿真异常场景个数").put("prop", "errorSceneNum").build());
         headerList.add(ImmutableMap.builder().put("label", "评分失败场景个数").put("prop", "notScoredSceneNum").build());
-        headerList.add(ImmutableMap.builder().put("label", "未达标场景数").put("prop", "notStandardSceneNum").build());
+        headerList.add(ImmutableMap.builder().put("label", "未达标场景数").put("prop", "notStandardSceneNum").build());
         headerList.add(ImmutableMap.builder().put("label", "达标场景个数").put("prop", "standardSceneNum").build());
         headerList.add(ImmutableMap.builder().put("label", "得分").put("prop", "lastScore").build());
         headerList.add(ImmutableMap.builder().put("label", "总分").put("prop", "firstScore").build());

+ 7 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/scene/ctrl/ScoringRulesController.java

@@ -85,7 +85,13 @@ public class ScoringRulesController {
             return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "规则名称 ruleName 已存在,请重新命名。");
         }
         //2 校验 python 语法错误
-        String pylint = PythonUtil.pylint(scoringRulesPO.getRuleDetails(), PythonUtil.C, PythonUtil.R, PythonUtil.W, PythonUtil.E0401);
+        String pylint = PythonUtil.pylint(scoringRulesPO.getRuleDetails(),
+                PythonUtil.C,
+                PythonUtil.R,
+                PythonUtil.W,
+                PythonUtil.E0401,
+                PythonUtil.E0601
+        );
         if (!pylint.contains(PythonUtil.PASS)) {
             return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE, "代码格式错误,请检查。");
         }