@eagleoutice/flowr 2.13.4 → 2.13.6

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.
Files changed (133) hide show
  1. package/README.md +29 -29
  2. package/cli/repl/core.js +10 -2
  3. package/config.d.ts +4 -1
  4. package/config.js +10 -1
  5. package/control-flow/cfg-dead-code.js +19 -4
  6. package/control-flow/extract-cfg.js +12 -4
  7. package/dataflow/environments/built-in-config.d.ts +6 -3
  8. package/dataflow/environments/built-in-eval-name.d.ts +20 -0
  9. package/dataflow/environments/built-in-eval-name.js +25 -0
  10. package/dataflow/environments/built-in-props.d.ts +175 -0
  11. package/dataflow/environments/built-in-props.js +207 -0
  12. package/dataflow/environments/built-in.d.ts +26 -22
  13. package/dataflow/environments/built-in.js +37 -10
  14. package/dataflow/environments/default-builtin-config.d.ts +1068 -95
  15. package/dataflow/environments/default-builtin-config.js +549 -216
  16. package/dataflow/environments/identifier.d.ts +24 -1
  17. package/dataflow/environments/identifier.js +24 -2
  18. package/dataflow/environments/query-fn-props.d.ts +102 -0
  19. package/dataflow/environments/query-fn-props.js +188 -0
  20. package/dataflow/eval/resolve/alias-tracking.d.ts +6 -5
  21. package/dataflow/eval/resolve/alias-tracking.js +45 -12
  22. package/dataflow/eval/resolve/match-arguments.d.ts +15 -0
  23. package/dataflow/eval/resolve/match-arguments.js +77 -0
  24. package/dataflow/eval/resolve/resolve-numbers.d.ts +202 -0
  25. package/dataflow/eval/resolve/resolve-numbers.js +163 -0
  26. package/dataflow/eval/resolve/resolve-operators.d.ts +60 -0
  27. package/dataflow/eval/resolve/resolve-operators.js +115 -0
  28. package/dataflow/eval/resolve/resolve-strings.d.ts +98 -0
  29. package/dataflow/eval/resolve/resolve-strings.js +116 -0
  30. package/dataflow/eval/resolve/resolve.d.ts +5 -37
  31. package/dataflow/eval/resolve/resolve.js +56 -134
  32. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +1 -1
  33. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +5 -4
  34. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +1 -4
  35. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +1 -1
  36. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -1
  37. package/dataflow/internal/process/functions/call/known-call-handling.js +2 -1
  38. package/documentation/data/faq/faqs.js +11 -0
  39. package/documentation/doc-util/doc-types.js +1 -1
  40. package/documentation/wiki-analyzer.js +75 -0
  41. package/documentation/wiki-core.js +81 -16
  42. package/documentation/wiki-interface.js +3 -0
  43. package/linter/linter-rules.d.ts +10 -11
  44. package/linter/rules/deprecated-functions.js +5 -3
  45. package/linter/rules/function-finder-util.d.ts +2 -2
  46. package/linter/rules/function-finder-util.js +10 -3
  47. package/linter/rules/network-functions.d.ts +25 -5
  48. package/linter/rules/network-functions.js +51 -11
  49. package/linter/rules/problematic-inputs.d.ts +1 -1
  50. package/linter/rules/problematic-inputs.js +7 -1
  51. package/linter/rules/seeded-randomness.d.ts +5 -8
  52. package/linter/rules/seeded-randomness.js +18 -10
  53. package/linter/rules/unused-definition.js +29 -17
  54. package/package.json +4 -2
  55. package/project/cache/flowr-analyzer-cache.d.ts +4 -3
  56. package/project/cache/flowr-analyzer-cache.js +32 -13
  57. package/project/cache/flowr-cache.d.ts +39 -12
  58. package/project/cache/flowr-cache.js +5 -3
  59. package/project/context/flowr-analyzer-context.d.ts +8 -1
  60. package/project/context/flowr-analyzer-context.js +11 -1
  61. package/project/context/flowr-analyzer-dependencies-context.d.ts +8 -2
  62. package/project/context/flowr-analyzer-dependencies-context.js +43 -11
  63. package/project/context/flowr-analyzer-files-context.d.ts +8 -4
  64. package/project/context/flowr-analyzer-files-context.js +20 -1
  65. package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +33 -0
  66. package/project/context/flowr-analyzer-incremental-analysis-context.js +63 -0
  67. package/project/context/flowr-analyzer-meta-context.d.ts +3 -1
  68. package/project/context/flowr-analyzer-meta-context.js +14 -0
  69. package/project/context/flowr-file.d.ts +25 -3
  70. package/project/context/flowr-file.js +24 -2
  71. package/project/dependency-version-space.d.ts +37 -0
  72. package/project/dependency-version-space.js +118 -26
  73. package/project/flowr-analyzer.d.ts +6 -0
  74. package/project/flowr-analyzer.js +6 -2
  75. package/project/incremental/incremental-parse/edit-computation.d.ts +7 -0
  76. package/project/incremental/incremental-parse/edit-computation.js +61 -0
  77. package/project/incremental/incremental-parse/incremental-parse.d.ts +12 -0
  78. package/project/incremental/incremental-parse/incremental-parse.js +37 -0
  79. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +1 -1
  80. package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +57 -0
  81. package/project/plugins/file-plugins/files/flowr-manifest-files.js +121 -0
  82. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -2
  83. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
  84. package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +1 -1
  85. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +33 -0
  86. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +53 -0
  87. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +1 -1
  88. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -3
  89. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.d.ts +27 -0
  90. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +47 -0
  91. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +7 -0
  92. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +31 -3
  93. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +10 -4
  94. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +17 -4
  95. package/project/plugins/plugin-registry.d.ts +4 -4
  96. package/project/plugins/plugin-registry.js +7 -4
  97. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +4 -4
  98. package/project/sigdb/reader.d.ts +7 -0
  99. package/project/sigdb/reader.js +12 -0
  100. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +10 -0
  101. package/queries/catalog/dependencies-query/function-info/derived-functions.js +41 -0
  102. package/queries/catalog/dependencies-query/function-info/read-functions.js +13 -12
  103. package/queries/catalog/dependencies-query/function-info/write-functions.js +16 -23
  104. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +33 -3
  105. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +31 -0
  106. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +9 -2
  107. package/queries/catalog/input-sources-query/input-source-functions.d.ts +8 -10
  108. package/queries/catalog/input-sources-query/input-source-functions.js +23 -388
  109. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -0
  110. package/queries/catalog/input-sources-query/input-sources-query-format.js +27 -10
  111. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -1
  112. package/queries/catalog/signature-query/signature-query-executor.js +79 -3
  113. package/queries/catalog/signature-query/signature-query-format.d.ts +27 -0
  114. package/queries/catalog/signature-query/signature-query-render.js +21 -3
  115. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +6 -2
  116. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +21 -2
  117. package/r-bridge/parser.d.ts +11 -1
  118. package/r-bridge/parser.js +7 -4
  119. package/r-bridge/shell-executor.d.ts +1 -0
  120. package/r-bridge/shell-executor.js +1 -0
  121. package/r-bridge/shell.d.ts +1 -0
  122. package/r-bridge/shell.js +1 -0
  123. package/search/flowr-search-filters.d.ts +1 -6
  124. package/search/flowr-search-filters.js +1 -8
  125. package/search/search-executor/search-enrichers.d.ts +2 -0
  126. package/search/search-executor/search-enrichers.js +29 -12
  127. package/util/version.js +1 -1
  128. package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +0 -31
  129. package/project/plugins/file-plugins/files/flowr-rproject-file.js +0 -66
  130. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +0 -22
  131. package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +0 -36
  132. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +0 -13
  133. package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +0 -32
