crabatool 1.0.33 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tool/checkjs.js +16 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tool/checkjs.js CHANGED
@@ -72,8 +72,11 @@ module.exports.start = function() {
72
72
  }
73
73
 
74
74
  var modName = config.modName || 'noname';
75
+ var dtList = [];
75
76
  var info = [];
76
77
  info.push(`# ${modName}代码检测报告——${status}`);
78
+ dtList.push(info[0]);
79
+
77
80
  info.push("| 名称 | 结果 |");
78
81
  info.push("| ------ | ------ |");
79
82
  info.push(`| 助手版本 | ${config.Version} |`);
@@ -87,8 +90,17 @@ module.exports.start = function() {
87
90
  info.push("| 异常类型 | 数量 |");
88
91
  info.push("| ------ | ------ |");
89
92
  info.push(`| 语法异常文件数 | ${errList.length}个 |`);
90
- if (notUtf8List.length > 0) info.push(`| 非utf8文件数 | ${notUtf8List.length}个 |`);
91
- if (bigList.length > 0) info.push(`| 超过${fileSize}kb的文件数 | ${bigList.length}个 |`);
93
+ dtList.push(`1. 语法异常文件数:${errList.length}个`);
94
+
95
+ if (notUtf8List.length > 0) {
96
+ info.push(`| 非utf8文件数 | ${notUtf8List.length}个 |`);
97
+ dtList.push(`1. 非utf8文件数:${notUtf8List.length}个`);
98
+ }
99
+ if (bigList.length > 0) {
100
+ info.push(`| 超过${fileSize}kb的文件数 | ${bigList.length}个 |`);
101
+ dtList.push(`1. 超过${fileSize}kb的文件数:${bigList.length}个`);
102
+ }
103
+
92
104
 
93
105
  var detail = [];
94
106
  if (errList.length > 0) {
@@ -167,8 +179,8 @@ module.exports.start = function() {
167
179
  if (status == '健康') return; // 检查结果检查就不发到钉钉了
168
180
 
169
181
  // 推送到钉钉只推送详情
170
- info.push(`[报告详情](${reportUrl})`);
171
- data.markdown.text = info.join(' \n');
182
+ dtList.push(`[报告详情](${reportUrl})`);
183
+ data.markdown.text = dtList.join(' \n');
172
184
 
173
185
  axios({
174
186
  method: 'post',