@eagleoutice/flowr 2.2.12 → 2.2.14

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 (282) hide show
  1. package/README.md +82 -20
  2. package/benchmark/slicer.js +2 -2
  3. package/benchmark/summarizer/first-phase/input.js +1 -1
  4. package/benchmark/summarizer/first-phase/process.js +3 -3
  5. package/benchmark/summarizer/second-phase/process.js +1 -1
  6. package/benchmark/summarizer/summarizer.js +1 -1
  7. package/cli/common/options.js +4 -4
  8. package/cli/common/script.js +1 -1
  9. package/cli/flowr.js +1 -1
  10. package/cli/repl/commands/repl-cfg.d.ts +2 -0
  11. package/cli/repl/commands/repl-cfg.js +38 -24
  12. package/cli/repl/commands/repl-commands.js +4 -2
  13. package/cli/repl/commands/repl-dataflow.js +3 -3
  14. package/cli/repl/commands/repl-execute.js +1 -1
  15. package/cli/repl/commands/repl-main.d.ts +1 -1
  16. package/cli/repl/commands/repl-main.js +1 -1
  17. package/cli/repl/commands/repl-normalize.js +1 -1
  18. package/cli/repl/commands/repl-query.js +2 -2
  19. package/cli/repl/core.js +1 -1
  20. package/cli/repl/prompt.js +1 -1
  21. package/cli/repl/server/connection.js +4 -4
  22. package/cli/repl/server/messages/message-analysis.d.ts +1 -1
  23. package/cli/script-core/statistics-core.js +1 -1
  24. package/cli/script-core/statistics-helper-core.js +4 -4
  25. package/config.d.ts +47 -24
  26. package/config.js +3 -3
  27. package/control-flow/basic-cfg-guided-visitor.d.ts +39 -0
  28. package/control-flow/basic-cfg-guided-visitor.js +114 -0
  29. package/control-flow/cfg-properties.d.ts +26 -0
  30. package/control-flow/cfg-properties.js +100 -0
  31. package/control-flow/cfg-simplification.d.ts +18 -0
  32. package/control-flow/cfg-simplification.js +55 -0
  33. package/control-flow/cfg-to-basic-blocks.d.ts +5 -0
  34. package/control-flow/cfg-to-basic-blocks.js +81 -0
  35. package/control-flow/control-flow-graph.d.ts +247 -0
  36. package/control-flow/control-flow-graph.js +290 -0
  37. package/control-flow/dfg-cfg-guided-visitor.d.ts +32 -0
  38. package/control-flow/dfg-cfg-guided-visitor.js +71 -0
  39. package/control-flow/diff-cfg.d.ts +11 -0
  40. package/control-flow/diff-cfg.js +161 -0
  41. package/control-flow/extract-cfg.d.ts +30 -0
  42. package/control-flow/extract-cfg.js +475 -0
  43. package/control-flow/happens-before.d.ts +7 -0
  44. package/{util/cfg → control-flow}/happens-before.js +3 -3
  45. package/control-flow/semantic-cfg-guided-visitor.d.ts +452 -0
  46. package/control-flow/semantic-cfg-guided-visitor.js +492 -0
  47. package/control-flow/simple-visitor.d.ts +25 -0
  48. package/control-flow/simple-visitor.js +80 -0
  49. package/control-flow/syntax-cfg-guided-visitor.d.ts +128 -0
  50. package/control-flow/syntax-cfg-guided-visitor.js +166 -0
  51. package/core/print/print.d.ts +1 -1
  52. package/core/print/slice-diff-ansi.js +1 -1
  53. package/core/steps/pipeline/create-pipeline.js +1 -1
  54. package/dataflow/environments/built-in-config.js +9 -6
  55. package/dataflow/environments/built-in.d.ts +8 -4
  56. package/dataflow/environments/built-in.js +47 -5
  57. package/dataflow/environments/default-builtin-config.d.ts +2 -0
  58. package/dataflow/environments/default-builtin-config.js +81 -14
  59. package/dataflow/environments/resolve-by-name.js +15 -4
  60. package/dataflow/extractor.js +2 -2
  61. package/dataflow/graph/dataflowgraph-builder.d.ts +3 -1
  62. package/dataflow/graph/dataflowgraph-builder.js +4 -2
  63. package/dataflow/graph/diff-dataflow-graph.d.ts +16 -0
  64. package/dataflow/graph/{diff.js → diff-dataflow-graph.js} +30 -56
  65. package/dataflow/graph/graph.d.ts +11 -3
  66. package/dataflow/graph/graph.js +27 -12
  67. package/dataflow/graph/vertex.d.ts +17 -2
  68. package/dataflow/internal/linker.d.ts +3 -2
  69. package/dataflow/internal/linker.js +33 -24
  70. package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
  71. package/dataflow/internal/process/functions/call/argument/unpack-argument.js +1 -1
  72. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +12 -9
  73. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
  74. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +84 -16
  75. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +23 -16
  76. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +5 -5
  77. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +9 -4
  78. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +3 -2
  79. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +15 -4
  80. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +4 -3
  81. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -3
  82. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +4 -3
  83. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +1 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -7
  86. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +3 -2
  87. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -0
  88. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -4
  89. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -2
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +19 -4
  91. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +4 -3
  92. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +3 -3
  93. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +3 -3
  94. package/dataflow/internal/process/functions/call/common.d.ts +4 -1
  95. package/dataflow/internal/process/functions/call/common.js +5 -3
  96. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +3 -2
  97. package/dataflow/internal/process/functions/call/known-call-handling.js +2 -1
  98. package/dataflow/internal/process/functions/call/named-call-handling.js +1 -1
  99. package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +1 -0
  100. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +6 -4
  101. package/dataflow/internal/process/process-named-call.d.ts +1 -1
  102. package/dataflow/internal/process/process-named-call.js +5 -5
  103. package/dataflow/origin/dfg-get-origin.d.ts +82 -0
  104. package/dataflow/origin/dfg-get-origin.js +116 -0
  105. package/documentation/doc-util/doc-cfg.d.ts +13 -6
  106. package/documentation/doc-util/doc-cfg.js +20 -15
  107. package/documentation/doc-util/doc-cli-option.js +4 -2
  108. package/documentation/doc-util/doc-dfg.js +3 -3
  109. package/documentation/doc-util/doc-escape.d.ts +7 -0
  110. package/documentation/doc-util/doc-escape.js +19 -0
  111. package/documentation/doc-util/doc-files.d.ts +1 -0
  112. package/documentation/doc-util/doc-files.js +2 -1
  113. package/documentation/doc-util/doc-normalized-ast.js +3 -3
  114. package/documentation/doc-util/doc-query.js +2 -2
  115. package/documentation/doc-util/doc-repl.js +1 -1
  116. package/documentation/doc-util/doc-search.js +1 -1
  117. package/documentation/doc-util/doc-server-message.js +2 -2
  118. package/documentation/doc-util/doc-structure.d.ts +1 -0
  119. package/documentation/doc-util/doc-structure.js +5 -0
  120. package/documentation/doc-util/doc-types.d.ts +7 -1
  121. package/documentation/doc-util/doc-types.js +13 -2
  122. package/documentation/print-capabilities-markdown.js +27 -1
  123. package/documentation/print-cfg-wiki.js +508 -20
  124. package/documentation/print-dataflow-graph-wiki.js +180 -25
  125. package/documentation/print-engines-wiki.js +1 -1
  126. package/documentation/print-faq-wiki.d.ts +1 -0
  127. package/documentation/print-faq-wiki.js +75 -0
  128. package/documentation/print-interface-wiki.js +1 -1
  129. package/documentation/print-linter-wiki.d.ts +1 -0
  130. package/documentation/print-linter-wiki.js +76 -0
  131. package/documentation/print-linting-and-testing-wiki.js +52 -36
  132. package/documentation/print-normalized-ast-wiki.js +1 -1
  133. package/documentation/print-onboarding-wiki.d.ts +1 -0
  134. package/documentation/print-onboarding-wiki.js +42 -0
  135. package/documentation/print-query-wiki.js +21 -1
  136. package/documentation/print-readme.js +10 -3
  137. package/linter/linter-executor.d.ts +9 -0
  138. package/linter/linter-executor.js +26 -0
  139. package/linter/linter-format.d.ts +65 -0
  140. package/linter/linter-format.js +9 -0
  141. package/linter/linter-rules.d.ts +42 -0
  142. package/linter/linter-rules.js +14 -0
  143. package/linter/rules/1-deprecated-functions.d.ts +34 -0
  144. package/linter/rules/1-deprecated-functions.js +54 -0
  145. package/linter/rules/2-file-path-validity.d.ts +48 -0
  146. package/linter/rules/2-file-path-validity.js +93 -0
  147. package/package.json +10 -6
  148. package/queries/catalog/call-context-query/call-context-query-executor.js +5 -5
  149. package/queries/catalog/call-context-query/call-context-query-format.d.ts +3 -3
  150. package/queries/catalog/call-context-query/call-context-query-format.js +7 -3
  151. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +2 -2
  152. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +24 -21
  153. package/queries/catalog/cluster-query/cluster-query-format.d.ts +3 -1
  154. package/queries/catalog/cluster-query/cluster-query-format.js +6 -2
  155. package/queries/catalog/config-query/config-query-format.d.ts +2 -1
  156. package/queries/catalog/config-query/config-query-format.js +4 -3
  157. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +2 -1
  158. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +4 -3
  159. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +3 -1
  160. package/queries/catalog/dataflow-query/dataflow-query-format.js +11 -3
  161. package/queries/catalog/dependencies-query/dependencies-query-executor.js +4 -2
  162. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +2 -1
  163. package/queries/catalog/dependencies-query/dependencies-query-format.js +12 -3
  164. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +1 -1
  165. package/queries/catalog/happens-before-query/happens-before-query-executor.js +4 -4
  166. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +2 -1
  167. package/queries/catalog/happens-before-query/happens-before-query-format.js +4 -3
  168. package/queries/catalog/id-map-query/id-map-query-format.d.ts +2 -1
  169. package/queries/catalog/id-map-query/id-map-query-format.js +4 -3
  170. package/queries/catalog/lineage-query/lineage-query-format.d.ts +2 -1
  171. package/queries/catalog/lineage-query/lineage-query-format.js +7 -3
  172. package/queries/catalog/linter-query/linter-query-executor.d.ts +3 -0
  173. package/queries/catalog/linter-query/linter-query-executor.js +28 -0
  174. package/queries/catalog/linter-query/linter-query-format.d.ts +80 -0
  175. package/queries/catalog/linter-query/linter-query-format.js +43 -0
  176. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -1
  177. package/queries/catalog/location-map-query/location-map-query-format.js +4 -3
  178. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +2 -1
  179. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +4 -3
  180. package/queries/catalog/origin-query/origin-query-executor.d.ts +5 -0
  181. package/queries/catalog/origin-query/origin-query-executor.js +33 -0
  182. package/queries/catalog/origin-query/origin-query-format.d.ts +73 -0
  183. package/queries/catalog/origin-query/origin-query-format.js +31 -0
  184. package/queries/catalog/project-query/project-query-executor.js +1 -1
  185. package/queries/catalog/project-query/project-query-format.d.ts +2 -1
  186. package/queries/catalog/project-query/project-query-format.js +4 -3
  187. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -1
  188. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +4 -3
  189. package/queries/catalog/search-query/search-query-format.d.ts +2 -1
  190. package/queries/catalog/search-query/search-query-format.js +7 -3
  191. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +3 -1
  192. package/queries/catalog/static-slice-query/static-slice-query-format.js +11 -3
  193. package/queries/query-print.d.ts +1 -1
  194. package/queries/query-print.js +4 -4
  195. package/queries/query.d.ts +143 -2
  196. package/queries/query.js +5 -1
  197. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -2
  198. package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +5 -0
  199. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -2
  200. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +5 -0
  201. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +1 -1
  202. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +1 -1
  203. package/r-bridge/lang-4.x/ast/model/processing/fold.js +3 -1
  204. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +1 -1
  205. package/r-bridge/lang-4.x/ast/parser/main/internal/expression/normalize-expression.js +1 -1
  206. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +1 -1
  207. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +1 -1
  208. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -1
  209. package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -1
  210. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +1 -1
  211. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +1 -1
  212. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +1 -1
  213. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  214. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +4 -4
  215. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +26 -8
  216. package/r-bridge/retriever.js +2 -2
  217. package/search/flowr-search-builder.d.ts +31 -2
  218. package/search/flowr-search-builder.js +30 -0
  219. package/search/flowr-search.d.ts +7 -1
  220. package/search/search-executor/search-enrichers.d.ts +73 -0
  221. package/search/search-executor/search-enrichers.js +98 -0
  222. package/search/search-executor/search-generators.d.ts +7 -2
  223. package/search/search-executor/search-generators.js +21 -1
  224. package/search/search-executor/search-mappers.d.ts +19 -0
  225. package/search/search-executor/search-mappers.js +21 -0
  226. package/search/search-executor/search-transformer.d.ts +13 -1
  227. package/search/search-executor/search-transformer.js +11 -1
  228. package/slicing/criterion/collect-all.js +1 -1
  229. package/slicing/static/slice-call.js +13 -3
  230. package/statistics/features/supported/assignments/post-process.js +1 -1
  231. package/statistics/features/supported/defined-functions/post-process.js +2 -2
  232. package/statistics/features/supported/used-functions/post-process.js +1 -1
  233. package/statistics/features/supported/used-packages/post-process.js +2 -2
  234. package/statistics/features/supported/values/post-process.js +2 -2
  235. package/statistics/output/print-stats.js +2 -2
  236. package/statistics/summarizer/post-process/clusterer.d.ts +1 -1
  237. package/statistics/summarizer/post-process/clusterer.js +1 -1
  238. package/statistics/summarizer/post-process/histogram.js +3 -3
  239. package/statistics/summarizer/post-process/post-process-output.js +3 -3
  240. package/statistics/summarizer/second-phase/process.js +2 -2
  241. package/statistics/summarizer/summarizer.js +2 -2
  242. package/util/assert.js +36 -1
  243. package/util/cfg/cfg.d.ts +0 -80
  244. package/util/cfg/cfg.js +0 -549
  245. package/util/{arrays.d.ts → collections/arrays.d.ts} +1 -1
  246. package/util/{arrays.js → collections/arrays.js} +3 -3
  247. package/util/collections/set.js +17 -0
  248. package/util/diff-graph.d.ts +47 -0
  249. package/util/diff-graph.js +61 -0
  250. package/util/diff.d.ts +6 -6
  251. package/util/diff.js +1 -1
  252. package/util/mermaid/cfg.d.ts +9 -2
  253. package/util/mermaid/cfg.js +64 -12
  254. package/util/mermaid/dfg.d.ts +2 -1
  255. package/util/mermaid/dfg.js +26 -10
  256. package/util/mermaid/mermaid.d.ts +2 -0
  257. package/util/mermaid/mermaid.js +6 -0
  258. package/util/quads.js +1 -1
  259. package/util/schema.d.ts +1 -1
  260. package/util/schema.js +1 -1
  261. package/util/summarizer.js +1 -1
  262. package/util/{text.js → text/text.js} +1 -1
  263. package/util/{time.js → text/time.js} +1 -1
  264. package/util/version.js +1 -1
  265. package/dataflow/graph/diff.d.ts +0 -36
  266. package/util/cfg/happens-before.d.ts +0 -7
  267. package/util/cfg/visitor.d.ts +0 -9
  268. package/util/cfg/visitor.js +0 -30
  269. package/util/set.js +0 -31
  270. /package/util/{bimap.d.ts → collections/bimap.d.ts} +0 -0
  271. /package/util/{bimap.js → collections/bimap.js} +0 -0
  272. /package/util/{defaultmap.d.ts → collections/defaultmap.d.ts} +0 -0
  273. /package/util/{defaultmap.js → collections/defaultmap.js} +0 -0
  274. /package/util/{set.d.ts → collections/set.d.ts} +0 -0
  275. /package/util/{ansi.d.ts → text/ansi.d.ts} +0 -0
  276. /package/util/{ansi.js → text/ansi.js} +0 -0
  277. /package/util/{args.d.ts → text/args.d.ts} +0 -0
  278. /package/util/{args.js → text/args.js} +0 -0
  279. /package/util/{strings.d.ts → text/strings.d.ts} +0 -0
  280. /package/util/{strings.js → text/strings.js} +0 -0
  281. /package/util/{text.d.ts → text/text.d.ts} +0 -0
  282. /package/util/{time.d.ts → text/time.d.ts} +0 -0
@@ -22,32 +22,34 @@ function getText() {
22
22
  For the latest code coverage information, see [codecov.io](${doc_files_1.FlowrCodecovRef}),
23
23
  for the latest benchmark results, see the [benchmark results](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark) wiki page.
24
24
 
25
- - [Testing Suites](#testing-suites)
26
- - [Functionality Tests](#functionality-tests)
27
- - [Test Structure](#test-structure)
28
- - [Writing a Test](#writing-a-test)
29
- - [Running Only Some Tests](#running-only-some-tests)
30
- - [System Tests](#system-tests)
31
- - [Performance Tests](#performance-tests)
32
- - [Oh no, the tests are slow](#oh-no-the-tests-are-slow)
33
- - [Testing Within Your IDE](#testing-within-your-ide)
25
+ - [🏨 Testing Suites](#testing-suites)
26
+ - [🧪 Functionality Tests](#functionality-tests)
27
+ - [🏗️ Test Structure](#test-structure)
28
+ - [🏷️ Test Labels](#test-labels)
29
+ - [🖋️ Writing a Test](#writing-a-test)
30
+ - [🤏 Running Only Some Tests](#running-only-some-tests)
31
+ - [💽 System Tests](#system-tests)
32
+ - [💃 Performance Tests](#performance-tests)
33
+ - [📝 Testing Within Your IDE](#testing-within-your-ide)
34
34
  - [VS Code](#vs-code)
35
35
  - [Webstorm](#webstorm)
36
- - [CI Pipeline](#ci-pipeline)
37
- - [Linting](#linting)
36
+ - [🪈 CI Pipeline](#ci-pipeline)
37
+ - [🧹 Linting](#linting)
38
38
  - [Oh no, the linter fails](#oh-no-the-linter-fails)
39
39
  - [License Checker](#license-checker)
40
- - [Debugging](#debugging)
40
+ - [🐛 Debugging](#debugging)
41
41
  - [VS Code](#vs-code-1)
42
42
 
43
- ## Testing Suites
43
+ <a id='testing-suites'></a>
44
+ ## 🏨 Testing Suites
44
45
 
45
46
  Currently, flowR contains three testing suites: one for [functionality](#functionality-tests),
46
47
  one for [system tests](#system-tests), and one for [performance](#performance-tests). We explain each of them in the following.
47
48
  In addition to running those tests, you can use the more generalized \`npm run checkup\`.
48
49
  This command includes the construction of the docker image, the generation of the wiki pages, and the linter.
49
50
 
50
- ### Functionality Tests
51
+ <a id='functionality-tests'></a>
52
+ ### 🧪 Functionality Tests
51
53
 
52
54
  The functionality tests represent conventional unit (and depending on your terminology component/api) tests.
53
55
  We use [vitest](https://vitest.dev/) as our testing framework.
@@ -75,7 +77,8 @@ some tests may be skipped automatically as they do not apply to your current sys
75
77
  Each test can specify such requirements as part of the \`TestConfiguration\`, which is then used in the \`test.skipIf\` function of _vitest_.
76
78
  It is up to the [ci](#ci-pipeline) to run the tests on different systems to ensure that those tests run.
77
79
 
78
- #### Test Structure
80
+ <a id='test-structure'></a>
81
+ #### 🏗️ Test Structure
79
82
 
80
83
  All functionality tests are to be located under [test/functionality](${doc_files_1.RemoteFlowrFilePathBaseRef}/test/functionality).
81
84
 
@@ -94,15 +97,24 @@ to disable parallel execution for the respective test (otherwise, such tests are
94
97
  `
95
98
  })}
96
99
 
97
- #### Writing a Test
100
+ <a id='test-labels'></a>
101
+ #### 🏷️ Test Labels
98
102
 
99
- Currently, this is heavily dependent on what you want to test (normalization, dataflow, quad-export, …)
100
- and it is probably best to have a look at existing tests in that area to get an idea of what comfort functionality is available.
103
+ Generally, tests are [labeled](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/_helper/label.ts) according to the *flowR* capabilities they test.
101
104
 
102
- Generally, tests should be [labeled](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/_helper/label.ts) according to the *flowR* capabilities they test.
103
105
  The set of currently supported capabilities and their IDs can be found in ${(0, doc_files_1.getFilePathMd)('../r-bridge/data/data.ts')}.
106
+
104
107
  The resulting labels are used in the test report that is generated as part of the test output.
105
108
  They group tests by the capabilities they test and allow the report to display how many tests ensure that any given capability is properly supported.
109
+ The report can be found on the wiki's [capabilities page](${doc_files_1.FlowrWikiBaseRef}/Capabilities).
110
+
111
+ To add new labels, simply add them to the relevant section in ${(0, doc_files_1.getFilePathMd)('../r-bridge/data/data.ts')} as part of a pull request.
112
+
113
+ <a id='writing-a-test'></a>
114
+ #### 🖋️ Writing a Test
115
+
116
+ Currently, this is heavily dependent on what you want to test (normalization, dataflow, quad-export, …)
117
+ and it is probably best to have a look at existing tests in that area to get an idea of what comfort functionality is available.
106
118
 
107
119
  Various helper functions are available to ease in writing tests with common behaviors, like testing for dataflow, slicing or query results.
108
120
  These can be found in [the \`_helper\` subdirectory](${doc_files_1.RemoteFlowrFilePathBaseRef}test/functionality/_helper).
@@ -136,12 +148,14 @@ assertDataflow(label('without distractors', [...OperatorDatabase['<-'].capabilit
136
148
  );
137
149
  `)}
138
150
 
139
- #### Running Only Some Tests
151
+ <a id='running-only-some-tests'></a>
152
+ #### 🤏 Running Only Some Tests
140
153
 
141
154
  To run only some tests, vitest allows you to [filter](https://vitest.dev/guide/filtering.html) tests.
142
155
  Besides, you can use the watch mode (with \`npm run test\`) to only run tests that are affected by your changes.
143
156
 
144
- ### System Tests
157
+ <a id='system-tests'></a>
158
+ ### 💽 System Tests
145
159
 
146
160
  In contrast to the [functionality tests](#functionality-tests), the system tests use runners like the \`npm\` scripts
147
161
  to test the behavior of the whole system, for example, by running the CLI or the server.
@@ -154,9 +168,8 @@ with the [functionality tests](#functionality-tests)).
154
168
 
155
169
  Have a look at the [test/system-tests](${doc_files_1.RemoteFlowrFilePathBaseRef}test/system-tests) folder for more information.
156
170
 
157
-
158
-
159
- ### Performance Tests
171
+ <a id='performance-tests'></a>
172
+ ### 💃 Performance Tests
160
173
 
161
174
  The performance test suite of *flowR* uses several suites to check for variations in the required times for certain steps.
162
175
  Although we measure wall time in the CI (which is subject to rather large variations), it should give a rough idea *flowR*'s performance.
@@ -167,8 +180,8 @@ ${(0, doc_code_1.codeBlock)('shell', 'npm run performance-test')}
167
180
 
168
181
  See [test/performance](${doc_files_1.RemoteFlowrFilePathBaseRef}test/performance) for more information on the suites, how to run them, and their results. If you are interested in the results of the benchmarks, see [here](${doc_files_1.FlowrSiteBaseRef}/wiki/stats/benchmark).
169
182
 
170
-
171
- ### Testing Within Your IDE
183
+ <a id='testing-within-your-ide'></a>
184
+ ### 📝 Testing Within Your IDE
172
185
 
173
186
  #### VS Code
174
187
 
@@ -188,8 +201,8 @@ To get started, install the [vitest Extension](https://marketplace.visualstudio.
188
201
 
189
202
  Please follow the official guide [here](https://www.jetbrains.com/help/webstorm/vitest.html).
190
203
 
191
-
192
- ## CI Pipeline
204
+ <a id='ci-pipeline'></a>
205
+ ## 🪈 CI Pipeline
193
206
 
194
207
  We have several workflows defined in [.github/workflows](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/).
195
208
  We explain the most important workflows in the following:
@@ -203,8 +216,9 @@ We explain the most important workflows in the following:
203
216
  - deploying the documentation to [GitHub Pages](${doc_files_1.FlowrSiteBaseRef}/doc/)
204
217
  - [release.yaml](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/release.yaml) is responsible for creating a new release, only to be run by repository owners. Furthermore, it adds the new docker image to [docker hub](${doc_files_1.FlowrDockerRef}).
205
218
  - [broken-links-and-wiki.yaml](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/workflows/broken-links-and-wiki.yaml) repeatedly tests that all links are not dead!
206
-
207
- ## Linting
219
+
220
+ <a id='linting'></a>
221
+ ## 🧹 Linting
208
222
 
209
223
  There are two linting scripts.
210
224
  The main one:
@@ -222,21 +236,23 @@ eslint can automatically fix several linting problems[](https://eslint.org/docs/
222
236
  So you may be fine by just running:
223
237
 
224
238
  ${(0, doc_code_1.codeBlock)('shell', 'npm run lint-local -- --fix')}
225
-
226
- ### Oh no, the linter fails
239
+
240
+ <a id='oh-no-the-linter-fails'></a>
241
+ ### 💥 Oh no, the linter fails
227
242
 
228
243
  By now, the rules should be rather stable and so, if the linter fails,
229
244
  it is usually best if you (when necessary) read the respective description and fix the respective problem.
230
245
  Rules in this project cover general JavaScript issues [using regular ESLint](https://eslint.org/docs/latest/rules), TypeScript-specific issues [using typescript-eslint](https://typescript-eslint.io/rules/), and code formatting [with ESLint Stylistic](https://eslint.style/packages/default#rules).
231
246
 
232
247
  However, in case you think that the linter is wrong, please do not hesitate to open a [new issue](${doc_files_1.FlowrGithubBaseRef}/flowr/issues/new/choose).
233
-
234
- ### License Checker
248
+
249
+ <a id='license-checker'></a>
250
+ ### 🪪 License Checker
235
251
 
236
252
  *flowR* is licensed under the [GPLv3 License](${doc_files_1.FlowrGithubBaseRef}/flowr/blob/main/LICENSE) requiring us to only rely on [compatible licenses](https://www.gnu.org/licenses/license-list.en.html). For now, this list is hardcoded as part of the npm [\`license-compat\`](${doc_files_1.RemoteFlowrFilePathBaseRef}/package.json) script so it can very well be that a new dependency you add causes the checker to fail &mdash; *even though it is compatible*. In that case, please either open a [new issue](${doc_files_1.FlowrGithubBaseRef}/flowr/issues/new/choose) or directly add the license to the list (including a reference to why it is compatible).
237
253
 
238
-
239
- ## Debugging
254
+ <a id='debugging'></a>
255
+ ## 🐛 Debugging
240
256
  ### VS Code
241
257
  When working with VS Code, you can attach a debugger to the REPL. This works automatically by running the \`Start Debugging\` command (\`F5\` by default).
242
258
  You can also set the \`Auto Attach Filter\` setting to automatically attach the debugger, when running \`npm run flowr\`.
@@ -12,7 +12,7 @@ const doc_types_1 = require("./doc-util/doc-types");
12
12
  const path_1 = __importDefault(require("path"));
13
13
  const doc_files_1 = require("./doc-util/doc-files");
14
14
  const doc_cli_option_1 = require("./doc-util/doc-cli-option");
15
- const time_1 = require("../util/time");
15
+ const time_1 = require("../util/text/time");
16
16
  const doc_structure_1 = require("./doc-util/doc-structure");
17
17
  const pipeline_executor_1 = require("../core/pipeline-executor");
18
18
  const retriever_1 = require("../r-bridge/retriever");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const log_1 = require("../../test/functionality/_helper/log");
4
+ const doc_files_1 = require("./doc-util/doc-files");
5
+ const doc_code_1 = require("./doc-util/doc-code");
6
+ const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
7
+ function print() {
8
+ return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'developer onboarding process' })}
9
+
10
+ To get started developing on *flowR*, we recommend carefully reading the following pages:
11
+ - 💻 [Setting up the *flowR* development environment](${doc_files_1.FlowrWikiBaseRef}/Setup#%EF%B8%8F-building-from-scratch).\
12
+ This page explains how to install **R** and **Node.js**.
13
+ - 💖 [Contributing guidelines](${doc_files_1.FlowrGithubBaseRef}/flowr/tree/main/.github/CONTRIBUTING.md).\
14
+ This page also includes information about how to set up **git-lfs** and several **git hooks**.
15
+
16
+ ## ⌛ TL;DR
17
+
18
+ The most important steps to get the *flowR* development environment set up (after installing **R** and **Node.js**) can be seen below. For convenience, they can be executed all at once using the following command:
19
+ ${(0, doc_code_1.codeBlock)('shell', 'npm run setup:dev')}
20
+
21
+ If you want to execute the steps manually, please follow the instructions below:
22
+
23
+ ${(0, doc_code_1.codeBlock)('shell', `
24
+ # Installing git-lfs for your current user (if you haven't already)
25
+ git lfs install
26
+ # Cloning the repository
27
+ git clone https://github.com/flowr-analysis/flowr.git
28
+ # Installing dependencies
29
+ npm ci
30
+ # Configuring git hooks
31
+ git config --local core.hooksPath .githooks/
32
+ # Test if the git hooks are working correctly
33
+ # Running this command should lint the code
34
+ git push --dry-run
35
+ `)}
36
+ `.trim();
37
+ }
38
+ if (require.main === module) {
39
+ (0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
40
+ console.log(print());
41
+ }
42
+ //# sourceMappingURL=print-onboarding-wiki.js.map
@@ -10,7 +10,7 @@ const query_1 = require("../queries/query");
10
10
  const doc_files_1 = require("./doc-util/doc-files");
11
11
  const doc_query_1 = require("./doc-util/doc-query");
12
12
  const schema_1 = require("../util/schema");
13
- const ansi_1 = require("../util/ansi");
13
+ const ansi_1 = require("../util/text/ansi");
14
14
  const call_context_query_executor_1 = require("../queries/catalog/call-context-query/call-context-query-executor");
15
15
  const compound_query_1 = require("../queries/virtual-query/compound-query");
16
16
  const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
@@ -238,6 +238,26 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
238
238
  `;
239
239
  }
240
240
  });
241
+ (0, doc_query_1.registerQueryDocumentation)('origin', {
242
+ name: 'Origin Query',
243
+ type: 'active',
244
+ shortDescription: 'Retrieve the origin of a variable, function call, ...',
245
+ functionName: search_query_executor_1.executeSearch.name,
246
+ functionFile: '../queries/catalog/origin-query/origin-query-executor.ts',
247
+ buildExplanation: async (shell) => {
248
+ const exampleCode = 'x <- 1\nprint(x)';
249
+ return `
250
+ With this query you can use flowR's origin tracking to find out the read origins of a variable,
251
+ the functions called by a call, and more.
252
+
253
+ Using the example code \`${exampleCode}\` (with the \`print(x)\` in the second line), the following query returns the origins of \`x\` in the code:
254
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
255
+ type: 'origin',
256
+ criterion: '2@x'
257
+ }], { showCode: true })}
258
+ `;
259
+ }
260
+ });
241
261
  (0, doc_query_1.registerQueryDocumentation)('search', {
242
262
  name: 'Search Query',
243
263
  type: 'active',
@@ -23,9 +23,12 @@ async function getText(shell) {
23
23
  [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/eagleoutice/flowr?logo=docker&logoColor=white&label=dockerhub)](${doc_files_1.FlowrDockerRef})
24
24
  [![latest tag](https://badgen.net/github/tag/flowr-analysis/flowr?label=latest&color=purple)](${doc_files_1.FlowrGithubBaseRef}/flowr/releases/latest)
25
25
  [![Marketplace](https://badgen.net/vs-marketplace/v/code-inspect.vscode-flowr)](${doc_files_1.FlowrVsCode})
26
+ [![Marketplace](https://badgen.net/open-vsx/version/code-inspect/vscode-flowr?label=Positron/Open%20VSX)](${doc_files_1.FlowrPositron})
26
27
  [![DOI](https://zenodo.org/badge/624819038.svg)](https://zenodo.org/doi/10.5281/zenodo.13319290)
27
28
 
28
- _flowR_ is a sophisticated, static [dataflow analyzer](https://en.wikipedia.org/wiki/Data-flow_analysis) for the [R programming language](https://www.r-project.org/).
29
+ _flowR_ is a sophisticated, static [dataflow analyzer](https://en.wikipedia.org/wiki/Data-flow_analysis) for the [R programming language](https://www.r-project.org/),
30
+ available for [VSCode](${doc_files_1.FlowrVsCode}), [Positron](${doc_files_1.FlowrPositron}), [RStudio](${doc_files_1.FlowrGithubBaseRef}/rstudio-addin-flowr),
31
+ and [Docker](${doc_files_1.FlowrDockerRef}).
29
32
  It offers a wide variety of features, for example:
30
33
 
31
34
  * 🍕 **program slicing**\\
@@ -90,12 +93,16 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(shell, (0, doc_files_1.getFileContent
90
93
 
91
94
  If you want to use flowR and the features it provides, feel free to check out the:
92
95
 
93
- - [Visual Studio Code extension](${doc_files_1.FlowrVsCode}): provides access to flowR directly in VS Code (or [vscode.dev](https://vscode.dev/))
96
+ - [Visual Studio Code](${doc_files_1.FlowrVsCode})/[Positron](${doc_files_1.FlowrPositron}): provides access to flowR directly in VS Code and Positron (or [vscode.dev](https://vscode.dev/))
94
97
  - [RStudio Addin](${doc_files_1.FlowrGithubBaseRef}/rstudio-addin-flowr): integrates flowR into [RStudio](https://posit.co/downloads/)
95
98
  - [R package](${doc_files_1.FlowrGithubBaseRef}/flowr-r-adapter): use flowR in your R scripts
96
99
  - [Docker image](${doc_files_1.FlowrDockerRef}): run flowR in a container, this also includes [flowR's server](${doc_files_1.FlowrWikiBaseRef}/Interface#communicating-with-the-server)
97
100
  - [NPM package](${doc_files_1.FlowrNpmRef}): include flowR in your TypeScript and JavaScript projects
98
101
 
102
+
103
+ If you are already using flowR and want to give feedback, please consider filling out our [feedback form](https://docs.google.com/forms/d/e/1FAIpQLScKFhgnh9LGVU7QzqLvFwZe1oiv_5jNhkIO-G-zND0ppqsMxQ/viewform).
104
+
105
+
99
106
  ## ⭐ Getting Started
100
107
 
101
108
  To get started with _flowR_ and its features, please check out the [Overview](${doc_files_1.FlowrGithubBaseRef}/flowr/wiki/Overview) wiki page.
@@ -121,7 +128,7 @@ as well as the deployed [code documentation](https://flowr-analysis.github.io/fl
121
128
 
122
129
  ## 🚀 Contributing
123
130
 
124
- We welcome every contribution! Please check out the [contributing guidelines](${doc_files_1.FlowrGithubBaseRef}/flowr/tree/main/.github/CONTRIBUTING.md) for more information.
131
+ We welcome every contribution! Please check out the [developer onboarding](${doc_files_1.FlowrWikiBaseRef}/Onboarding) section in the wiki for all the information you will need.
125
132
 
126
133
  ### Contributors
127
134
 
@@ -0,0 +1,9 @@
1
+ import type { LintingRuleConfig, LintingRuleNames } from './linter-rules';
2
+ import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
3
+ import type { DataflowInformation } from '../dataflow/info';
4
+ import type { LintingResults } from './linter-format';
5
+ import type { DeepPartial } from 'ts-essentials';
6
+ export declare function executeLintingRule<Name extends LintingRuleNames>(ruleName: Name, input: {
7
+ normalize: NormalizedAst;
8
+ dataflow: DataflowInformation;
9
+ }, config?: DeepPartial<LintingRuleConfig<Name>>): LintingResults<Name>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeLintingRule = executeLintingRule;
4
+ const linter_rules_1 = require("./linter-rules");
5
+ const flowr_search_executor_1 = require("../search/flowr-search-executor");
6
+ const flowr_search_1 = require("../search/flowr-search");
7
+ function executeLintingRule(ruleName, input, config) {
8
+ const rule = linter_rules_1.LintingRules[ruleName];
9
+ const fullConfig = { ...rule.defaultConfig, ...config };
10
+ const ruleSearch = rule.createSearch(fullConfig, input);
11
+ const searchStart = Date.now();
12
+ const searchResult = (0, flowr_search_executor_1.runSearch)(ruleSearch, input);
13
+ const searchTime = Date.now() - searchStart;
14
+ const processStart = Date.now();
15
+ const result = rule.processSearchResult(new flowr_search_1.FlowrSearchElements(searchResult), fullConfig, input);
16
+ const processTime = Date.now() - processStart;
17
+ return {
18
+ ...result,
19
+ '.meta': {
20
+ ...result['.meta'],
21
+ searchTimeMs: searchTime,
22
+ processTimeMs: processTime
23
+ }
24
+ };
25
+ }
26
+ //# sourceMappingURL=linter-executor.js.map
@@ -0,0 +1,65 @@
1
+ import type { FlowrSearchLike } from '../search/flowr-search-builder';
2
+ import type { FlowrSearchElement, FlowrSearchElements } from '../search/flowr-search';
3
+ import type { MergeableRecord } from '../util/objects';
4
+ import type { GeneratorNames } from '../search/search-executor/search-generators';
5
+ import type { TransformerNames } from '../search/search-executor/search-transformer';
6
+ import type { NormalizedAst, ParentInformation } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
7
+ import type { LintingRuleConfig, LintingRuleMetadata, LintingRuleNames, LintingRuleResult } from './linter-rules';
8
+ import type { DataflowInformation } from '../dataflow/info';
9
+ import type { DeepPartial } from 'ts-essentials';
10
+ /**
11
+ * The base interface for a linting rule, which contains all of its relevant settings.
12
+ * The registry of valid linting rules is stored in {@link LintingRules}.
13
+ */
14
+ export interface LintingRule<Result extends LintingResult, Metadata extends MergeableRecord, Config extends MergeableRecord = never, Info = ParentInformation, Elements extends FlowrSearchElement<Info>[] = FlowrSearchElement<Info>[]> {
15
+ /**
16
+ * Creates a flowR search that will then be executed and whose results will be passed to {@link processSearchResult}.
17
+ * In the future, additional optimizations and transformations may be applied to the search between this function and {@link processSearchResult}.
18
+ */
19
+ readonly createSearch: (config: Config, data: {
20
+ normalize: NormalizedAst;
21
+ dataflow: DataflowInformation;
22
+ }) => FlowrSearchLike<Info, GeneratorNames, TransformerNames[], FlowrSearchElements<Info, Elements>>;
23
+ /**
24
+ * Processes the search results of the search created through {@link createSearch}.
25
+ * This function is expected to return the linting results from this rule for the given search, ie usually the given script file.
26
+ */
27
+ readonly processSearchResult: (elements: FlowrSearchElements<Info, Elements>, config: Config, data: {
28
+ normalize: NormalizedAst;
29
+ dataflow: DataflowInformation;
30
+ }) => {
31
+ results: Result[];
32
+ '.meta': Metadata;
33
+ };
34
+ /**
35
+ * A function used to pretty-print the given linting result.
36
+ * By default, the {@link LintingResult#certainty} is automatically printed alongside this information.
37
+ */
38
+ readonly prettyPrint: (result: Result, metadata: Metadata) => string;
39
+ /**
40
+ * The default config for this linting rule.
41
+ * The default config is combined with the user config when executing the rule.
42
+ */
43
+ readonly defaultConfig: NoInfer<Config>;
44
+ }
45
+ /**
46
+ * A linting result for a single linting rule match.
47
+ */
48
+ export interface LintingResult {
49
+ readonly certainty: LintingCertainty;
50
+ }
51
+ export interface ConfiguredLintingRule<Name extends LintingRuleNames = LintingRuleNames> {
52
+ readonly name: Name;
53
+ readonly config: DeepPartial<LintingRuleConfig<Name>>;
54
+ }
55
+ export interface LintingResults<Name extends LintingRuleNames> {
56
+ results: LintingRuleResult<Name>[];
57
+ '.meta': LintingRuleMetadata<Name> & {
58
+ readonly searchTimeMs: number;
59
+ readonly processTimeMs: number;
60
+ };
61
+ }
62
+ export declare enum LintingCertainty {
63
+ Maybe = "maybe",
64
+ Definitely = "definitely"
65
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LintingCertainty = void 0;
4
+ var LintingCertainty;
5
+ (function (LintingCertainty) {
6
+ LintingCertainty["Maybe"] = "maybe";
7
+ LintingCertainty["Definitely"] = "definitely";
8
+ })(LintingCertainty || (exports.LintingCertainty = LintingCertainty = {}));
9
+ //# sourceMappingURL=linter-format.js.map
@@ -0,0 +1,42 @@
1
+ import type { LintingRule } from './linter-format';
2
+ /**
3
+ * The registry of currently supported linting rules.
4
+ * A linting rule can be executed on a dataflow pipeline result using {@link executeLintingRule}.
5
+ */
6
+ export declare const LintingRules: {
7
+ readonly 'deprecated-functions': {
8
+ readonly createSearch: (_config: import("./rules/1-deprecated-functions").DeprecatedFunctionsConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["with"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/search-executor/search-enrichers").EnrichedFlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
9
+ 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/1-deprecated-functions").DeprecatedFunctionsConfig) => {
10
+ results: {
11
+ certainty: import("./linter-format").LintingCertainty.Definitely;
12
+ function: import("../dataflow/environments/identifier").Identifier;
13
+ range: import("../util/range").SourceRange;
14
+ }[];
15
+ '.meta': import("./rules/1-deprecated-functions").DeprecatedFunctionsMetadata;
16
+ };
17
+ readonly prettyPrint: (result: import("./rules/1-deprecated-functions").DeprecatedFunctionsResult) => string;
18
+ readonly defaultConfig: {
19
+ readonly deprecatedFunctions: ["all_equal", "arrange_all", "distinct_all", "filter_all", "group_by_all", "summarise_all", "mutate_all", "select_all", "vars", "all_vars", "id", "failwith", "select_vars", "rename_vars", "select_var", "current_vars", "bench_tbls", "compare_tbls", "compare_tbls2", "eval_tbls", "eval_tbls2", "location", "changes", "combine", "do", "funs", "add_count_", "add_tally_", "arrange_", "count_", "distinct_", "do_", "filter_", "funs_", "group_by_", "group_indices_", "mutate_", "tally_", "transmute_", "rename_", "rename_vars_", "select_", "select_vars_", "slice_", "summarise_", "summarize_", "summarise_each", "src_local", "tbl_df", "add_rownames", "group_nest", "group_split", "with_groups", "nest_by", "progress_estimated", "recode", "sample_n", "top_n", "transmute", "fct_explicit_na", "aes_", "aes_auto", "annotation_logticks", "is.Coord", "coord_flip", "coord_map", "is.facet", "fortify", "is.ggproto", "guide_train", "is.ggplot", "qplot", "is.theme", "gg_dep", "liply", "isplit2", "list_along", "cross", "invoke", "at_depth", "prepend", "rerun", "splice", "`%@%`", "rbernoulli", "rdunif", "when", "update_list", "map_raw", "accumulate", "reduce_right", "flatten", "map_dfr", "as_vector", "transpose", "melt_delim", "melt_fwf", "melt_table", "read_table2", "str_interp", "as_tibble", "data_frame", "tibble_", "data_frame_", "lst_", "as_data_frame", "as.tibble", "frame_data", "trunc_mat", "is.tibble", "tidy_names", "set_tidy_names", "repair_names", "extract_numeric", "complete_", "drop_na_", "expand_", "crossing_", "nesting_", "extract_", "fill_", "gather_", "nest_", "separate_rows_", "separate_", "spread_", "unite_", "unnest_", "extract", "gather", "nest_legacy", "separate_rows", "separate", "spread"];
20
+ };
21
+ };
22
+ readonly 'file-path-validity': {
23
+ readonly createSearch: (config: import("./rules/2-file-path-validity").FilePathValidityConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"from-query", [], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElementFromQuery<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
24
+ readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElementFromQuery<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/2-file-path-validity").FilePathValidityConfig, data: {
25
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
26
+ dataflow: import("../dataflow/info").DataflowInformation;
27
+ }) => {
28
+ results: import("./rules/2-file-path-validity").FilePathValidityResult[];
29
+ ".meta": import("./rules/2-file-path-validity").FilePathValidityMetadata;
30
+ };
31
+ readonly prettyPrint: (result: import("./rules/2-file-path-validity").FilePathValidityResult) => string;
32
+ readonly defaultConfig: {
33
+ readonly additionalReadFunctions: [];
34
+ readonly additionalWriteFunctions: [];
35
+ readonly includeUnknown: false;
36
+ };
37
+ };
38
+ };
39
+ export type LintingRuleNames = keyof typeof LintingRules;
40
+ export type LintingRuleMetadata<Name extends LintingRuleNames> = typeof LintingRules[Name] extends LintingRule<infer _Result, infer Metadata, infer _Config, infer _Info, infer _Elements> ? Metadata : never;
41
+ export type LintingRuleResult<Name extends LintingRuleNames> = typeof LintingRules[Name] extends LintingRule<infer Result, infer _Metadata, infer _Config, infer _Info, infer _Elements> ? Result : never;
42
+ export type LintingRuleConfig<Name extends LintingRuleNames> = typeof LintingRules[Name] extends LintingRule<infer _Result, infer _Metadata, infer Config, infer _Info, infer _Elements> ? Config : never;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LintingRules = void 0;
4
+ const _1_deprecated_functions_1 = require("./rules/1-deprecated-functions");
5
+ const _2_file_path_validity_1 = require("./rules/2-file-path-validity");
6
+ /**
7
+ * The registry of currently supported linting rules.
8
+ * A linting rule can be executed on a dataflow pipeline result using {@link executeLintingRule}.
9
+ */
10
+ exports.LintingRules = {
11
+ 'deprecated-functions': _1_deprecated_functions_1.R1_DEPRECATED_FUNCTIONS,
12
+ 'file-path-validity': _2_file_path_validity_1.R2_FILE_PATH_VALIDITY
13
+ };
14
+ //# sourceMappingURL=linter-rules.js.map
@@ -0,0 +1,34 @@
1
+ import type { LintingResult } from '../linter-format';
2
+ import { LintingCertainty } from '../linter-format';
3
+ import type { MergeableRecord } from '../../util/objects';
4
+ import type { SourceRange } from '../../util/range';
5
+ import type { Identifier } from '../../dataflow/environments/identifier';
6
+ export interface DeprecatedFunctionsResult extends LintingResult {
7
+ function: string;
8
+ range: SourceRange;
9
+ }
10
+ export interface DeprecatedFunctionsConfig extends MergeableRecord {
11
+ /**
12
+ * The list of function names that should be marked as deprecated.
13
+ */
14
+ deprecatedFunctions: string[];
15
+ }
16
+ export interface DeprecatedFunctionsMetadata extends MergeableRecord {
17
+ totalRelevant: number;
18
+ totalNotDeprecated: number;
19
+ }
20
+ export declare const R1_DEPRECATED_FUNCTIONS: {
21
+ readonly createSearch: (_config: DeprecatedFunctionsConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["with"], import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/flowr-search").FlowrSearchElements<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../search/search-executor/search-enrichers").EnrichedFlowrSearchElement<import("../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
22
+ 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: DeprecatedFunctionsConfig) => {
23
+ results: {
24
+ certainty: LintingCertainty.Definitely;
25
+ function: Identifier;
26
+ range: SourceRange;
27
+ }[];
28
+ '.meta': DeprecatedFunctionsMetadata;
29
+ };
30
+ readonly prettyPrint: (result: DeprecatedFunctionsResult) => string;
31
+ readonly defaultConfig: {
32
+ readonly deprecatedFunctions: ["all_equal", "arrange_all", "distinct_all", "filter_all", "group_by_all", "summarise_all", "mutate_all", "select_all", "vars", "all_vars", "id", "failwith", "select_vars", "rename_vars", "select_var", "current_vars", "bench_tbls", "compare_tbls", "compare_tbls2", "eval_tbls", "eval_tbls2", "location", "changes", "combine", "do", "funs", "add_count_", "add_tally_", "arrange_", "count_", "distinct_", "do_", "filter_", "funs_", "group_by_", "group_indices_", "mutate_", "tally_", "transmute_", "rename_", "rename_vars_", "select_", "select_vars_", "slice_", "summarise_", "summarize_", "summarise_each", "src_local", "tbl_df", "add_rownames", "group_nest", "group_split", "with_groups", "nest_by", "progress_estimated", "recode", "sample_n", "top_n", "transmute", "fct_explicit_na", "aes_", "aes_auto", "annotation_logticks", "is.Coord", "coord_flip", "coord_map", "is.facet", "fortify", "is.ggproto", "guide_train", "is.ggplot", "qplot", "is.theme", "gg_dep", "liply", "isplit2", "list_along", "cross", "invoke", "at_depth", "prepend", "rerun", "splice", "`%@%`", "rbernoulli", "rdunif", "when", "update_list", "map_raw", "accumulate", "reduce_right", "flatten", "map_dfr", "as_vector", "transpose", "melt_delim", "melt_fwf", "melt_table", "read_table2", "str_interp", "as_tibble", "data_frame", "tibble_", "data_frame_", "lst_", "as_data_frame", "as.tibble", "frame_data", "trunc_mat", "is.tibble", "tidy_names", "set_tidy_names", "repair_names", "extract_numeric", "complete_", "drop_na_", "expand_", "crossing_", "nesting_", "extract_", "fill_", "gather_", "nest_", "separate_rows_", "separate_", "spread_", "unite_", "unnest_", "extract", "gather", "nest_legacy", "separate_rows", "separate", "spread"];
33
+ };
34
+ };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.R1_DEPRECATED_FUNCTIONS = void 0;
4
+ const linter_format_1 = require("../linter-format");
5
+ const flowr_search_builder_1 = require("../../search/flowr-search-builder");
6
+ const dfg_1 = require("../../util/mermaid/dfg");
7
+ const search_enrichers_1 = require("../../search/search-executor/search-enrichers");
8
+ exports.R1_DEPRECATED_FUNCTIONS = {
9
+ createSearch: (_config) => flowr_search_builder_1.Q.all().with(search_enrichers_1.Enrichment.CallTargets),
10
+ processSearchResult: (elements, config) => {
11
+ const metadata = {
12
+ totalRelevant: 0,
13
+ totalNotDeprecated: 0
14
+ };
15
+ return {
16
+ results: elements.getElements()
17
+ .flatMap(element => {
18
+ const targets = (0, search_enrichers_1.enrichmentContent)(element, search_enrichers_1.Enrichment.CallTargets).targets;
19
+ // if there is a call target that is not built-in (ie a custom function), we don't want to mark it as deprecated
20
+ // eventually we'd want to solve this with an argument to the CallTargets enrichment like satisfiesCallTargets does!
21
+ if (targets.some(t => typeof t !== 'string')) {
22
+ return [];
23
+ }
24
+ return targets.map(target => {
25
+ metadata.totalRelevant++;
26
+ return {
27
+ range: element.node.info.fullRange,
28
+ target: target
29
+ };
30
+ });
31
+ })
32
+ .filter(element => {
33
+ if (config.deprecatedFunctions.includes(element.target)) {
34
+ return true;
35
+ }
36
+ else {
37
+ metadata.totalNotDeprecated++;
38
+ return false;
39
+ }
40
+ })
41
+ .map(element => ({
42
+ certainty: linter_format_1.LintingCertainty.Definitely,
43
+ function: element.target,
44
+ range: element.range
45
+ })),
46
+ '.meta': metadata
47
+ };
48
+ },
49
+ prettyPrint: result => `Function ${result.function} at ${(0, dfg_1.formatRange)(result.range)}`,
50
+ defaultConfig: {
51
+ deprecatedFunctions: ['all_equal', 'arrange_all', 'distinct_all', 'filter_all', 'group_by_all', 'summarise_all', 'mutate_all', 'select_all', 'vars', 'all_vars', 'id', 'failwith', 'select_vars', 'rename_vars', 'select_var', 'current_vars', 'bench_tbls', 'compare_tbls', 'compare_tbls2', 'eval_tbls', 'eval_tbls2', 'location', 'changes', 'combine', 'do', 'funs', 'add_count_', 'add_tally_', 'arrange_', 'count_', 'distinct_', 'do_', 'filter_', 'funs_', 'group_by_', 'group_indices_', 'mutate_', 'tally_', 'transmute_', 'rename_', 'rename_vars_', 'select_', 'select_vars_', 'slice_', 'summarise_', 'summarize_', 'summarise_each', 'src_local', 'tbl_df', 'add_rownames', 'group_nest', 'group_split', 'with_groups', 'nest_by', 'progress_estimated', 'recode', 'sample_n', 'top_n', 'transmute', 'fct_explicit_na', 'aes_', 'aes_auto', 'annotation_logticks', 'is.Coord', 'coord_flip', 'coord_map', 'is.facet', 'fortify', 'is.ggproto', 'guide_train', 'is.ggplot', 'qplot', 'is.theme', 'gg_dep', 'liply', 'isplit2', 'list_along', 'cross', 'invoke', 'at_depth', 'prepend', 'rerun', 'splice', '`%@%`', 'rbernoulli', 'rdunif', 'when', 'update_list', 'map_raw', 'accumulate', 'reduce_right', 'flatten', 'map_dfr', 'as_vector', 'transpose', 'melt_delim', 'melt_fwf', 'melt_table', 'read_table2', 'str_interp', 'as_tibble', 'data_frame', 'tibble_', 'data_frame_', 'lst_', 'as_data_frame', 'as.tibble', 'frame_data', 'trunc_mat', 'is.tibble', 'tidy_names', 'set_tidy_names', 'repair_names', 'extract_numeric', 'complete_', 'drop_na_', 'expand_', 'crossing_', 'nesting_', 'extract_', 'fill_', 'gather_', 'nest_', 'separate_rows_', 'separate_', 'spread_', 'unite_', 'unnest_', 'extract', 'gather', 'nest_legacy', 'separate_rows', 'separate', 'spread',]
52
+ }
53
+ };
54
+ //# sourceMappingURL=1-deprecated-functions.js.map