@@ -28,7 +28,11 @@ const flowr_analyzer_plugin_1 = require("../project/plugins/flowr-analyzer-plugi
28
28
  const flowr_analyzer_environment_context_1 = require("../project/context/flowr-analyzer-environment-context");
29
29
  const flowr_analyzer_functions_context_1 = require("../project/context/flowr-analyzer-functions-context");
30
30
  const flowr_analyzer_meta_context_1 = require("../project/context/flowr-analyzer-meta-context");
31
+ const flowr_analyzer_incremental_analysis_context_1 = require("../project/context/flowr-analyzer-incremental-analysis-context");
32
+ const flowr_analyzer_gas_context_1 = require("../project/context/flowr-analyzer-gas-context");
33
+ const flowr_analyzer_gas_plugin_1 = require("../project/plugins/gas-plugins/flowr-analyzer-gas-plugin");
31
34
  const config_1 = require("../config");
35
+ const flowr_file_1 = require("../project/context/flowr-file");
32
36
  async function analyzerQuickExample() {
33
37
  const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
34
38
  .setEngine('tree-sitter')
@@ -84,6 +88,8 @@ ${(0, doc_structure_1.collapsibleToc)({
84
88
  'Dependencies Context': undefined,
85
89
  'Environment Context': undefined,
86
90
  'Meta Context': undefined,
91
+ 'Gas Context': undefined,
92
+ 'Incremental Analysis Context': undefined,
87
93
  },
88
94
  'Caching': undefined
89
95
  })}
@@ -441,6 +447,75 @@ ${ctx.linkM(flowr_analyzer_meta_context_1.FlowrAnalyzerMetaContext, 'getProjectV
441
447
  and the project namespace via
442
448
  ${ctx.linkM(flowr_analyzer_meta_context_1.FlowrAnalyzerMetaContext, 'getNamespace', { codeFont: true, realNameWrapper: 'i' })}.
443
449
 
450
+ ${(0, doc_structure_1.section)('Gas Context', 3)}
451
+
452
+ The ${ctx.link(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext)} (reachable as \`ctx.gas\`) acts as the resource guard of an analysis:
453
+
454
+ ${ctx.hierarchy(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext, { showImplSnippet: false })}
455
+
456
+ Expensive analysis sites ask for the current resource pressure with
457
+ ${ctx.linkM(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext, 'checkGas', { codeFont: true, realNameWrapper: 'i' })}, passing the name of the feature they are about to run
458
+ (see ${ctx.link('GasFeatureKey')}), and may then degrade or skip their work.
459
+ The level combines the current heap usage and the time elapsed since the analysis started (or since the last
460
+ ${ctx.linkM(flowr_analyzer_context_1.FlowrAnalyzerContext, 'reset')}, which also resets the gas clock via
461
+ ${ctx.linkM(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext, 'reset', { codeFont: true, realNameWrapper: 'i' })}),
462
+ each scaled by the per-feature factor from \`config.gas.features\`.
463
+ Registered ${ctx.link(flowr_analyzer_gas_plugin_1.FlowrAnalyzerGasPlugin)}s may escalate the level for any key.
464
+
465
+ ${(0, doc_structure_1.block)({
466
+ type: 'NOTE',
467
+ content: `
468
+ Gas is disabled for every feature by default, and with no gas plugins registered
469
+ ${ctx.linkM(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext, 'checkGas', { codeFont: true, realNameWrapper: 'i' })} returns \`GasLevel.Normal\` without measuring anything.
470
+ See the ${ctx.linkPage('wiki/Core', 'gas section of the Core wiki page', 'gas-resource-guard')} for the levels, the configuration, and how to write a gas plugin.
471
+ `.trim()
472
+ })}
473
+
474
+ ${(0, doc_structure_1.section)('Incremental Analysis Context', 3)}
475
+
476
+ The ${ctx.link(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext)} is a context that stores analysis information needed for making the next analysis run incremental by reusing the previous analysis results:
477
+
478
+ ${ctx.hierarchy(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, { showImplSnippet: false })}
479
+
480
+ This context is not an analysis-result cache by itself.
481
+ Instead, it carries forward the minimal state needed by future incremental phases after an invalidation happened.
482
+ At the moment, it is used for incremental parsing with Tree-sitter, but it is intended to become the shared context for additional incremental analysis stages as well.
483
+
484
+ If the analyzer or context is reset, the incremental information is discarded via
485
+ ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'reset', { codeFont: true, realNameWrapper: 'i' })}.
486
+ In other words, this context only transports incremental handoff state between analysis runs.
487
+
488
+ ${(0, doc_structure_1.section)('Incremental Parsing', 4)}
489
+
490
+ This context is used to exploit Tree-sitter's incremental parsing feature.
491
+ For one file, the incremental state follows a fixed lifecycle:
492
+
493
+ 1. After a successful parse-oriented analysis run, the analyzer cache stores the latest Tree-sitter parse tree via
494
+ ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'storeOldParseResults', { codeFont: true, realNameWrapper: 'i' })}.
495
+ This tree is the baseline for the next incremental parse of that file.
496
+ 2. When a mutable file provider such as ${ctx.link('FlowrInlineTextFile')} is invalidated via
497
+ ${ctx.linkM(flowr_file_1.FlowrInlineTextFile, 'invalidate', { codeFont: true, realNameWrapper: 'i' })},
498
+ the analyzer receives a file invalidation event and stores the file path together with the old source text.
499
+ If the same file is invalidated again before the next parse, this stored old text is intentionally **not** replaced:
500
+ the stored parse tree still belongs to the version from before the first invalidation, so the incremental parse must keep that matching old-content baseline.
501
+ 3. When parsing is requested again, flowR retrieves
502
+ * the previous parse tree from
503
+ ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'getOldParseResultOf', { codeFont: true, realNameWrapper: 'i' })}
504
+ * the stored old source text from
505
+ ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'getOldContentOf', { codeFont: true, realNameWrapper: 'i' })}
506
+
507
+ Using these together with the current file content, flowR computes a minimal ${ctx.link('Parser.Edit')} only when a new parse is actually requested.
508
+ If the file content did not change, the previous tree can be reused directly.
509
+ Otherwise, the edit is applied to the previous tree and Tree-sitter reparses incrementally instead of starting from scratch.
510
+ 4. The stored old-content entry is removed when it is used because it belongs only to that previous parse snapshot.
511
+ After the new parse succeeds, the analyzer stores a new parse tree baseline.
512
+ A later invalidation must then be able to record a fresh old-content value that matches this new tree.
513
+ If the old-content entry were kept, later invalidations of the same file would not replace it, and the next incremental parse could compare the current file content against stale old text that no longer matches the stored previous tree.
514
+
515
+ ${(0, doc_structure_1.section)('Incremental Dataflow', 4)}
516
+
517
+ This context is planned to also support future incremental dataflow graph computation.
518
+
444
519
 
445
520
  ${(0, doc_structure_1.section)('Caching', 2)}
446
521
 
@@ -38,6 +38,8 @@ const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-cont
38
38
  const flowr_analyzer_gas_context_1 = require("../project/context/flowr-analyzer-gas-context");
39
39
  const flowr_analyzer_gas_plugin_1 = require("../project/plugins/gas-plugins/flowr-analyzer-gas-plugin");
40
40
  const gas_1 = require("../gas");
41
+ const built_in_props_1 = require("../dataflow/environments/built-in-props");
42
+ const query_fn_props_1 = require("../dataflow/environments/query-fn-props");
41
43
  const semver_1 = require("semver");
42
44
  const doc_maker_1 = require("./wiki-mk/doc-maker");
43
45
  const process_value_1 = require("../dataflow/internal/process/process-value");
@@ -47,8 +49,6 @@ const doc_cli_option_1 = require("./doc-util/doc-cli-option");
47
49
  const doc_files_1 = require("./doc-util/doc-files");
48
50
  const doc_structure_1 = require("./doc-util/doc-structure");
49
51
  const shell_1 = require("../r-bridge/shell");
50
- const log_1 = require("../../test/functionality/_helper/log");
51
- const log_2 = require("../util/log");
52
52
  const model_1 = require("../r-bridge/lang-4.x/ast/model/model");
53
53
  async function makeAnalyzerExample() {
54
54
  const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
@@ -105,6 +105,77 @@ async function gasPluginExample() {
105
105
  .setEngine('tree-sitter')
106
106
  .build();
107
107
  }
108
+ /** the names of the {@link CallProp} bits that make up a mask, as inline code */
109
+ function propNames(mask) {
110
+ return Object.entries(built_in_props_1.CallProp).filter(([, b]) => typeof b === 'number' && (b & mask) !== 0)
111
+ .map(([n]) => `\`${n}\``).join(', ');
112
+ }
113
+ /** The "Labeling the Built-Ins" section of the Core page, with a table per enum taken from the configuration. */
114
+ function builtInLabelsSection(ctx) {
115
+ const index = query_fn_props_1.BuiltInIndex.default();
116
+ /* the doc comment of a bit is its explanation, flattened to fit a table cell; bits nothing carries are left out */
117
+ const table = (type, of) => [
118
+ `| ${type === 'CallProp' ? 'Call property' : 'Argument role'} | Built-ins | Meaning |`,
119
+ '| :-- | --: | :-- |',
120
+ ...Object.entries(type === 'CallProp' ? built_in_props_1.CallProp : built_in_props_1.ArgProp)
121
+ .filter(([, bit]) => typeof bit === 'number' && of(bit) > 0)
122
+ .map(([name, bit]) => {
123
+ /* a `{@link}` has already become an anchor, so dropping the tags leaves the bare name and a stray space */
124
+ const doc = ctx.doc(`${type}::${name}`).replaceAll(/<[^>]*>/g, '').replaceAll(/\s+/g, ' ')
125
+ .replaceAll(/ ([),.;])/g, '$1').replaceAll('|', '\\|').trim();
126
+ const db = type === 'CallProp' && (bit & built_in_props_1.SigDbInferable) !== 0 ? '<sup>db</sup>' : '';
127
+ return `| \`${name}\`${db} | ${of(bit)} | ${doc} |`;
128
+ })
129
+ ].join('\n');
130
+ return `#### Labeling the Built-Ins
131
+
132
+ Besides the processor, an entry says what the function *is*, in two label vocabularies:
133
+
134
+ * ${ctx.link('CallProp')} labels the call as a whole (\`props\`): whether it is pure, whether it throws, whether it
135
+ touches the file system, whether it dispatches, and so on. \`print\` is \`Invisible | Generic | Prints\`; R's
136
+ primitive generics (\`+\`, \`sin\`, \`length\`, ...) are \`Pure | Generic\`, and as they have no R body, the store is
137
+ the only place that can say they dispatch.
138
+ * ${ctx.link('ArgProp')} labels each parameter (\`sig\`), in the order R declares them: which one carries the data,
139
+ which one only selects a behavior, which one names a file, which one is called as a function.
140
+
141
+ For several analyses the labels are all they know about a call: ${ctx.link(query_fn_props_1.BuiltInIndex.name)} turns them into the
142
+ questions callers ask over and over (\`with\`, \`without\`, \`params\`), which is how the
143
+ ${ctx.linkPage('wiki/Query API', 'input-sources query')} knows which functions bring in data of their own, and how
144
+ ${ctx.linkPage('wiki/Linter', 'linting rules')} like *seeded randomness* find every call drawing from the RNG without
145
+ naming a single one of them. Labeling a built-in therefore teaches all of them at once.
146
+
147
+ So \`lapply\` is pure on its own but runs what it is handed, and says which argument that is:
148
+
149
+ ${(0, doc_code_1.codeBlock)('ts', `{ type: 'function', names: Identifier.fromAll(PkgName.Base, ['lapply', 'sapply', 'vapply']),
150
+ processor: BuiltInProcName.Apply,
151
+ config: { indexOfFunction: 1, nameOfFunctionArgument: 'FUN', unquoteFunction: true,
152
+ props: CallProp.MayPure, sig: [['X', ArgProp.Value], ['FUN', ArgProp.Callee]] } }`)}
153
+
154
+ The two tables below are generated from the configuration itself, so they always list every label that exists,
155
+ what it means, and how many built-ins carry it.
156
+
157
+ ${(0, doc_structure_1.details)('What each call property means', `<sup>db</sup> marks the bits the ${ctx.linkPage('wiki/Signature Database', 'signature database')}
158
+ states for any package function on its own (${ctx.link(query_fn_props_1.inferFnProps.name)} reads them off an entry and carries what a
159
+ function calls over to the function calling it).
160
+
161
+ ${table('CallProp', bit => index.with(bit).length)}
162
+
163
+ Most of these combine freely. The exceptions are ${ctx.link('ExclusiveCallProps')}, which a test checks the whole
164
+ configuration against:
165
+
166
+ ${built_in_props_1.ExclusiveCallProps.map(([bit, forbidden]) => `* \`${built_in_props_1.CallProp[bit]}\` rules out ${propNames(forbidden)}`).join('\n')}
167
+
168
+ Two pairs read like refinements but are not: \`TempFile\` does not imply \`File\` (making up a path touches no file
169
+ system, so a call doing both states both), and \`Reads\`/\`Writes\` say what happens to the resource an
170
+ \`ArgProp.Resource\` argument names, so they only ever appear next to a resource bit.`)}
171
+
172
+ ${(0, doc_structure_1.details)('What each argument role means', `A role is stated per parameter in the ${ctx.link('FnSig')} of a built-in, in the order R declares
173
+ them, with \`...\` covering every position from where it appears. The count is how many built-ins have at least one
174
+ parameter in that role.
175
+
176
+ ${table('ArgProp', bit => new Set(index.params(bit).map(p => p.call)).size)}`)}
177
+ `;
178
+ }
108
179
  /**
109
180
  * https://github.com/flowr-analysis/flowr/wiki/Core
110
181
  */
@@ -135,7 +206,7 @@ ${await (0, doc_repl_1.documentReplSession)(shell, [{
135
206
  }])}
136
207
 
137
208
  If you are brave (or desperate) enough, you can also try to use the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'verbose')} option to be dumped with information about flowR's internals (please, never use this for benchmarking).
138
- See the [Getting flowR to Talk](#getting-flowr-to-talk) section below for more information.
209
+ See the ${ctx.linkPage('wiki/FAQ', 'FAQ')} (*How to get flowR to talk?*) for more information.
139
210
  `
