| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 809dc09 commit 7ba3599
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,12 +14,12 @@ const msg = 'Please add a skipIfInspectorDisabled() call to allow this ' + | |||
| 14 | 14 | 'test to be skippped when Node is built \'--without-inspector\'.'; | |
| 15 | 15 | ||
| 16 | 16 | module.exports = function(context) { | |
| 17 | - var usesInspector = false; | ||
| 17 | + const missingCheckNodes = []; | ||
| 18 | 18 | var hasInspectorCheck = false; | |
| 19 | 19 | ||
| 20 | 20 | function testInspectorUsage(context, node) { | |
| 21 | 21 | if (utils.isRequired(node, ['inspector'])) { | |
| 22 | - usesInspector = true; | ||
| 22 | + missingCheckNodes.push(node); | ||
| 23 | 23 | } | |
| 24 | 24 | } | |
| 25 | 25 | ||
@@ -30,8 +30,10 @@ module.exports = function(context) { | |||
| 30 | 30 | } | |
| 31 | 31 | ||
| 32 | 32 | function reportIfMissing(context, node) { | |
| 33 | - if (usesInspector && !hasInspectorCheck) { | ||
| 34 | - context.report(node, msg); | ||
| 33 | + if (!hasInspectorCheck) { | ||
| 34 | + missingCheckNodes.forEach((node) => { | ||
| 35 | + context.report(node, msg); | ||
| 36 | + }); | ||
| 35 | 37 | } | |
| 36 | 38 | } | |
| 37 | 39 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments