UNPKG

@lcap/nasl

Version:

NetEase Application Specific Language

17 lines 545 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ruleDeleteVoidExpression = void 0; const regex = /无返回值的(.*)不能在(.*)中作为表达式使用。/; exports.ruleDeleteVoidExpression = { isFixable(diagnostic) { const match = diagnostic.message?.match(regex); if (match) { return { hint: `一键删除 ${match[1]}` }; } return false; }, commitFix(node) { node.delete(); }, }; //# sourceMappingURL=rule-delete-void-expression.js.map