140
211
  })}
141
212
 
@@ -146,10 +217,10 @@ See the [Getting flowR to Talk](#getting-flowr-to-talk) section below for more i
146
217
  * [Parsing](#parsing)
147
218
  * [Normalization](#normalization)
148
219
  * [Dataflow Graph Generation](#dataflow-graph-generation)
220
+ * [Labeling the Built-Ins](#labeling-the-built-ins)
149
221
  * [Beyond the Dataflow Graph](#beyond-the-dataflow-graph)
150
222
  * [Static Backward Slicing](#static-backward-slicing)
151
223
  * [Gas (Resource Guard)](#gas-resource-guard)
152
- * [Getting flowR to Talk](#getting-flowr-to-talk)
153
224
 
154
225
  ## Creating and Using a flowR Analyzer Instance
155
226
 
@@ -426,9 +497,14 @@ But where are all the interesting things handled then?
426
497
  For that, we want to have a look at the built-in environment, which can be freely configured using flowR's ${ctx.linkPage('wiki/Interface', 'configuration system', 'configuring-flowr')}.
427
498
  FlowR's heart and soul resides in the ${ctx.link('DefaultBuiltinConfig')} object, which is used to configure the built-in environment
428
499
  by mapping function names to ${ctx.link('BuiltInProcessorMapper')} functions.
429
- There you can find functions like ${ctx.link(built_in_access_1.processAccess)} which handles the (subset) access to a variable,
500
+ There you can find functions like ${ctx.link(built_in_access_1.processAccess)} which handles the (subset) access to a variable,
430
501
  or ${ctx.link(built_in_for_loop_1.processForLoop)} which handles the primitive for loop construct (whenever it is not overwritten).
431
502
 
503
+ Besides the processor, an entry states what the function does with ${ctx.link('BuiltInFnInfo')} -- see
504
+ [Labeling the Built-Ins](#labeling-the-built-ins) below for the labels it may carry.
505
+
506
+ ${builtInLabelsSection(ctx)}
507
+
432
508
  Just as an example, we want to have a look at the ${ctx.link(built_in_repeat_loop_1.processRepeatLoop)} function, as it is one of the simplest built-in processors
433
509
  we have:
434
510
 
@@ -533,17 +609,6 @@ ${ctx.doc(flowr_analyzer_gas_plugin_1.FlowrAnalyzerGasPlugin)}
533
609
 
534
610
  ${ctx.code(gasPluginExample, { dropLinesStart: 1, dropLinesEnd: 1, hideDefinedAt: true })}
535
611
 
536
- ## Helpful Things
537
-
538
- ### Getting flowR to Talk
539
-
540
- When using flowR from the CLI, you can use the ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'verbose')} option to get more information about what flowR is doing.
541
- While coding, however, you can use the ${ctx.link(log_1.setMinLevelOfAllLogs)} function to set the minimum level of logs to be displayed (this works with the ${ctx.link(log_2.FlowrLogger)} abstraction).
542
- In general, you can configure the levels of individual logs, such as the general \`log\` (obtained with ${ctx.link('getActiveLog')}) or the ${ctx.link('parseLog')}.
543
- Please note that flowR makes no guarantees that log outputs are persistent across versions, and it is up to the implementors to provide sensible logging.
544
- If you are an implementor and want to add logging, please make sure there are no larger runtime impliciations when logging is disabled.
545
- Have a look at the ${ctx.link(log_2.expensiveTrace)} function for example, which uses a function to generate the log message only when the log level is reached.
546
-
547
612
  `;
548
613
  }
549
614
  }
@@ -301,6 +301,9 @@ ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
301
301
  }
302
302
  }
303
303
  },
304
+ incrementalParsing: {
305
+ activated: false,
306
+ },
304
307
  gas: {
305
308
  thresholds: {
306
309
  memory: { problematic: 0.7, critical: 0.9 },
@@ -60,14 +60,11 @@ export declare const LintingRules: {
60
60
  }>;
61
61
  readonly info: {
62
62
  readonly defaultConfig: {
63
- readonly randomnessProducers: readonly [{
64
- readonly type: "function";
65
- readonly name: "set.seed";
66
- }, {
67
- readonly type: "assignment";
68
- readonly name: ".Random.seed";
69
- }];
70
- readonly randomnessConsumers: readonly ["jitter", "sample", "sample.int", "arima.sim", "kmeans", "princomp", "rcauchy", "rchisq", "rexp", "rgamma", "rgeom", "rlnorm", "rlogis", "rmultinom", "rnbinom", "rnorm", "rpois", "runif", "pointLabel", "some", "rbernoulli", "rdunif", "generateSeedVectors", "rbeta", "rf", "rhyper", "rweibull", "rt", "rvonmises", "rwilcox", "rxor", "rhyper", "rmvnorm", "rsignrank", "randomForest", "permuted", "permute", "shuffle", "shuffleSet", "data_shuffle", "sample_frac", "sample_n", "slice_sample"];
63
+ readonly randomnessProducers: {
64
+ type: "function" | "assignment";
65
+ name: string;
66
+ }[];
67
+ readonly randomnessConsumers: readonly [...import("../dataflow/environments/identifier").BrandedIdentifier[], "princomp", "pointLabel", "some", "rbernoulli", "rdunif", "generateSeedVectors", "rvonmises", "rxor", "rmvnorm", "randomForest", "permuted", "permute", "shuffle", "shuffleSet", "data_shuffle", "sample_frac", "sample_n"];
71
68
  };
72
69
  readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Reproducibility];
73
70
  readonly certainty: import("./linter-format").LintingRuleCertainty.BestEffort;
@@ -168,8 +165,10 @@ export declare const LintingRules: {
168
165
  readonly certainty: import("./linter-format").LintingRuleCertainty.BestEffort;
169
166
  readonly description: "Marks network functions that execute network operations, such as downloading files or making HTTP requests.";
170
167
  readonly defaultConfig: {
171
- readonly fns: readonly ["read.table", "read.csv", "read.csv2", "read.delim", "read.delim2", "readRDS", "download.file", "url", "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "content", "handle", "get_callback", "VERB", "fread", "gzcon", "readlines", "readLines", "source", "load", "curl_download", "curl_fetch_memory", "getURL", "getForm", "read_html", "read_xml", "html_nodes", "html_text", "fromJSON", "read.xlsx", "drive_download", "drive_get", "s3read_using", "s3write_using", "storage_download", "AnnotationHub", "ExperimentHub", "scan", "socketConnection", "request", "curl"];
172
- readonly onlyTriggerWithArgument: RegExp;
168
+ readonly fns: {
169
+ name: import("../dataflow/environments/identifier").Identifier;
170
+ onlyTriggerWithArgument: RegExp;
171
+ }[];
173
172
  };
174
173
  };
175
174
  };
@@ -252,7 +251,7 @@ export declare const LintingRules: {
252
251
  readonly tags: readonly [import("./linter-tags").LintingRuleTag.Security, import("./linter-tags").LintingRuleTag.Smell, import("./linter-tags").LintingRuleTag.Readability, import("./linter-tags").LintingRuleTag.Performance];
253
252
  readonly certainty: import("./linter-format").LintingRuleCertainty.BestEffort;
254
253
  readonly defaultConfig: {
255
- readonly consider: readonly ["^eval$", "^system$", "^system2$", "^shell$"];
254
+ readonly consider: readonly string[];
256
255
  readonly pipeCommandFunctions: readonly import("./rules/problematic-inputs").PipeCommandFunctionSpec[];
257
256
  };
258
257
  };
@@ -6,7 +6,6 @@ const df_helper_1 = require("../../dataflow/graph/df-helper");
6
6
  const identifier_1 = require("../../dataflow/environments/identifier");
7
7
  const flowr_search_builder_1 = require("../../search/flowr-search-builder");
8
8
  const search_enrichers_1 = require("../../search/search-executor/search-enrichers");
9
- const flowr_search_filters_1 = require("../../search/flowr-search-filters");
10
9
  const range_1 = require("../../util/range");
11
10
  const linter_format_1 = require("../linter-format");
12
11
  const linter_tags_1 = require("../linter-tags");
@@ -14,9 +13,12 @@ const function_finder_util_1 = require("./function-finder-util");
14
13
  exports.DEPRECATED_FUNCTIONS = {
15
14
  // unlike functionFinderUtil.createSearch(config.fns), this does not pre-filter to the hardcoded list: the
16
15
  // sigdb-driven pass below needs every resolved call, so the `fns` filtering happens in processSearchResult instead
17
- createSearch: (_config) => flowr_search_builder_1.Q.all().filter(vertex_1.VertexType.FunctionCall).with(search_enrichers_1.Enrichment.CallTargets, { onlyBuiltin: true }),
16
+ createSearch: (_config) => flowr_search_builder_1.Q.all().filter(vertex_1.VertexType.FunctionCall).with(search_enrichers_1.Enrichment.CallTargets, {
17
+ onlyBuiltin: true,
18
+ qualifyNames: false // we don't use qualified names for this rule yet
19
+ }),
18
20
  processSearchResult: async (elements, config, data) => {
19
- const matchesConfiguredFns = (0, flowr_search_filters_1.testFunctionsIgnoringPackage)(config.fns);
21
+ const matchesConfiguredFns = identifier_1.Identifier.regex(...config.fns);
20
22
  const hardcoded = await function_finder_util_1.functionFinderUtil.processSearchResult(elements, config, data, es => es.filter(e => (0, search_enrichers_1.enrichmentContent)(e, search_enrichers_1.Enrichment.CallTargets)?.targets
21
23
  .some(t => typeof t === 'string' && matchesConfiguredFns.test(t))));
22
24
  const deps = data.inspectContext().deps;
@@ -3,7 +3,7 @@ import type { FlowrSearchElement, FlowrSearchElements } from '../../search/flowr
3
3
  import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
4
4
  import type { MergeableRecord } from '../../util/objects';
5
5
  import type { FunctionInfo } from '../../queries/catalog/dependencies-query/function-info/function-info';
6
- import type { Identifier } from '../../dataflow/environments/identifier';
6
+ import { Identifier } from '../../dataflow/environments/identifier';
7
7
  import { Ternary } from '../../util/logic';
8
8
  import type { ReadonlyFlowrAnalysisProvider } from '../../project/flowr-analyzer';
9
9
  import type { AsyncOrSync } from 'ts-essentials';
@@ -24,7 +24,7 @@ export interface FunctionsToDetectConfig extends MergeableRecord {
24
24
  * This helper object collects utility functions used to create linting rules that search for specific functions.
25
25
  */
26
26
  export declare const functionFinderUtil: {
27
- createSearch: (functions: readonly string[]) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with", "filter"], ParentInformation, Promise<FlowrSearchElements<ParentInformation, [] | FlowrSearchElement<ParentInformation>[]>>>;
27
+ createSearch: (functions: readonly Identifier[]) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with", "filter"], ParentInformation, Promise<FlowrSearchElements<ParentInformation, [] | FlowrSearchElement<ParentInformation>[]>>>;
28
28
  processSearchResult<T extends FlowrSearchElement<ParentInformation>[]>(this: void, elements: FlowrSearchElements<ParentInformation, T>, _config: unknown, _data: unknown, refineSearch?: (elements: T) => AsyncOrSync<(T[number] & {
29
29
  certainty?: LintingResultCertainty;
30
30
  })[]>): Promise<{
@@ -10,7 +10,9 @@ const assert_1 = require("../../util/assert");
10
10
  const resolve_argument_1 = require("../../dataflow/eval/resolve/resolve-argument");
11
11
  const vertex_1 = require("../../dataflow/graph/vertex");
12
12
  const dependencies_query_format_1 = require("../../queries/catalog/dependencies-query/dependencies-query-format");
13
+ const identifier_1 = require("../../dataflow/environments/identifier");
13
14
  const logic_1 = require("../../util/logic");
15
+ const df_helper_1 = require("../../dataflow/graph/df-helper");
14
16
  /**
15
17
  * This helper object collects utility functions used to create linting rules that search for specific functions.
16
18
  */
@@ -23,7 +25,7 @@ exports.functionFinderUtil = {
23
25
  args: {
24
26
  enrichment: search_enrichers_1.Enrichment.CallTargets,
25
27
  test: {
26
- targets: (0, flowr_search_filters_1.testFunctionsIgnoringPackage)(functions)
28
+ targets: identifier_1.Identifier.regex(...functions)
27
29
  }
28
30
  }
29
31
  }));
@@ -63,12 +65,17 @@ exports.functionFinderUtil = {
63
65
  };
64
66
  },
65
67
  async requireArgumentValue(element, pool, analyzer, requireValue) {
66
- const info = pool.get(element.node.lexeme ?? '');
68
+ const dataflow = await analyzer.dataflow();
69
+ const identifier = df_helper_1.Dataflow.qualify(element.node.info.id, dataflow.graph, true) ?? (element.node.lexeme !== undefined ? identifier_1.Identifier.parse(element.node.lexeme) : undefined);
67
70
  /* if we have no additional info, we assume they always access the network */
71
+ if (identifier === undefined) {
72
+ return logic_1.Ternary.Always;
73
+ }
74
+ // we allow our function pool to contain non-namespaced functions
75
+ const info = pool.get(identifier_1.Identifier.toString(identifier)) ?? pool.get(identifier_1.Identifier.getName(identifier));
68
76
  if (info === undefined) {
69
77
  return logic_1.Ternary.Always;
70
78
  }
71
- const dataflow = await analyzer.dataflow();
72
79
  const vert = dataflow.graph.getVertex(element.node.info.id);
73
80
  if (vertex_1.FunctionCallVertex.is(vert)) {
74
81
  const args = (0, resolve_argument_1.getArgumentStringValue)(analyzer.flowrConfig.solver.variables, dataflow.graph, vert, info.argIdx, info.argName, info.resolveValue, analyzer.inspectContext());
@@ -4,10 +4,28 @@ import { LintingRuleTag } from '../linter-tags';
4
4
  import type { MergeableRecord } from '../../util/objects';
5
5
  import type { FlowrSearchElement } from '../../search/flowr-search';
6
6
  import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
+ import type { FunctionInfo } from '../../queries/catalog/dependencies-query/function-info/function-info';
8
+ import { Identifier } from '../../dataflow/environments/identifier';
7
9
  export interface NetworkFunctionsConfig extends MergeableRecord {
8
- /** The list of function names that should be marked in the given context if their arguments match. */
9
- fns: readonly string[];
10
- /** only trigger if the function's read argument is linked to a value that matches this pattern */
10
+ /**
11
+ * The list of function names or more detailed {@link NetworkFunction} information that should be marked in the given context if their arguments match.
12
+ */
13
+ fns: readonly (Identifier | NetworkFunction)[];
14
+ }
15
+ export interface NetworkFunction extends MergeableRecord {
16
+ /**
17
+ * The name of the network function to find.
18
+ */
19
+ name: Identifier;
20
+ /**
21
+ * The {@link FunctionInfo} to use for querying the argument whose value should match {@link onlyTriggerWithArgument}.
22
+ * If this is not specified, flowR's default database of functions ({@link ReadFunctions}, {@link SourceFunctions} and {@link WriteFunctions}) is queried for appropriate information on the function's read argument.
23
+ */
24
+ info?: Omit<FunctionInfo, 'name'>;
25
+ /**
26
+ * Only trigger if the function's read argument is linked to a value that matches this pattern through {@link info}.
27
+ * If this is unset, the read argument is not queried for whether its value matches a pattern.
28
+ */
11
29
  onlyTriggerWithArgument?: RegExp | string;
12
30
  }
13
31
  export declare const NETWORK_FUNCTIONS: {
@@ -26,8 +44,10 @@ export declare const NETWORK_FUNCTIONS: {
26
44
  readonly certainty: LintingRuleCertainty.BestEffort;
27
45
  readonly description: "Marks network functions that execute network operations, such as downloading files or making HTTP requests.";
28
46
  readonly defaultConfig: {
29
- readonly fns: readonly ["read.table", "read.csv", "read.csv2", "read.delim", "read.delim2", "readRDS", "download.file", "url", "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "content", "handle", "get_callback", "VERB", "fread", "gzcon", "readlines", "readLines", "source", "load", "curl_download", "curl_fetch_memory", "getURL", "getForm", "read_html", "read_xml", "html_nodes", "html_text", "fromJSON", "read.xlsx", "drive_download", "drive_get", "s3read_using", "s3write_using", "storage_download", "AnnotationHub", "ExperimentHub", "scan", "socketConnection", "request", "curl"];
30
- readonly onlyTriggerWithArgument: RegExp;
47
+ readonly fns: {
48
+ name: Identifier;
49
+ onlyTriggerWithArgument: RegExp;
50
+ }[];
31
51
  };
32
52
  };
33
53
  };
@@ -8,14 +8,28 @@ const read_functions_1 = require("../../queries/catalog/dependencies-query/funct
8
8
  const logic_1 = require("../../util/logic");
9
9
  const source_functions_1 = require("../../queries/catalog/dependencies-query/function-info/source-functions");
10
10
  const write_functions_1 = require("../../queries/catalog/dependencies-query/function-info/write-functions");
11
- const FnPool = new Map(read_functions_1.ReadFunctions.concat(source_functions_1.SourceFunctions, write_functions_1.WriteFunctions).map(f => [f.name, f]));
11
+ const identifier_1 = require("../../dataflow/environments/identifier");
12
+ const df_helper_1 = require("../../dataflow/graph/df-helper");
13
+ const DefaultFunctionPool = new Map(read_functions_1.ReadFunctions.concat(source_functions_1.SourceFunctions, write_functions_1.WriteFunctions).map(f => [identifier_1.Identifier.toString(identifier_1.Identifier.make(f.name, f.package)), f]));
12
14
  exports.NETWORK_FUNCTIONS = {
13
- createSearch: (config) => function_finder_util_1.functionFinderUtil.createSearch(config.fns),
14
- processSearchResult: (e, c, d) => {
15
+ createSearch: (config) => function_finder_util_1.functionFinderUtil.createSearch(config.fns.map(f => identifier_1.Identifier.is(f) ? f : f.name)),
16
+ processSearchResult: async (e, c, d) => {
17
+ const df = await d.dataflow();
18
+ const fnPool = new Map([
19
+ ...DefaultFunctionPool,
20
+ ...c.fns.flatMap(f => identifier_1.Identifier.is(f) ? [] : f.info === undefined ? [] : [[identifier_1.Identifier.toString(f.name), { name: identifier_1.Identifier.toString(f.name), ...f.info }]])
21
+ ]);
22
+ const onlyTriggerLookup = new Map(c.fns.flatMap(f => identifier_1.Identifier.is(f) ? [] : [[identifier_1.Identifier.toString(f.name), f.onlyTriggerWithArgument]]));
15
23
  return function_finder_util_1.functionFinderUtil.processSearchResult(e, c, d, async (es) => {
16
24
  const res = [];
17
25
  for (const e of es) {
18
- const val = await function_finder_util_1.functionFinderUtil.requireArgumentValue(e, FnPool, d, c.onlyTriggerWithArgument);
26
+ const identifier = df_helper_1.Dataflow.qualify(e.node.info.id, df.graph, true) ?? (e.node.lexeme !== undefined ? identifier_1.Identifier.parse(e.node.lexeme) : undefined);
27
+ if (identifier === undefined) {
28
+ continue;
29
+ }
30
+ // we allow onlyTriggerLookup to contain non-namespaced functions
31
+ const requireValue = onlyTriggerLookup.get(identifier_1.Identifier.toString(identifier)) ?? onlyTriggerLookup.get(identifier_1.Identifier.getName(identifier));
32
+ const val = await function_finder_util_1.functionFinderUtil.requireArgumentValue(e, fnPool, d, requireValue);
19
33
  if (val === logic_1.Ternary.Never) {
20
34
  continue;
21
35
  }
@@ -35,13 +49,39 @@ exports.NETWORK_FUNCTIONS = {
35
49
  description: 'Marks network functions that execute network operations, such as downloading files or making HTTP requests.',
36
50
  defaultConfig: {
37
51
  fns: [
38
- 'read.table', 'read.csv', 'read.csv2', 'read.delim', 'read.delim2', 'readRDS', 'download.file', 'url', 'GET', 'POST', 'PUT',
39
- 'DELETE', 'PATCH', 'HEAD', 'content', 'handle', 'get_callback', 'VERB', 'fread', 'gzcon', 'readlines', 'readLines', 'source', 'load', 'curl_download',
40
- 'curl_fetch_memory', 'getURL', 'getForm', 'read_html', 'read_xml', 'html_nodes', 'html_text', 'fromJSON', 'read.xlsx', 'drive_download', 'drive_get',
41
- 's3read_using', 's3write_using', 'storage_download', 'AnnotationHub', 'ExperimentHub', 'scan',
42
- 'socketConnection', 'request', 'curl'
43
- ],
44
- onlyTriggerWithArgument: /^(https?|ftps?):\/\//
52
+ // subset of default network functions provided by manually reviewed results from analysis based on the signature database, see the dirty-network-funcs-test branch there
53
+ ...['oauth_endpoint', 'DELETE', 'PATCH', 'HEAD', 'GET', 'POST', 'PUT', 'BROWSE', 'RETRY', 'VERB', 'content', 'handle', 'get_callback', 'VERB'].map(f => identifier_1.Identifier.make(f, 'httr')),
54
+ ...['read.table', 'read.csv', 'read.csv2', 'read.delim', 'read.delim2', 'download.file'].map(f => identifier_1.Identifier.make(f, 'utils')),
55
+ ...['socketConnection', 'readRDS', 'url', 'gzcon', 'readlines', 'readLines', 'source', 'load', 'scan'].map(f => identifier_1.Identifier.make(f, 'base')),
56
+ ...['nslookup', 'new_handle', 'multi_download', 'curl', 'curl_upload', 'curl_echo', 'curl_download', 'curl_fetch_memory'].map(f => identifier_1.Identifier.make(f, 'curl')),
57
+ ...['read_html', 'read_xml'].map(f => identifier_1.Identifier.make(f, 'xml2')),
58
+ ...['download_html', 'html_nodes', 'html_text'].map(f => identifier_1.Identifier.make(f, 'rvest')),
59
+ ...['shared_drive_get', 'shared_drive_rm', 'drive_download', 'drive_get'].map(f => identifier_1.Identifier.make(f, 'googledrive')),
60
+ ...['s3read_using', 's3write_using'].map(f => identifier_1.Identifier.make(f, 'aws.s3')),
61
+ ...['url_filename', 'url_accessible', 'url_destination'].map(f => identifier_1.Identifier.make(f, 'xfun')),
62
+ ...['source_url', 'source_gist'].map(f => identifier_1.Identifier.make(f, 'devtools')),
63
+ ...['install_bioc', 'install_bitbucket', 'install_cran', 'install_dev', 'install_git', 'install_github', 'install_gitlab', 'install_svn', 'install_url', 'install_version'].flatMap(f => [identifier_1.Identifier.make(f, 'devtools'), identifier_1.Identifier.make(f, 'remotes')]),
64
+ ...['github_pull', 'update_packages'].map(f => identifier_1.Identifier.make(f, 'remotes')),
65
+ ...['viewer', 'getDelegatedAzureToken'].map(f => identifier_1.Identifier.make(f, 'rstudioapi')),
66
+ ...['runGist', 'runUrl', 'httpResponse', 'session'].map(f => identifier_1.Identifier.make(f, 'shiny')),
67
+ ...['create_from_github', 'use_git_remote', 'use_github_action', 'use_github_file', 'use_tidy_thanks'].map(f => identifier_1.Identifier.make(f, 'usethis')),
68
+ identifier_1.Identifier.make('copy_to', 'dplyr'),
69
+ identifier_1.Identifier.make('getURL', 'RCurl'),
70
+ identifier_1.Identifier.make('fread', 'data.table'),
71
+ identifier_1.Identifier.make('getForm', 'rBDAT'),
72
+ identifier_1.Identifier.make('fromJSON', 'jsonlite'),
73
+ identifier_1.Identifier.make('read.xlsx', 'openxlsx'),
74
+ identifier_1.Identifier.make('storage_download', 'googleCloudStorageR'),
75
+ identifier_1.Identifier.make('AnnotationHub', 'AnnotationHub'),
76
+ identifier_1.Identifier.make('ExperimentHub', 'ExperimentHub'),
77
+ identifier_1.Identifier.make('datasource', 'readr'),
78
+ identifier_1.Identifier.make('melt_csv', 'meltr'),
79
+ identifier_1.Identifier.make('addServer', 'rsconnect'),
80
+ identifier_1.Identifier.make('vroom', 'vroom'),
81
+ ].map(f => ({
82
+ name: f,
83
+ onlyTriggerWithArgument: /^(https?|ftps?):\/\//
84
+ }))
45
85
  }
46
86
  }
47
87
  };
@@ -32,7 +32,7 @@ export declare const PROBLEMATIC_INPUTS: {
32
32
  readonly tags: readonly [LintingRuleTag.Security, LintingRuleTag.Smell, LintingRuleTag.Readability, LintingRuleTag.Performance];
33
33
  readonly certainty: LintingRuleCertainty.BestEffort;
34
34
  readonly defaultConfig: {
35
- readonly consider: readonly ["^eval$", "^system$", "^system2$", "^shell$"];
35
+ readonly consider: readonly string[];
36
36
  readonly pipeCommandFunctions: readonly PipeCommandFunctionSpec[];
37
37
  };
38
38
  };
@@ -8,7 +8,13 @@ const linter_tags_1 = require("../linter-tags");
8
8
  const simple_input_classifier_1 = require("../../queries/catalog/input-sources-query/simple-input-classifier");
9
9
  const parse_1 = require("../../slicing/criterion/parse");
10
10
  const graph_1 = require("../../dataflow/graph/graph");
11
- const defaultConsider = ['^eval$', '^system$', '^system2$', '^shell$'];
11
+ const built_in_props_1 = require("../../dataflow/environments/built-in-props");
12
+ const query_fn_props_1 = require("../../dataflow/environments/query-fn-props");
13
+ const identifier_1 = require("../../dataflow/environments/identifier");
14
+ const defaultConsider = [
15
+ '^eval$',
16
+ ...query_fn_props_1.BuiltInIndex.default().with(built_in_props_1.CallProp.Process).map(n => `^${identifier_1.Identifier.getName(n)}$`)
17
+ ];
12
18
  const defaultPipeCommandFunctions = [
13
19
  { pattern: '^pdf$', argIdx: 0, argName: 'file' },
14
20
  { pattern: '^postscript$', argIdx: 0, argName: 'file' }
@@ -40,14 +40,11 @@ export declare const SEEDED_RANDOMNESS: {
40
40
  }>;
41
41
  readonly info: {
42
42
  readonly defaultConfig: {
43
- readonly randomnessProducers: readonly [{
44
- readonly type: "function";
45
- readonly name: "set.seed";
46
- }, {
47
- readonly type: "assignment";
48
- readonly name: ".Random.seed";
49
- }];
50
- readonly randomnessConsumers: readonly ["jitter", "sample", "sample.int", "arima.sim", "kmeans", "princomp", "rcauchy", "rchisq", "rexp", "rgamma", "rgeom", "rlnorm", "rlogis", "rmultinom", "rnbinom", "rnorm", "rpois", "runif", "pointLabel", "some", "rbernoulli", "rdunif", "generateSeedVectors", "rbeta", "rf", "rhyper", "rweibull", "rt", "rvonmises", "rwilcox", "rxor", "rhyper", "rmvnorm", "rsignrank", "randomForest", "permuted", "permute", "shuffle", "shuffleSet", "data_shuffle", "sample_frac", "sample_n", "slice_sample"];
43
+ readonly randomnessProducers: {
44
+ type: "function" | "assignment";
45
+ name: string;
46
+ }[];
47
+ readonly randomnessConsumers: readonly [...BrandedIdentifier[], "princomp", "pointLabel", "some", "rbernoulli", "rdunif", "generateSeedVectors", "rvonmises", "rxor", "rmvnorm", "randomForest", "permuted", "permute", "shuffle", "shuffleSet", "data_shuffle", "sample_frac", "sample_n"];
51
48
  };
52
49
  readonly tags: readonly [LintingRuleTag.Robustness, LintingRuleTag.Reproducibility];
53
50
  readonly certainty: LintingRuleCertainty.BestEffort;