testilo 17.1.0 → 17.1.1

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": "testilo",
3
- "version": "17.1.0",
3
+ "version": "17.1.1",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
@@ -0,0 +1,23 @@
1
+ /*
2
+ ruleCounts.js
3
+ Tabulates tool rules from a issue classification.
4
+ */
5
+
6
+ const {issues} = require('../score/tic36');
7
+
8
+ const counts = {
9
+ total: 0
10
+ };
11
+ // For each issue:
12
+ Object.values(issues).forEach(issue => {
13
+ // For each tool with any rules of the issue:
14
+ Object.keys(issue.tools).forEach(toolName => {
15
+ if (! counts[toolName]) {
16
+ counts[toolName] = 0;
17
+ }
18
+ const increment = Object.keys(issue.tools[toolName]).length;
19
+ counts[toolName] += increment;
20
+ counts.total += increment;
21
+ });
22
+ });
23
+ console.log(JSON.stringify(counts, null, 2));