crabatool 1.0.185 → 1.0.186

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.185",
3
+ "version": "1.0.186",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
package/tool/checkjs.js CHANGED
@@ -379,6 +379,12 @@ module.exports.start = async function() {
379
379
  if (status != '无异常') { // 检查结果检查就不发到钉钉了; ps:健康也发到钉钉,鼓励开发继续保持;
380
380
  postWebhooks(id, reportUrl, webhookList);
381
381
  }
382
+
383
+ if (errCount > 0 && config.errorAbort) {
384
+ var tips = '警告!!!代码检测发现异常,已终止当前构建任务。请修复代码后重新构建。';
385
+ utils.postWeebhooks(tips);
386
+ throw new Error(tips);
387
+ }
382
388
  }
383
389
 
384
390
  async function eslintCheck(content) {
package/tool/start.js CHANGED
@@ -88,6 +88,7 @@ class Start {
88
88
  { name: '-globals', type: 'array' },
89
89
 
90
90
  { name: '-ignoreCompress', type: 'boolean' },
91
+ { name: '-errorAbort', type: 'boolean' },
91
92
  { name: '-hidejspath', type: 'boolean' },
92
93
  { name: '-Debug', type: 'boolean' },
93
94
  { name: '-checkgspx', type: 'boolean' },