Commit b29c7d71 authored by DeleMing's avatar DeleMing

<dev>

1. 修改下载脚本,并修改持仓规则脱敏顺序在脱敏姓名前
parent 6d614c00
Pipeline #15929 failed with stages
in 29 seconds
......@@ -57,7 +57,7 @@ public class TestDesensitization {
map.put("count2", "普通字段4");
map.put("count3", "普通字段5");
map.put("count4", "普通字段6");
map.put("count4", "持仓1000万");
map.put("count4", "持仓1000万");
map.put("message", "廖鸣韬|18570332683|0730-7638844|liaomingtao@zork.com.cn|430621194711110423|6222600260001072123|上海市浦东新区张江路|192.168.70.1|00:0C:29:01:98:27|1111");
map.put("message", "13811110000|110101199003075517|上海市浦东新区张江微电子港|zorkdata@163.com|123456789|wanghaiying123-王海鹰-192.168.1.1-00-50-56-C0-00-08-6227002470170278192-持仓1000万");
Map<String, String> stringStringMap = desensitizationFunction.desensitization(map, whiteList, dataFormats);
......
......@@ -29,11 +29,11 @@ public class DesensitizationFunction implements Serializable {
patterns.add(Pattern.compile(regularExpressions.getMobileRegExp()));
patterns.add(Pattern.compile(regularExpressions.getAddressRegExp()));
patterns.add(Pattern.compile(regularExpressions.getPositionExp()));
patterns.add(Pattern.compile(regularExpressions.getNameRegExp()));
patterns.add(Pattern.compile(regularExpressions.getMacRegExp()));
patterns.add(Pattern.compile(regularExpressions.getEmailRegExp()));
patterns.add(Pattern.compile(regularExpressions.getIpRegExp()));
patterns.add(Pattern.compile(regularExpressions.getPositionExp()));
}
public Map<String, String> desensitization(Map<String, String> map,
......
......@@ -83,7 +83,7 @@ expect <<EOF
}
expect "]# " { send "rm -rf $SCP_PATH\n" }
expect "]# " { send "su $CDH_HDFS_USER\n" }
expect "]# " { send "hadoop fs -copyToLocal $HDFS_DEST $DOWNLOAD_PATH\n" }
expect "]$ " { send "hadoop fs -copyToLocal $HDFS_DEST $DOWNLOAD_PATH\n" }
expect "]# " { send "exit\n" }
expect "]# " {
send "scp -r $SCP_PATH root@$LOCAL_IP:/tmp/\n"
......
  • SonarQube analysis reported 113 issues

    • 🚫 24 critical
    • 61 major
    • 🔽 27 minor
    • 1 info

    Top 30 extra issues

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. 🚫 Add a default case to this switch. 📘
    2. 🚫 switch中每个case需要通过break/return等来终止 📘
    3. 🚫 switch块缺少default语句 📘
    4. 🚫 Define a constant instead of duplicating this literal " {\n" 11 times. 📘
    5. 🚫 [Define a constant instead of duplicating this literal " "type": \n" 11 times. 📘
    6. 🚫 Define a constant instead of duplicating this literal " "string",\n" 6 times. 📘
    7. 🚫 Define a constant instead of duplicating this literal " "null"\n" 6 times. 📘
    8. 🚫 [Define a constant instead of duplicating this literal " ]\n" 11 times.](https://git.zorkdata.com/liaomingtao/transaction_log_desensitization/blob/b29c7d717755871b2eda5169af6fd75c81108745/src/main/java/com/zorkdata/desensitization/avro/AvroSchemaDef.java#L23) 📘
    9. 🚫 Define a constant instead of duplicating this literal " },\n" 9 times. 📘
    10. 🚫 Define a constant instead of duplicating this literal " "null",\n" 5 times. 📘
    11. 🚫 Define a constant instead of duplicating this literal " {\n" 5 times. 📘
    12. 🚫 Define a constant instead of duplicating this literal " "type": "map",\n" 5 times. 📘
    13. 🚫 Define a constant instead of duplicating this literal " "values": "string"\n" 3 times. 📘
    14. 🚫 Define a constant instead of duplicating this literal " }\n" 5 times. 📘
    15. 🚫 Define a constant instead of duplicating this literal "序列化失败" 13 times. 📘
    16. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    17. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    18. 🚫 Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed. 📘
    19. 🚫 常量【dataFormats】命名应全部大写并以下划线分隔 📘
    20. 🚫 Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation. 📘
    21. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    22. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    23. 🚫 Refactor this code to not throw exceptions in finally blocks. 📘
    24. 🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.) 📘
    25. This block of commented-out lines of code should be removed. 📘
    26. 及时清理不再使用的代码段或配置信息。 📘
    27. Replace this use of System.out or System.err by a logger. 📘
    28. Replace this use of System.out or System.err by a logger. 📘
    29. String contains no format specifiers. 📘
    30. Replace this use of System.out or System.err by a logger. 📘
    • ... 83 more
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment