testilo 13.10.1 → 13.10.3
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/call.js +3 -3
- package/package.json +1 -1
- package/procs/score/tic30.js +7427 -0
- package/script.js +4 -4
package/script.js
CHANGED
|
@@ -20,15 +20,15 @@ let toolIDs = [
|
|
|
20
20
|
// ########## FUNCTIONS
|
|
21
21
|
|
|
22
22
|
// Creates and returns a script.
|
|
23
|
-
exports.script = (id,
|
|
23
|
+
exports.script = (id, issues = null, ... issueIDs) => {
|
|
24
24
|
// Initialize data on the tools and rules for the specified issues.
|
|
25
25
|
const neededTools = {};
|
|
26
26
|
// If an issue classification and any issues were specified:
|
|
27
|
-
if (
|
|
27
|
+
if (issues && issueIDs.length) {
|
|
28
28
|
// For each specified issue:
|
|
29
29
|
issueIDs.forEach(issueID => {
|
|
30
30
|
// If it exists in the classification:
|
|
31
|
-
const issueData =
|
|
31
|
+
const issueData = issues[issueID];
|
|
32
32
|
if (issueData) {
|
|
33
33
|
// For each tool that tests for the issue:
|
|
34
34
|
const issueToolIDs = Object.keys(issueData.tools);
|
|
@@ -97,7 +97,7 @@ exports.script = (id, issueClasses = null, ... issueIDs) => {
|
|
|
97
97
|
which: toolID
|
|
98
98
|
};
|
|
99
99
|
// If rules were specified:
|
|
100
|
-
if (
|
|
100
|
+
if (issues && issueIDs.length) {
|
|
101
101
|
// Add a rules property to the act.
|
|
102
102
|
toolAct.rules = neededTools[toolID];
|
|
103
103
|
// If the tool is Testaro:
|