@eagleoutice/flowr 2.15.10 → 2.16.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/README.md +23 -26
- package/abstract-interpretation/data-frame/arguments.js +11 -7
- package/cli/flowr-main-options.d.ts +15 -0
- package/cli/flowr-main-options.js +18 -0
- package/cli/flowr.d.ts +18 -0
- package/cli/flowr.js +13 -2
- package/cli/repl/commands/repl-clipboard.js +2 -1
- package/cli/repl/commands/repl-commands.js +2 -0
- package/cli/repl/commands/repl-main.d.ts +5 -0
- package/cli/repl/commands/repl-signature.js +2 -0
- package/cli/repl/core.d.ts +7 -1
- package/cli/repl/core.js +17 -8
- package/cli/repl/execute.js +2 -0
- package/cli/repl/server/connection.js +2 -1
- package/cli/repl/server/net.d.ts +10 -0
- package/cli/repl/server/net.js +34 -1
- package/cli/slicer-app.js +2 -1
- package/config.d.ts +12 -2
- package/config.js +91 -14
- package/control-flow/happens-before.d.ts +5 -0
- package/control-flow/happens-before.js +48 -34
- package/control-flow/useless-loop.d.ts +1 -1
- package/control-flow/useless-loop.js +29 -42
- package/dataflow/environments/built-in-props.d.ts +9 -0
- package/dataflow/environments/built-in-props.js +25 -19
- package/dataflow/environments/built-in.d.ts +2 -2
- package/dataflow/environments/built-in.js +41 -77
- package/dataflow/environments/default-builtin-config.d.ts +181 -29
- package/dataflow/environments/default-builtin-config.js +38 -24
- package/dataflow/environments/environment.d.ts +6 -4
- package/dataflow/environments/environment.js +54 -121
- package/dataflow/environments/identifier.d.ts +4 -2
- package/dataflow/environments/identifier.js +23 -69
- package/dataflow/environments/reference-to-maybe.d.ts +9 -0
- package/dataflow/environments/reference-to-maybe.js +23 -51
- package/dataflow/environments/resolve-by-name.js +37 -76
- package/dataflow/eval/resolve/resolve-argument.d.ts +3 -1
- package/dataflow/eval/resolve/resolve-argument.js +61 -64
- package/dataflow/eval/resolve/resolve-working-directory.d.ts +8 -2
- package/dataflow/eval/resolve/resolve-working-directory.js +12 -20
- package/dataflow/eval/resolve/resolve.d.ts +4 -0
- package/dataflow/eval/resolve/resolve.js +23 -14
- package/dataflow/extractor.js +185 -59
- package/dataflow/fn/class-declaration.d.ts +8 -2
- package/dataflow/fn/class-declaration.js +96 -97
- package/dataflow/fn/exceptions-of-function.js +68 -37
- package/dataflow/fn/frame-reflection.d.ts +12 -4
- package/dataflow/fn/frame-reflection.js +64 -42
- package/dataflow/fn/function-props.js +15 -33
- package/dataflow/fn/function-semantics.d.ts +11 -3
- package/dataflow/fn/function-semantics.js +6 -0
- package/dataflow/fn/higher-order-function.js +13 -17
- package/dataflow/fn/strict-function.d.ts +13 -0
- package/dataflow/fn/strict-function.js +285 -122
- package/dataflow/graph/call-graph.d.ts +7 -6
- package/dataflow/graph/call-graph.js +35 -46
- package/dataflow/graph/graph.d.ts +6 -1
- package/dataflow/graph/graph.js +57 -66
- package/dataflow/info.d.ts +8 -1
- package/dataflow/info.js +24 -30
- package/dataflow/internal/control-flow.d.ts +42 -4
- package/dataflow/internal/control-flow.js +76 -39
- package/dataflow/internal/linker.d.ts +15 -9
- package/dataflow/internal/linker.js +253 -241
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +80 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +441 -79
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +51 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +119 -185
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +7 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +122 -147
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +55 -25
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +290 -252
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +30 -32
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +68 -67
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +72 -126
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +10 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +8 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +12 -28
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +40 -118
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +16 -24
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +93 -102
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +173 -114
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +22 -27
- package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +34 -9
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +120 -93
- package/dataflow/internal/process/functions/call/common.d.ts +1 -3
- package/dataflow/internal/process/functions/call/common.js +36 -76
- package/dataflow/internal/process/functions/call/deferred.d.ts +6 -2
- package/dataflow/internal/process/functions/call/deferred.js +60 -58
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -2
- package/dataflow/internal/process/functions/call/known-call-handling.js +65 -68
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +3 -5
- package/dataflow/internal/process/functions/call/named-call-handling.js +44 -21
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
- package/dataflow/internal/process/functions/call/quoted.js +162 -172
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +17 -38
- package/dataflow/internal/process/functions/process-parameter.js +25 -32
- package/dataflow/internal/process/process-symbol.js +3 -6
- package/dataflow/internal/program-order.d.ts +26 -0
- package/dataflow/internal/program-order.js +49 -0
- package/documentation/doc-capabilities.js +4 -1
- package/documentation/wiki-interface.js +4 -0
- package/documentation/wiki-setup.js +23 -0
- package/engines.js +11 -3
- package/linter/linter-executor.js +19 -1
- package/linter/linter-rules.d.ts +17 -8
- package/linter/rules/absolute-path.js +63 -87
- package/linter/rules/file-path-validity.d.ts +4 -2
- package/linter/rules/file-path-validity.js +117 -80
- package/linter/rules/namespace-access.js +21 -33
- package/linter/rules/naming-convention.d.ts +1 -1
- package/linter/rules/naming-convention.js +60 -48
- package/linter/rules/network-functions.js +11 -7
- package/linter/rules/no-leaked-credentials.js +15 -18
- package/linter/rules/problematic-inputs.d.ts +2 -1
- package/linter/rules/problematic-inputs.js +39 -59
- package/linter/rules/roxygen-arguments.d.ts +9 -4
- package/linter/rules/roxygen-arguments.js +29 -48
- package/linter/rules/seeded-randomness.d.ts +7 -4
- package/linter/rules/seeded-randomness.js +130 -89
- package/linter/rules/stop-with-call-arg.d.ts +4 -2
- package/linter/rules/stop-with-call-arg.js +25 -22
- package/linter/rules/unclosed-connection.js +31 -24
- package/linter/rules/undefined-symbol.d.ts +4 -6
- package/linter/rules/undefined-symbol.js +58 -75
- package/linter/rules/unescaped-arguments.js +18 -44
- package/linter/rules/unused-definition.d.ts +6 -0
- package/linter/rules/unused-definition.js +105 -145
- package/linter/rules/unused-import.d.ts +3 -0
- package/linter/rules/unused-import.js +25 -43
- package/package.json +5 -2
- package/project/flowr-analyzer.js +6 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +8 -12
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +14 -5
- package/project/plugins/file-plugins/files/flowr-rda-file.js +35 -24
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +7 -5
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +34 -56
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +18 -42
- package/project/sigdb/decompress.js +3 -1
- package/project/sigdb/sigdb-download.js +9 -6
- package/queries/base-query-format.js +1 -2
- package/queries/catalog/absint-query/absint-query-format.js +1 -1
- package/queries/catalog/config-query/config-query-executor.js +9 -2
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +4 -7
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +50 -114
- package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +5 -9
- package/queries/catalog/dependencies-query/function-info/library-functions.js +6 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/write-functions.js +7 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +4 -4
- package/queries/catalog/input-sources-query/simple-input-classifier.js +192 -301
- package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -1
- package/r-bridge/lang-4.x/ast/model/model.js +19 -43
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -12
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
- package/r-bridge/roxygen2/roxygen-parse.js +28 -42
- package/r-bridge/shell-executor.js +2 -0
- package/r-bridge/shell.js +8 -0
- package/search/search-executor/search-enrichers.js +25 -37
- package/slicing/static/slice-call.d.ts +4 -3
- package/slicing/static/slice-call.js +56 -88
- package/slicing/static/static-slicer.js +120 -79
- package/slicing/static/visiting-queue.d.ts +4 -6
- package/slicing/static/visiting-queue.js +9 -13
- package/util/files.d.ts +6 -0
- package/util/files.js +12 -0
- package/util/parallel.js +2 -0
- package/util/proc.js +2 -1
- package/util/r-base-packages.d.ts +2 -0
- package/util/r-base-packages.js +23 -13
- package/util/secure-mode.d.ts +42 -0
- package/util/secure-mode.js +70 -0
- package/util/text/playground-link.d.ts +12 -3
- package/util/text/playground-link.js +18 -27
- package/util/version.js +4 -10
|
@@ -7,15 +7,16 @@ const function_semantics_1 = require("../../../../fn/function-semantics");
|
|
|
7
7
|
const control_flow_1 = require("../../../control-flow");
|
|
8
8
|
const common_1 = require("./common");
|
|
9
9
|
const edge_1 = require("../../../../graph/edge");
|
|
10
|
+
const logic_1 = require("../../../../../util/logic");
|
|
10
11
|
const graph_1 = require("../../../../graph/graph");
|
|
11
12
|
const unknown_side_effect_1 = require("../../../../graph/unknown-side-effect");
|
|
12
13
|
const vertex_1 = require("../../../../graph/vertex");
|
|
13
|
-
const logger_1 = require("../../../../logger");
|
|
14
14
|
const identifier_1 = require("../../../../environments/identifier");
|
|
15
15
|
const built_in_proc_name_1 = require("../../../../environments/built-in-proc-name");
|
|
16
16
|
const node_id_1 = require("../../../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
17
17
|
const r_access_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-access");
|
|
18
18
|
const r_function_definition_1 = require("../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
19
|
+
const frame_reflection_1 = require("../../../../fn/frame-reflection");
|
|
19
20
|
exports.UnnamedFunctionCallPrefix = 'unnamed-fc-';
|
|
20
21
|
/**
|
|
21
22
|
* Whether a `$`/`[[` access callee resolved a field to a stored function: a resolved dispatch (`dispatch$foo()`)
|
|
@@ -23,17 +24,8 @@ exports.UnnamedFunctionCallPrefix = 'unnamed-fc-';
|
|
|
23
24
|
* while an opaque object (`g$greet()` on an untracked `g`) only carries the base `Returns`.
|
|
24
25
|
*/
|
|
25
26
|
function accessResolvesToField(graph, accessId, accessedId) {
|
|
26
|
-
const outgoing = graph.outgoingEdges(accessId);
|
|
27
|
-
if (outgoing === undefined) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
27
|
const base = node_id_1.NodeId.normalize(accessedId);
|
|
31
|
-
|
|
32
|
-
if (node_id_1.NodeId.normalize(target) !== base && edge_1.DfEdge.includesType(edge, edge_1.EdgeType.Returns)) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
28
|
+
return (0, frame_reflection_1.edgeTargets)(graph, accessId, edge_1.EdgeType.Returns).some(target => node_id_1.NodeId.normalize(target) !== base);
|
|
37
29
|
}
|
|
38
30
|
/**
|
|
39
31
|
* Processes an unnamed function call.
|
|
@@ -45,62 +37,49 @@ function processUnnamedFunctionCall(functionCall, data) {
|
|
|
45
37
|
const functionRootId = functionCall.info.id;
|
|
46
38
|
const calledRootId = functionCall.calledFunction.info.id;
|
|
47
39
|
const functionCallName = `${exports.UnnamedFunctionCallPrefix}${functionRootId}`;
|
|
48
|
-
logger_1.dataflowLogger.debug(`Using ${functionRootId} as root for the unnamed function call`);
|
|
49
|
-
// we know that it reads the toplevel:
|
|
50
40
|
finalGraph.addEdge(functionRootId, calledRootId, edge_1.EdgeType.Reads);
|
|
51
|
-
// keep the defined function
|
|
52
41
|
finalGraph.mergeWith(calledFunction.graph);
|
|
42
|
+
/* the call is right there and fully resolved, so there is no need to force arguments */
|
|
53
43
|
const { finalEnv, callArgs, remainingReadInArgs, processedArguments } = (0, common_1.processAllArguments)({
|
|
54
44
|
functionName: calledFunction,
|
|
55
45
|
args: functionCall.arguments,
|
|
56
46
|
data,
|
|
57
47
|
finalGraph,
|
|
58
48
|
functionRootId
|
|
59
|
-
/* we know the call is right there and fully resolved, there is no need to artificially force arguments as we identify them within the subtree */
|
|
60
49
|
});
|
|
61
50
|
finalGraph.addVertex({
|
|
62
51
|
tag: vertex_1.VertexType.FunctionCall,
|
|
63
52
|
id: functionRootId,
|
|
64
53
|
environment: data.environment,
|
|
65
54
|
name: functionCallName,
|
|
66
|
-
/* can never be a direct built-in-call */
|
|
67
55
|
onlyBuiltin: false,
|
|
68
56
|
cds: data.cds,
|
|
69
|
-
args: callArgs,
|
|
57
|
+
args: callArgs,
|
|
70
58
|
origin: [built_in_proc_name_1.BuiltInProcName.Unnamed]
|
|
71
59
|
}, data.ctx.env.cleanEnv);
|
|
72
60
|
const cfgEntry = control_flow_1.ControlFlow.inSequence(finalGraph, [calledFunction, ...processedArguments], functionRootId);
|
|
73
|
-
/*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
let inIds = remainingReadInArgs;
|
|
82
|
-
inIds.push({ nodeId: functionRootId, name: functionCallName, cds: data.cds, type: identifier_1.ReferenceType.Function });
|
|
83
|
-
// if we just call a nested fdef
|
|
84
|
-
if (r_function_definition_1.RFunctionDefinition.is(functionCall.calledFunction)) {
|
|
85
|
-
function_semantics_1.FunctionSemantics.call.match.onCallAndLink(callArgs, functionCall.calledFunction.parameters, finalGraph);
|
|
61
|
+
/* what the called function forces is up to its body, just like for a named call */
|
|
62
|
+
const argumentExits = processedArguments.flatMap(a => control_flow_1.ControlFlow.promise(finalGraph, a, logic_1.Ternary.Maybe, functionRootId));
|
|
63
|
+
const called = functionCall.calledFunction;
|
|
64
|
+
if (r_function_definition_1.RFunctionDefinition.is(called)) {
|
|
65
|
+
function_semantics_1.FunctionSemantics.call.match.onCallAndLink(callArgs, called.parameters, finalGraph);
|
|
86
66
|
}
|
|
87
|
-
else if (r_access_1.RAccess.is(
|
|
88
|
-
|
|
67
|
+
else if (r_access_1.RAccess.is(called) && !accessResolvesToField(finalGraph, calledRootId, called.accessed.info.id)) {
|
|
68
|
+
/* `obj$method()` whose field did not resolve to a stored function is reached but unknown rather than dropped */
|
|
89
69
|
(0, unknown_side_effect_1.handleUnknownSideEffect)(finalGraph, data.environment, functionRootId);
|
|
90
70
|
}
|
|
91
|
-
|
|
92
|
-
inIds = inIds.concat(calledFunction.in, calledFunction.unknownReferences);
|
|
71
|
+
const fnRef = { nodeId: functionRootId, name: functionCallName, cds: data.cds, type: identifier_1.ReferenceType.Function };
|
|
93
72
|
return {
|
|
94
73
|
unknownReferences: [],
|
|
95
|
-
in:
|
|
96
|
-
|
|
74
|
+
in: [...remainingReadInArgs, fnRef, ...calledFunction.in, ...calledFunction.unknownReferences],
|
|
75
|
+
/* we do not keep the argument out as it has been linked by the function */
|
|
97
76
|
out: calledFunction.out,
|
|
98
77
|
graph: finalGraph,
|
|
99
78
|
environment: finalEnv,
|
|
100
|
-
entryPoint:
|
|
79
|
+
entryPoint: functionRootId,
|
|
101
80
|
cfgEntry: cfgEntry === functionRootId ? undefined : cfgEntry,
|
|
102
81
|
cfgExit: functionRootId,
|
|
103
|
-
exitPoints: calledFunction.exitPoints,
|
|
82
|
+
exitPoints: calledFunction.exitPoints.concat(argumentExits),
|
|
104
83
|
hooks: calledFunction.hooks,
|
|
105
84
|
};
|
|
106
85
|
}
|
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processFunctionParameter = processFunctionParameter;
|
|
4
4
|
const processor_1 = require("../../../processor");
|
|
5
|
-
const log_1 = require("../../../../util/log");
|
|
6
5
|
const identifier_1 = require("../../../environments/identifier");
|
|
7
6
|
const define_1 = require("../../../environments/define");
|
|
8
7
|
const edge_1 = require("../../../graph/edge");
|
|
9
8
|
const control_flow_1 = require("../../control-flow");
|
|
9
|
+
const logic_1 = require("../../../../util/logic");
|
|
10
10
|
const r_function_definition_1 = require("../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
11
|
+
function definedByDefault(parameter, defaultValue) {
|
|
12
|
+
if (defaultValue === undefined) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
if (r_function_definition_1.RFunctionDefinition.is(parameter.defaultValue)) {
|
|
16
|
+
return [parameter.defaultValue.info.id];
|
|
17
|
+
}
|
|
18
|
+
return defaultValue.in.concat(defaultValue.unknownReferences).map(r => r.nodeId);
|
|
19
|
+
}
|
|
11
20
|
/**
|
|
12
21
|
* The dataflow of one function parameter: its name becomes a definition in the function's frame, and its
|
|
13
22
|
* default value, if it has one, is processed in the same frame so it may read the parameters before it.
|
|
@@ -16,52 +25,36 @@ const r_function_definition_1 = require("../../../../r-bridge/lang-4.x/ast/model
|
|
|
16
25
|
*/
|
|
17
26
|
function processFunctionParameter(parameter, data) {
|
|
18
27
|
const name = (0, processor_1.processDataflowFor)(parameter.name, data);
|
|
19
|
-
|
|
28
|
+
/* a default is a promise the parameter holds, forced where the parameter is first used */
|
|
29
|
+
const defaultValue = parameter.defaultValue === undefined ? undefined : (0, processor_1.processDataflowFor)(parameter.defaultValue, control_flow_1.ControlFlow.withinPromise(data, parameter.name.info.id));
|
|
20
30
|
const graph = defaultValue === undefined ? name.graph : name.graph.mergeWith(defaultValue.graph);
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
type: identifier_1.ReferenceType.Parameter,
|
|
24
|
-
definedAt: parameter.info.id
|
|
25
|
-
}));
|
|
26
|
-
// keep the default's environment so its escaping (`<<-`) writes are carried on
|
|
31
|
+
const definedBy = definedByDefault(parameter, defaultValue);
|
|
32
|
+
/* keep the default's environment so its escaping (`<<-`) writes are carried on */
|
|
27
33
|
let environment = defaultValue?.environment ?? name.environment;
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (r_function_definition_1.RFunctionDefinition.is(parameter.defaultValue)) {
|
|
35
|
-
graph.addEdge(wid, parameter.defaultValue.info.id, edge_1.EdgeType.DefinedBy);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
const definedBy = defaultValue.in.concat(defaultValue.unknownReferences);
|
|
39
|
-
for (const node of definedBy) {
|
|
40
|
-
graph.addEdge(wid, node.nodeId, edge_1.EdgeType.DefinedBy);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
34
|
+
for (const reference of name.unknownReferences) {
|
|
35
|
+
const written = { ...reference, type: identifier_1.ReferenceType.Parameter, definedAt: parameter.info.id };
|
|
36
|
+
graph.setDefinitionOfVertex(written, defaultValue === undefined ? [] : [defaultValue.entryPoint]);
|
|
37
|
+
environment = (0, define_1.define)(written, false, environment);
|
|
38
|
+
for (const node of definedBy) {
|
|
39
|
+
graph.addEdge(written.nodeId, node, edge_1.EdgeType.DefinedBy);
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
42
|
const boundAt = name.entryPoint;
|
|
46
43
|
if (defaultValue !== undefined) {
|
|
47
44
|
control_flow_1.ControlFlow.continuesWith(graph, defaultValue, boundAt);
|
|
48
|
-
for (const exit of defaultValue.exitPoints) {
|
|
49
|
-
/* R only forces a default when the parameter is used, so a jump within one does not cut the binding */
|
|
50
|
-
if (exit.type !== 0 /* ExitPointType.Default */) {
|
|
51
|
-
graph.addEdge(exit.nodeId, boundAt, edge_1.EdgeType.FlowEdge);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
45
|
}
|
|
46
|
+
/* R only forces a default when the parameter is used, so a jump within one does not cut the binding */
|
|
47
|
+
const defaultExits = control_flow_1.ControlFlow.promise(graph, defaultValue, logic_1.Ternary.Maybe, boundAt);
|
|
55
48
|
return {
|
|
56
49
|
unknownReferences: [],
|
|
57
50
|
in: defaultValue === undefined ? [] : defaultValue.in.concat(defaultValue.unknownReferences, name.in),
|
|
58
51
|
out: (defaultValue?.out ?? []).concat(name.out, name.unknownReferences),
|
|
59
|
-
graph
|
|
60
|
-
environment
|
|
52
|
+
graph,
|
|
53
|
+
environment,
|
|
61
54
|
entryPoint: parameter.info.id,
|
|
62
55
|
cfgEntry: defaultValue === undefined ? boundAt : control_flow_1.ControlFlow.entryOf(defaultValue),
|
|
63
56
|
cfgExit: boundAt,
|
|
64
|
-
exitPoints: [{ nodeId: parameter.info.id, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
57
|
+
exitPoints: [...defaultExits, { nodeId: parameter.info.id, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
65
58
|
hooks: []
|
|
66
59
|
};
|
|
67
60
|
}
|
|
@@ -17,11 +17,8 @@ function processSymbol(symbol, data) {
|
|
|
17
17
|
return (0, process_value_1.processValue)(symbol, data);
|
|
18
18
|
}
|
|
19
19
|
const sid = symbol.info.id;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
unknownReferences: identifier_1.Identifier.getName(symbol.content) === '.Options'
|
|
23
|
-
? [read, ...(0, built_in_ambient_state_1.readsOfOptionsVariable)(symbol, data)]
|
|
24
|
-
: [read],
|
|
20
|
+
return (0, built_in_ambient_state_1.ambientAccessOfSymbol)({
|
|
21
|
+
unknownReferences: [{ nodeId: sid, name: symbol.content, cds: data.cds, type: identifier_1.ReferenceType.Unknown }],
|
|
25
22
|
in: [],
|
|
26
23
|
out: [],
|
|
27
24
|
environment: data.environment,
|
|
@@ -33,6 +30,6 @@ function processSymbol(symbol, data) {
|
|
|
33
30
|
entryPoint: sid,
|
|
34
31
|
exitPoints: [{ nodeId: sid, type: 0 /* ExitPointType.Default */, cds: data.cds }],
|
|
35
32
|
hooks: []
|
|
36
|
-
};
|
|
33
|
+
}, symbol, data);
|
|
37
34
|
}
|
|
38
35
|
//# sourceMappingURL=process-symbol.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
2
|
+
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
3
|
+
import { RNode } from '../../r-bridge/lang-4.x/ast/model/model';
|
|
4
|
+
import type { DataflowGraph } from '../graph/graph';
|
|
5
|
+
/**
|
|
6
|
+
* Program order of top-level code outside loops and quotes: it runs once, so its definitions are not there yet for the statements before.
|
|
7
|
+
* @helper dataflow
|
|
8
|
+
* @example
|
|
9
|
+
* ```r
|
|
10
|
+
* f <- function() y
|
|
11
|
+
* f() # runs once, before `y` is defined below
|
|
12
|
+
* y <- 1
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const ProgramOrder: {
|
|
16
|
+
readonly name: "ProgramOrder";
|
|
17
|
+
/** The top-level statement holding `id` if the program runs it once, in program order, `undefined` otherwise. */
|
|
18
|
+
readonly runsOnceAt: (this: void, id: NodeId, graph: DataflowGraph) => RNode<ParentInformation> | undefined;
|
|
19
|
+
/** How many top-level statements of the same file after `statement` the top-level definition at `definition` is made, `0` for any other. */
|
|
20
|
+
readonly offset: (this: void, definition: NodeId, statement: RNode<ParentInformation> | undefined, graph: DataflowGraph) => number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the definition at `definition` is made only after `statement` ran: it sits in a later top-level statement,
|
|
23
|
+
* which holds a nested one too, as the function it is nested in does not exist before.
|
|
24
|
+
*/
|
|
25
|
+
readonly definedLater: (this: void, definition: NodeId, statement: RNode<ParentInformation> | undefined, graph: DataflowGraph) => boolean;
|
|
26
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgramOrder = void 0;
|
|
4
|
+
const model_1 = require("../../r-bridge/lang-4.x/ast/model/model");
|
|
5
|
+
const info_1 = require("../info");
|
|
6
|
+
/**
|
|
7
|
+
* Program order of top-level code outside loops and quotes: it runs once, so its definitions are not there yet for the statements before.
|
|
8
|
+
* @helper dataflow
|
|
9
|
+
* @example
|
|
10
|
+
* ```r
|
|
11
|
+
* f <- function() y
|
|
12
|
+
* f() # runs once, before `y` is defined below
|
|
13
|
+
* y <- 1
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
exports.ProgramOrder = {
|
|
17
|
+
name: 'ProgramOrder',
|
|
18
|
+
/** The top-level statement holding `id` if the program runs it once, in program order, `undefined` otherwise. */
|
|
19
|
+
runsOnceAt(id, graph) {
|
|
20
|
+
const idMap = graph.idMap;
|
|
21
|
+
const node = idMap?.get(id);
|
|
22
|
+
if (idMap === undefined || node === undefined || !graph.isRoot(id)
|
|
23
|
+
|| graph.getVertex(id)?.cds?.some(cd => info_1.ControlDependency.isIterated(cd, idMap)) || graph.isQuoted(id)) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return model_1.RNode.topLevelStatement(node, idMap);
|
|
27
|
+
},
|
|
28
|
+
/** How many top-level statements of the same file after `statement` the top-level definition at `definition` is made, `0` for any other. */
|
|
29
|
+
offset(definition, statement, graph) {
|
|
30
|
+
return graph.isRoot(definition) ? statementsAfter(definition, statement, graph) : 0;
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Whether the definition at `definition` is made only after `statement` ran: it sits in a later top-level statement,
|
|
34
|
+
* which holds a nested one too, as the function it is nested in does not exist before.
|
|
35
|
+
*/
|
|
36
|
+
definedLater(definition, statement, graph) {
|
|
37
|
+
return statementsAfter(definition, statement, graph) > 0;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function statementsAfter(id, statement, graph) {
|
|
41
|
+
const idMap = graph.idMap;
|
|
42
|
+
const node = idMap?.get(id);
|
|
43
|
+
if (idMap === undefined || statement === undefined || node === undefined) {
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
const other = model_1.RNode.topLevelStatement(node, idMap);
|
|
47
|
+
return other.info.parent === statement.info.parent ? other.info.index - statement.info.index : 0;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=program-order.js.map
|
|
@@ -285,7 +285,10 @@ function obtainDetailedInfos() {
|
|
|
285
285
|
foundAny = true;
|
|
286
286
|
const base = JSON.parse(fs_1.default.readFileSync(file).toString());
|
|
287
287
|
for (const [key, values] of base) {
|
|
288
|
-
out.get(key)
|
|
288
|
+
const target = out.get(key);
|
|
289
|
+
for (const v of values) {
|
|
290
|
+
target.push({ ...v, capabilities: new Set(v.capabilities), context: new Set(v.context) });
|
|
291
|
+
}
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
294
|
return foundAny ? out : undefined;
|
|
@@ -216,6 +216,10 @@ function explainConfigFile(ctx) {
|
|
|
216
216
|
When running _flowR_, you may want to specify some behaviors with a dedicated configuration file.
|
|
217
217
|
By default, flowR looks for a file named \`${flowr_main_options_1.defaultConfigFile}\` in the current working directory (or any higher directory).
|
|
218
218
|
You can also specify a different file with ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'config-file')} or pass the configuration inline using ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'config-json')}.
|
|
219
|
+
A \`${flowr_main_options_1.defaultConfigFile}\` found this way belongs to the analyzed project, so flowR ignores its options that decide what flowR executes or loads
|
|
220
|
+
(${config_1.FlowrConfig.securitySensitivePaths().filter(p => p[0] !== 'specializeConfig').map(p => `\`${p.join('.')}\``).join(', ')}),
|
|
221
|
+
unless you pass ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'trust-config')}.
|
|
222
|
+
To analyze code you do not trust, use the secure mode (${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'secure')}, see the [security policy](https://github.com/flowr-analysis/flowr/blob/main/.github/SECURITY.md)).
|
|
219
223
|
To inspect the current configuration, you can run flowr with the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'verbose')} flag, or use the \`config\` ${ctx.linkPage('wiki/Query API', 'Query')}.
|
|
220
224
|
Within the REPL this works by running the following:
|
|
221
225
|
|
|
@@ -19,6 +19,7 @@ Want to try it without installing anything? Run code straight away in the ${(0,
|
|
|
19
19
|
Otherwise, you can download and build it from source, download the accompanying ${ctx.linkPage('flowr:docker', 'docker image')},
|
|
20
20
|
or use its ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')} and ${ctx.linkPage('flowr:rstudio-addin', 'RStudio Addin')}.
|
|
21
21
|
|
|
22
|
+
- [🌐 Using the Playground](#-using-the-playground)
|
|
22
23
|
- [🗒️ Using the Visual Studio Code Extension](#-using-the-visual-studio-code-extension)
|
|
23
24
|
- [🗒️ Using the RStudio Addin](#-using-the-rstudio-addin)
|
|
24
25
|
- [🐳️ Using the Docker Image](#-using-the-docker-image)
|
|
@@ -29,6 +30,17 @@ or use its ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')} and $
|
|
|
29
30
|
If you want to develop for _flowR_, you want to see how to [build from scratch](#-building-from-scratch) and have a
|
|
30
31
|
look at the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}.github/CONTRIBUTING.md).
|
|
31
32
|
|
|
33
|
+
## 🌐 Using the Playground
|
|
34
|
+
|
|
35
|
+
The ${(0, doc_playground_1.linkToPlayground)('Playground', {})} runs _flowR_ in your browser and updates the dependencies, lints, and slice while you type.
|
|
36
|
+
It can also execute the script with [webR](https://docs.r-wasm.org/webr/latest/).
|
|
37
|
+
Press Run (or <kbd>Ctrl</kbd>+<kbd>Enter</kbd>) to evaluate the script in a fresh workspace.
|
|
38
|
+
The first run downloads R (about 30 MB), and packages loaded with \`library()\`, \`require()\`, or \`pkg::\` are installed when needed.
|
|
39
|
+
In the repl, lines starting with \`:\` are _flowR_ commands (see \`:help\`), all other lines are evaluated as R in the same session.
|
|
40
|
+
webR is downloaded from its CDN, and the page checks every file against the pinned webR release, whose npm signature and checksum the build verifies. A file that does not match is refused and R does not run.
|
|
41
|
+
R runs inside the browser with its own in-memory file system and cannot call \`system()\`.
|
|
42
|
+
Shared links contain the script and the _flowR_ commands only, never R input for the repl.
|
|
43
|
+
|
|
32
44
|
## 🗒️ Using the Visual Studio Code Extension
|
|
33
45
|
|
|
34
46
|
The easiest way to use _flowR_ is to install the ${ctx.linkPage('flowr:vscode', 'Visual Studio Code extension')}.
|
|
@@ -115,6 +127,17 @@ For details on _how_ to contribute, please refer to the [CONTRIBUTING.md](${doc_
|
|
|
115
127
|
|
|
116
128
|
_flowR_ knows the exported functions of thousands of R packages, resolving \`library(pkg)\`/\`pkg::fn\` calls from a downloaded signature database (\`flowr-sigdb\`); no shards are committed (only the \`sigdb.remote.json\` pointer), everything else is fetched on demand. Search it live at [flowr-analysis.github.io/flowr/wiki/sigdb](${doc_files_1.FlowrSiteBaseRef}/wiki/sigdb/), try _flowR_ itself in the ${(0, doc_playground_1.linkToPlayground)('Playground', {})} without installing anything, or see the ${ctx.linkPage('wiki/Signature Database')} page for how the database works.
|
|
117
129
|
|
|
130
|
+
### 🌐 Working on the Playground
|
|
131
|
+
|
|
132
|
+
The playground lives in \`scripts/playground/\`. Its bundle is not committed, the documentation job builds it for GitHub Pages.
|
|
133
|
+
To build and serve it locally:
|
|
134
|
+
|
|
135
|
+
\`\`\`shell
|
|
136
|
+
npm run preview:playground
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
139
|
+
Then open [localhost:8000/playground/](http://localhost:8000/playground/).
|
|
140
|
+
|
|
118
141
|
### 📦 Using _flowR_ as a Dependency in Another Project
|
|
119
142
|
|
|
120
143
|
_flowR_ is published as \`@eagleoutice/flowr\`, but you may want an unreleased branch or a local build instead. Plain \`npm install /path/to/flowr\` (or \`npm link\`) looks like it works, but skips resolving _flowR_'s own dependencies, so the bundled WASM parser fails at runtime with an \`ENOENT\` on \`tree-sitter.wasm\`. Package a tarball instead, which installs like any normal package:
|
package/engines.js
CHANGED
|
@@ -6,13 +6,18 @@ const shell_1 = require("./r-bridge/shell");
|
|
|
6
6
|
const ansi_1 = require("./util/text/ansi");
|
|
7
7
|
const tree_sitter_executor_1 = require("./r-bridge/lang-4.x/tree-sitter/tree-sitter-executor");
|
|
8
8
|
const log_1 = require("./util/log");
|
|
9
|
+
const secure_mode_1 = require("./util/secure-mode");
|
|
9
10
|
/**
|
|
10
11
|
* Retrieve all requested engine instance.
|
|
11
12
|
* Please make sure that if this includes the R engine, that you properly shut it down again!
|
|
12
13
|
*/
|
|
13
14
|
async function retrieveEngineInstances(config, defaultOnly = false) {
|
|
14
15
|
const engines = {};
|
|
15
|
-
|
|
16
|
+
const rShellWanted = config_1.FlowrConfig.getForEngine(config, 'r-shell') && (!defaultOnly || config.defaultEngine === 'r-shell');
|
|
17
|
+
if (rShellWanted && secure_mode_1.SecureMode.isEnabled()) {
|
|
18
|
+
log_1.log.warn('The secure mode forbids starting R, so the r-shell engine is not available');
|
|
19
|
+
}
|
|
20
|
+
else if (rShellWanted) {
|
|
16
21
|
// we keep an active shell session to allow other parse investigations :)
|
|
17
22
|
engines['r-shell'] = new shell_1.RShell(config_1.FlowrConfig.getForEngine(config, 'r-shell'), {
|
|
18
23
|
revive: 2 /* RShellReviveOptions.Always */,
|
|
@@ -23,8 +28,11 @@ async function retrieveEngineInstances(config, defaultOnly = false) {
|
|
|
23
28
|
}
|
|
24
29
|
});
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
// in secure mode, tree-sitter is the only engine, so we start it whenever r-shell was refused
|
|
32
|
+
const treeSitterForced = secure_mode_1.SecureMode.isEnabled() && rShellWanted;
|
|
33
|
+
const treeSitter = config_1.FlowrConfig.getForEngine(config, 'tree-sitter') ?? (treeSitterForced ? { type: 'tree-sitter' } : undefined);
|
|
34
|
+
if (treeSitter && (!defaultOnly || config.defaultEngine === 'tree-sitter' || treeSitterForced)) {
|
|
35
|
+
await tree_sitter_executor_1.TreeSitterExecutor.initTreeSitter(treeSitter);
|
|
28
36
|
engines['tree-sitter'] = new tree_sitter_executor_1.TreeSitterExecutor();
|
|
29
37
|
}
|
|
30
38
|
let defaultEngine = config.defaultEngine;
|
|
@@ -4,13 +4,31 @@ exports.executeLintingRule = executeLintingRule;
|
|
|
4
4
|
const linter_rules_1 = require("./linter-rules");
|
|
5
5
|
const flowr_search_executor_1 = require("../search/flowr-search-executor");
|
|
6
6
|
const objects_1 = require("../util/objects");
|
|
7
|
+
const secure_mode_1 = require("../util/secure-mode");
|
|
8
|
+
/**
|
|
9
|
+
* Rule options that are compiled to regular expressions. As a crafted regex can take exponential time to match (ReDoS),
|
|
10
|
+
* the {@link SecureMode} ignores them in a given rule config, keeping the rule's defaults. Add every new option of this kind.
|
|
11
|
+
*/
|
|
12
|
+
const RegexRuleOptions = {
|
|
13
|
+
'absolute-file-paths': ['absolutePathRegex'],
|
|
14
|
+
'problematic-inputs': ['consider', 'pipeCommandFunctions'],
|
|
15
|
+
'no-leaked-credentials': ['credentialNamePattern', 'credentialValuePattern']
|
|
16
|
+
};
|
|
17
|
+
/** The given rule config without the {@link RegexRuleOptions} if the secure mode is enabled. */
|
|
18
|
+
function withoutUntrustedRegexes(ruleName, config) {
|
|
19
|
+
const keys = RegexRuleOptions[ruleName];
|
|
20
|
+
if (!config || !keys || !secure_mode_1.SecureMode.isEnabled()) {
|
|
21
|
+
return config;
|
|
22
|
+
}
|
|
23
|
+
return Object.fromEntries(Object.entries(config).filter(([k]) => !keys.includes(k)));
|
|
24
|
+
}
|
|
7
25
|
/**
|
|
8
26
|
* Executes a specific linting rule on the given analysis provider input.
|
|
9
27
|
*/
|
|
10
28
|
async function executeLintingRule(ruleName, input, lintingRuleConfig) {
|
|
11
29
|
try {
|
|
12
30
|
const rule = linter_rules_1.LintingRules[ruleName];
|
|
13
|
-
const fullConfig = (0, objects_1.deepMergeObject)(rule.info.defaultConfig(input.inspectContext()), lintingRuleConfig);
|
|
31
|
+
const fullConfig = (0, objects_1.deepMergeObject)(rule.info.defaultConfig(input.inspectContext()), withoutUntrustedRegexes(ruleName, lintingRuleConfig));
|
|
14
32
|
const ruleSearch = rule.createSearch(fullConfig, input);
|
|
15
33
|
const searchStart = Date.now();
|
|
16
34
|
const searchResult = await (0, flowr_search_executor_1.runSearch)(ruleSearch, input);
|
package/linter/linter-rules.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare const LintingRules: {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
readonly 'seeded-randomness': {
|
|
55
|
-
readonly createSearch: (config: import("./rules/seeded-randomness").SeededRandomnessConfig
|
|
55
|
+
readonly createSearch: (config: import("./rules/seeded-randomness").SeededRandomnessConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with", "filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
|
|
56
56
|
readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/seeded-randomness").SeededRandomnessConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
|
|
57
57
|
results: {
|
|
58
58
|
involvedId: import("..").NodeId;
|
|
@@ -64,10 +64,13 @@ export declare const LintingRules: {
|
|
|
64
64
|
}>;
|
|
65
65
|
readonly info: {
|
|
66
66
|
readonly defaultConfig: (ctx: import("../project/context/flowr-analyzer-context").ReadOnlyFlowrAnalyzerContext) => {
|
|
67
|
-
randomnessProducers: {
|
|
68
|
-
type: "function"
|
|
67
|
+
randomnessProducers: ({
|
|
68
|
+
readonly type: "function";
|
|
69
|
+
readonly name: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: "assignment";
|
|
69
72
|
name: string;
|
|
70
|
-
}[];
|
|
73
|
+
})[];
|
|
71
74
|
randomnessConsumers: string[];
|
|
72
75
|
};
|
|
73
76
|
readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Reproducibility];
|
|
@@ -129,7 +132,7 @@ export declare const LintingRules: {
|
|
|
129
132
|
};
|
|
130
133
|
};
|
|
131
134
|
readonly 'naming-convention': {
|
|
132
|
-
readonly createSearch: (
|
|
135
|
+
readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
|
|
133
136
|
readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/naming-convention").NamingConventionConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
|
|
134
137
|
results: import("./rules/naming-convention").NamingConventionResult[];
|
|
135
138
|
'.meta': {
|
|
@@ -258,7 +261,7 @@ export declare const LintingRules: {
|
|
|
258
261
|
};
|
|
259
262
|
};
|
|
260
263
|
readonly 'stop-call': {
|
|
261
|
-
readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"
|
|
264
|
+
readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
|
|
262
265
|
readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, _config: import("../util/objects").MergeableRecord, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
|
|
263
266
|
results: import("ts-essentials").Writable<import("./rules/stop-with-call-arg").StopWithCallResult>[];
|
|
264
267
|
'.meta': import("./rules/stop-with-call-arg").StopWithCallMetadata;
|
|
@@ -277,8 +280,14 @@ export declare const LintingRules: {
|
|
|
277
280
|
};
|
|
278
281
|
readonly 'roxygen-arguments': {
|
|
279
282
|
readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
|
|
280
|
-
readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]
|
|
281
|
-
results:
|
|
283
|
+
readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>) => {
|
|
284
|
+
results: {
|
|
285
|
+
certainty: import("./linter-format").LintingResultCertainty.Uncertain;
|
|
286
|
+
involvedId: import("..").NodeId;
|
|
287
|
+
loc: [startLine: number, startColumn: number, endLine: number, endColumn: number, f?: string | undefined];
|
|
288
|
+
underDocumented: string[];
|
|
289
|
+
overDocumented: string[];
|
|
290
|
+
}[];
|
|
282
291
|
'.meta': {};
|
|
283
292
|
};
|
|
284
293
|
readonly prettyPrint: {
|