@eagleoutice/flowr 2.2.15 → 2.3.0

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 (255) hide show
  1. package/README.md +226 -6
  2. package/abstract-interpretation/data-frame/absint-info.d.ts +109 -0
  3. package/abstract-interpretation/data-frame/absint-info.js +31 -0
  4. package/abstract-interpretation/data-frame/absint-visitor.d.ts +59 -0
  5. package/abstract-interpretation/data-frame/absint-visitor.js +173 -0
  6. package/abstract-interpretation/data-frame/domain.d.ts +107 -0
  7. package/abstract-interpretation/data-frame/domain.js +315 -0
  8. package/abstract-interpretation/data-frame/mappers/access-mapper.d.ts +17 -0
  9. package/abstract-interpretation/data-frame/mappers/access-mapper.js +166 -0
  10. package/abstract-interpretation/data-frame/mappers/arguments.d.ts +117 -0
  11. package/abstract-interpretation/data-frame/mappers/arguments.js +188 -0
  12. package/abstract-interpretation/data-frame/mappers/assignment-mapper.d.ts +20 -0
  13. package/abstract-interpretation/data-frame/mappers/assignment-mapper.js +34 -0
  14. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +261 -0
  15. package/abstract-interpretation/data-frame/mappers/function-mapper.js +1219 -0
  16. package/abstract-interpretation/data-frame/mappers/replacement-mapper.d.ts +12 -0
  17. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +206 -0
  18. package/abstract-interpretation/data-frame/resolve-args.d.ts +42 -0
  19. package/abstract-interpretation/data-frame/resolve-args.js +118 -0
  20. package/abstract-interpretation/data-frame/semantics.d.ts +213 -0
  21. package/abstract-interpretation/data-frame/semantics.js +366 -0
  22. package/abstract-interpretation/data-frame/shape-inference.d.ts +38 -0
  23. package/abstract-interpretation/data-frame/shape-inference.js +117 -0
  24. package/benchmark/slicer.d.ts +18 -2
  25. package/benchmark/slicer.js +143 -5
  26. package/benchmark/stats/print.js +123 -45
  27. package/benchmark/stats/size-of.d.ts +7 -0
  28. package/benchmark/stats/size-of.js +1 -0
  29. package/benchmark/stats/stats.d.ts +30 -1
  30. package/benchmark/stats/stats.js +4 -2
  31. package/benchmark/summarizer/data.d.ts +33 -2
  32. package/benchmark/summarizer/first-phase/input.js +5 -1
  33. package/benchmark/summarizer/first-phase/process.d.ts +2 -1
  34. package/benchmark/summarizer/first-phase/process.js +49 -3
  35. package/benchmark/summarizer/second-phase/process.js +101 -3
  36. package/cli/benchmark-app.d.ts +2 -0
  37. package/cli/benchmark-app.js +5 -1
  38. package/cli/benchmark-helper-app.d.ts +2 -0
  39. package/cli/benchmark-helper-app.js +13 -8
  40. package/cli/common/options.js +4 -0
  41. package/cli/export-quads-app.js +2 -1
  42. package/cli/flowr.js +58 -57
  43. package/cli/repl/commands/repl-cfg.js +13 -13
  44. package/cli/repl/commands/repl-commands.js +2 -2
  45. package/cli/repl/commands/repl-dataflow.js +10 -10
  46. package/cli/repl/commands/repl-execute.d.ts +2 -3
  47. package/cli/repl/commands/repl-execute.js +4 -4
  48. package/cli/repl/commands/repl-lineage.js +4 -4
  49. package/cli/repl/commands/repl-main.d.ts +12 -1
  50. package/cli/repl/commands/repl-normalize.js +6 -6
  51. package/cli/repl/commands/repl-parse.js +2 -2
  52. package/cli/repl/commands/repl-query.js +9 -9
  53. package/cli/repl/commands/repl-version.js +1 -1
  54. package/cli/repl/core.d.ts +5 -2
  55. package/cli/repl/core.js +10 -8
  56. package/cli/repl/server/connection.d.ts +3 -1
  57. package/cli/repl/server/connection.js +7 -5
  58. package/cli/repl/server/server.d.ts +3 -2
  59. package/cli/repl/server/server.js +4 -2
  60. package/cli/script-core/statistics-core.d.ts +2 -1
  61. package/cli/script-core/statistics-core.js +2 -2
  62. package/cli/script-core/statistics-helper-core.d.ts +2 -1
  63. package/cli/script-core/statistics-helper-core.js +5 -4
  64. package/cli/slicer-app.js +4 -2
  65. package/cli/statistics-app.js +2 -1
  66. package/cli/statistics-helper-app.js +2 -1
  67. package/config.d.ts +43 -10
  68. package/config.js +47 -43
  69. package/control-flow/cfg-dead-code.js +45 -2
  70. package/control-flow/cfg-simplification.d.ts +2 -0
  71. package/control-flow/control-flow-graph.d.ts +2 -0
  72. package/control-flow/control-flow-graph.js +8 -0
  73. package/control-flow/dfg-cfg-guided-visitor.d.ts +5 -3
  74. package/control-flow/dfg-cfg-guided-visitor.js +15 -4
  75. package/control-flow/extract-cfg.d.ts +4 -2
  76. package/control-flow/extract-cfg.js +4 -3
  77. package/control-flow/semantic-cfg-guided-visitor.d.ts +20 -2
  78. package/control-flow/semantic-cfg-guided-visitor.js +24 -4
  79. package/core/pipeline-executor.d.ts +4 -1
  80. package/core/pipeline-executor.js +6 -5
  81. package/core/steps/all/core/10-normalize.d.ts +2 -0
  82. package/core/steps/all/core/10-normalize.js +1 -1
  83. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -1
  84. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -2
  85. package/core/steps/all/core/20-dataflow.d.ts +2 -1
  86. package/core/steps/all/core/20-dataflow.js +2 -2
  87. package/core/steps/all/static-slicing/00-slice.d.ts +2 -1
  88. package/core/steps/all/static-slicing/00-slice.js +2 -2
  89. package/core/steps/pipeline/default-pipelines.d.ts +32 -31
  90. package/core/steps/pipeline/default-pipelines.js +8 -8
  91. package/core/steps/pipeline-step.d.ts +2 -1
  92. package/dataflow/environments/built-in-config.d.ts +3 -3
  93. package/dataflow/environments/built-in.d.ts +11 -3
  94. package/dataflow/environments/built-in.js +5 -3
  95. package/dataflow/environments/default-builtin-config.js +4 -2
  96. package/dataflow/environments/define.d.ts +2 -1
  97. package/dataflow/environments/define.js +4 -5
  98. package/dataflow/environments/remove.d.ts +6 -0
  99. package/dataflow/environments/remove.js +29 -0
  100. package/dataflow/eval/resolve/alias-tracking.d.ts +7 -2
  101. package/dataflow/eval/resolve/alias-tracking.js +11 -8
  102. package/dataflow/eval/resolve/resolve-argument.d.ts +8 -0
  103. package/dataflow/eval/resolve/resolve-argument.js +118 -0
  104. package/dataflow/eval/resolve/resolve.d.ts +65 -18
  105. package/dataflow/eval/resolve/resolve.js +144 -48
  106. package/dataflow/eval/values/string/string-constants.d.ts +1 -1
  107. package/dataflow/eval/values/string/string-constants.js +7 -2
  108. package/dataflow/extractor.d.ts +2 -1
  109. package/dataflow/extractor.js +2 -1
  110. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +5 -6
  111. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  112. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +4 -2
  113. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +11 -11
  114. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +10 -11
  115. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -2
  116. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -3
  117. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
  118. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  119. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -3
  120. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +6 -3
  121. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +19 -15
  122. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  123. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  124. package/dataflow/internal/process/functions/call/common.js +1 -1
  125. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  126. package/dataflow/origin/dfg-get-symbol-refs.d.ts +21 -0
  127. package/dataflow/origin/dfg-get-symbol-refs.js +50 -0
  128. package/dataflow/processor.d.ts +5 -0
  129. package/documentation/doc-util/doc-cfg.js +4 -3
  130. package/documentation/doc-util/doc-code.d.ts +1 -1
  131. package/documentation/doc-util/doc-dfg.js +3 -2
  132. package/documentation/doc-util/doc-functions.d.ts +24 -0
  133. package/documentation/doc-util/doc-functions.js +65 -0
  134. package/documentation/doc-util/doc-normalized-ast.js +3 -2
  135. package/documentation/doc-util/doc-print.d.ts +5 -0
  136. package/documentation/doc-util/doc-print.js +36 -0
  137. package/documentation/doc-util/doc-query.js +13 -2
  138. package/documentation/doc-util/doc-repl.js +2 -1
  139. package/documentation/doc-util/doc-search.js +3 -2
  140. package/documentation/doc-util/doc-types.d.ts +28 -6
  141. package/documentation/doc-util/doc-types.js +89 -45
  142. package/documentation/print-cfg-wiki.js +6 -7
  143. package/documentation/print-core-wiki.js +5 -5
  144. package/documentation/print-dataflow-graph-wiki.js +10 -10
  145. package/documentation/print-engines-wiki.js +1 -2
  146. package/documentation/print-faq-wiki.js +8 -2
  147. package/documentation/print-interface-wiki.js +12 -2
  148. package/documentation/print-linter-issue.d.ts +1 -0
  149. package/documentation/print-linter-issue.js +71 -0
  150. package/documentation/print-linter-wiki.js +223 -34
  151. package/documentation/print-linting-and-testing-wiki.js +2 -4
  152. package/documentation/print-normalized-ast-wiki.js +3 -3
  153. package/documentation/print-query-wiki.js +18 -2
  154. package/documentation/print-readme.js +24 -1
  155. package/documentation/print-search-wiki.js +1 -2
  156. package/linter/linter-executor.d.ts +3 -1
  157. package/linter/linter-executor.js +3 -2
  158. package/linter/linter-format.d.ts +67 -7
  159. package/linter/linter-format.js +12 -1
  160. package/linter/linter-rules.d.ts +178 -16
  161. package/linter/linter-rules.js +14 -4
  162. package/linter/linter-tags.d.ts +80 -0
  163. package/linter/linter-tags.js +85 -0
  164. package/linter/rules/absolute-path.d.ts +71 -0
  165. package/linter/rules/absolute-path.js +177 -0
  166. package/linter/rules/dataframe-access-validation.d.ts +53 -0
  167. package/linter/rules/dataframe-access-validation.js +116 -0
  168. package/linter/rules/deprecated-functions.d.ts +43 -0
  169. package/linter/rules/deprecated-functions.js +58 -0
  170. package/linter/rules/{2-file-path-validity.d.ts → file-path-validity.d.ts} +16 -6
  171. package/linter/rules/{2-file-path-validity.js → file-path-validity.js} +21 -13
  172. package/linter/rules/naming-convention.d.ts +71 -0
  173. package/linter/rules/naming-convention.js +168 -0
  174. package/linter/rules/seeded-randomness.d.ts +65 -0
  175. package/linter/rules/seeded-randomness.js +122 -0
  176. package/linter/rules/unused-definition.d.ts +41 -0
  177. package/linter/rules/unused-definition.js +105 -0
  178. package/package.json +5 -2
  179. package/queries/base-query-format.d.ts +2 -0
  180. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
  181. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
  182. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  183. package/queries/catalog/config-query/config-query-executor.d.ts +1 -1
  184. package/queries/catalog/config-query/config-query-executor.js +2 -3
  185. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
  186. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -2
  187. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  188. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  189. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  190. package/queries/catalog/dependencies-query/dependencies-query-executor.js +4 -116
  191. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  192. package/queries/catalog/df-shape-query/df-shape-query-executor.d.ts +3 -0
  193. package/queries/catalog/df-shape-query/df-shape-query-executor.js +46 -0
  194. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +72 -0
  195. package/queries/catalog/df-shape-query/df-shape-query-format.js +31 -0
  196. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  197. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  198. package/queries/catalog/lineage-query/lineage-query-format.d.ts +1 -1
  199. package/queries/catalog/linter-query/linter-query-executor.d.ts +1 -1
  200. package/queries/catalog/linter-query/linter-query-executor.js +2 -2
  201. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  202. package/queries/catalog/linter-query/linter-query-format.js +16 -12
  203. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  204. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  205. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  206. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +1 -1
  207. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  208. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  209. package/queries/catalog/search-query/search-query-executor.d.ts +1 -1
  210. package/queries/catalog/search-query/search-query-executor.js +2 -2
  211. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  212. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
  213. package/queries/catalog/static-slice-query/static-slice-query-executor.js +2 -2
  214. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  215. package/queries/query.d.ts +76 -16
  216. package/queries/query.js +2 -0
  217. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +2 -1
  218. package/r-bridge/lang-4.x/ast/parser/json/parser.js +4 -2
  219. package/r-bridge/lang-4.x/convert-values.js +2 -1
  220. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -1
  221. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +4 -4
  222. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +1 -1
  223. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +7 -5
  224. package/r-bridge/shell.d.ts +3 -2
  225. package/r-bridge/shell.js +4 -5
  226. package/search/flowr-search-builder.d.ts +6 -2
  227. package/search/flowr-search-builder.js +7 -0
  228. package/search/flowr-search-filters.d.ts +32 -8
  229. package/search/flowr-search-filters.js +42 -15
  230. package/search/flowr-search.d.ts +4 -0
  231. package/search/search-executor/search-enrichers.d.ts +7 -3
  232. package/search/search-executor/search-enrichers.js +29 -20
  233. package/search/search-executor/search-generators.js +1 -1
  234. package/search/search-executor/search-transformer.d.ts +2 -0
  235. package/search/search-executor/search-transformer.js +10 -1
  236. package/slicing/static/static-slicer.d.ts +1 -1
  237. package/slicing/static/static-slicer.js +2 -3
  238. package/statistics/statistics.d.ts +3 -1
  239. package/statistics/statistics.js +5 -4
  240. package/util/containers.d.ts +12 -9
  241. package/util/containers.js +12 -9
  242. package/util/files.d.ts +8 -2
  243. package/util/files.js +22 -4
  244. package/util/objects.d.ts +5 -4
  245. package/util/r-value.d.ts +23 -0
  246. package/util/r-value.js +113 -0
  247. package/util/range.d.ts +5 -1
  248. package/util/range.js +11 -3
  249. package/util/text/strings.d.ts +6 -0
  250. package/util/text/strings.js +35 -0
  251. package/util/version.js +1 -1
  252. package/linter/rules/1-deprecated-functions.d.ts +0 -34
  253. package/linter/rules/1-deprecated-functions.js +0 -54
  254. package/util/cfg/cfg.d.ts +0 -0
  255. package/util/cfg/cfg.js +0 -2
@@ -5,34 +5,196 @@ import type { LintingRule } from './linter-format';
5
5
  */
6
6
  export declare const LintingRules: {
7
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) => {
8
+ readonly createSearch: (config: import("./rules/deprecated-functions").DeprecatedFunctionsConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["with", "filter"], 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").FlowrSearchElement<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>[]>) => {
10
10
  results: {
11
11
  certainty: import("./linter-format").LintingCertainty.Definitely;
12
12
  function: import("../dataflow/environments/identifier").Identifier;
13
13
  range: import("../util/range").SourceRange;
14
14
  }[];
15
- '.meta': import("./rules/1-deprecated-functions").DeprecatedFunctionsMetadata;
15
+ '.meta': import("./rules/deprecated-functions").DeprecatedFunctionsMetadata;
16
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"];
17
+ readonly prettyPrint: {
18
+ readonly query: (result: import("./rules/deprecated-functions").DeprecatedFunctionsResult) => string;
19
+ readonly full: (result: import("./rules/deprecated-functions").DeprecatedFunctionsResult) => string;
20
+ };
21
+ readonly info: {
22
+ readonly name: "Deprecated Functions";
23
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Deprecated, import("./linter-tags").LintingRuleTag.Smell, import("./linter-tags").LintingRuleTag.Usability, import("./linter-tags").LintingRuleTag.Reproducibility];
24
+ readonly description: "Marks deprecated functions that should not be used anymore.";
25
+ readonly defaultConfig: {
26
+ readonly deprecatedFunctions: readonly ["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"];
27
+ };
20
28
  };
21
29
  };
22
30
  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: {
31
+ readonly createSearch: (config: import("./rules/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>[]>>;
32
+ 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/file-path-validity").FilePathValidityConfig, data: {
33
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
34
+ dataflow: import("../dataflow/info").DataflowInformation;
35
+ config: import("../config").FlowrConfigOptions;
36
+ }) => {
37
+ results: import("./rules/file-path-validity").FilePathValidityResult[];
38
+ ".meta": import("./rules/file-path-validity").FilePathValidityMetadata;
39
+ };
40
+ readonly info: {
41
+ readonly name: "File Path Validity";
42
+ readonly description: "Checks whether file paths used in read and write operations are valid and point to existing files.";
43
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Reproducibility, import("./linter-tags").LintingRuleTag.Bug];
44
+ readonly defaultConfig: {
45
+ readonly additionalReadFunctions: readonly [];
46
+ readonly additionalWriteFunctions: readonly [];
47
+ readonly includeUnknown: false;
48
+ };
49
+ };
50
+ readonly prettyPrint: {
51
+ readonly query: (result: import("./rules/file-path-validity").FilePathValidityResult) => string;
52
+ readonly full: (result: import("./rules/file-path-validity").FilePathValidityResult) => string;
53
+ };
54
+ };
55
+ readonly 'seeded-randomness': {
56
+ readonly createSearch: (config: import("./rules/seeded-randomness").SeededRandomnessConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["with", "filter", "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>[]>>;
57
+ readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/seeded-randomness").SeededRandomnessConfig, { dataflow }: {
58
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
59
+ dataflow: import("../dataflow/info").DataflowInformation;
60
+ config: import("../config").FlowrConfigOptions;
61
+ }) => {
62
+ results: {
63
+ certainty: import("./linter-format").LintingCertainty.Definitely;
64
+ function: import("../dataflow/environments/identifier").Identifier;
65
+ range: import("../util/range").SourceRange;
66
+ }[];
67
+ '.meta': import("./rules/seeded-randomness").SeededRandomnessMeta;
68
+ };
69
+ readonly info: {
70
+ readonly defaultConfig: {
71
+ readonly randomnessProducers: readonly [{
72
+ readonly type: "function";
73
+ readonly name: "set.seed";
74
+ }, {
75
+ readonly type: "assignment";
76
+ readonly name: ".Random.seed";
77
+ }];
78
+ 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"];
79
+ };
80
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Reproducibility];
81
+ readonly name: "Seeded Randomness";
82
+ readonly description: "Checks whether randomness-based function calls are preceded by a random seed generation function. For consistent reproducibility, functions that use randomness should only be called after a constant random seed is set using a function like `set.seed`.";
83
+ };
84
+ readonly prettyPrint: {
85
+ readonly query: (result: import("./rules/seeded-randomness").SeededRandomnessResult, _meta: import("./rules/seeded-randomness").SeededRandomnessMeta) => string;
86
+ readonly full: (result: import("./rules/seeded-randomness").SeededRandomnessResult, _meta: import("./rules/seeded-randomness").SeededRandomnessMeta) => string;
87
+ };
88
+ };
89
+ readonly 'absolute-file-paths': {
90
+ readonly createSearch: (config: import("./rules/absolute-path").AbsoluteFilePathConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"from-query", ["unique"], 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").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
91
+ readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, {
92
+ readonly query?: "config" | "origin" | "dataflow" | "search" | "call-context" | "control-flow" | "dataflow-lens" | "df-shape" | "normalized-ast" | "id-map" | "dataflow-cluster" | "static-slice" | "lineage" | "dependencies" | "location-map" | "happens-before" | "resolve-value" | "project" | "linter" | undefined;
93
+ readonly queryResult?: import("../queries/base-query-format").BaseQueryResult | undefined;
94
+ readonly node: import("../r-bridge/lang-4.x/ast/model/nodes/r-expression-list").RExpressionList<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-function-definition").RFunctionDefinition<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-function-call").RNamedFunctionCall<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-function-call").RUnnamedFunctionCall<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-parameter").RParameter<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-argument").RArgument<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-comment").RComment<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-line-directive").RLineDirective<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-for-loop").RForLoop<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop").RRepeatLoop<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-while-loop").RWhileLoop<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-if-then-else").RIfThenElse<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-access").RNamedAccess<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-access").RIndexAccess<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-unary-op").RUnaryOp<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-binary-op").RBinaryOp<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-symbol").RSymbol<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, string> | import("../r-bridge/lang-4.x/ast/model/nodes/r-number").RNumber<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-string").RString<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-logical").RLogical<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-break").RBreak<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-next").RNext<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation> | import("../r-bridge/lang-4.x/ast/model/nodes/r-pipe").RPipe<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>;
95
+ }[]>, config: import("./rules/absolute-path").AbsoluteFilePathConfig, data: {
96
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
97
+ dataflow: import("../dataflow/info").DataflowInformation;
98
+ config: import("../config").FlowrConfigOptions;
99
+ }) => {
100
+ results: import("./rules/absolute-path").AbsoluteFilePathResult[];
101
+ ".meta": import("./rules/absolute-path").AbsoluteFilePathMetadata;
102
+ };
103
+ readonly prettyPrint: {
104
+ readonly query: (result: import("./rules/absolute-path").AbsoluteFilePathResult) => string;
105
+ readonly full: (result: import("./rules/absolute-path").AbsoluteFilePathResult) => string;
106
+ };
107
+ readonly info: {
108
+ readonly name: "Absolute Paths";
109
+ readonly description: "Checks whether file paths are absolute.";
110
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Reproducibility, import("./linter-tags").LintingRuleTag.Smell, import("./linter-tags").LintingRuleTag.QuickFix];
111
+ readonly defaultConfig: {
112
+ readonly include: {
113
+ readonly constructed: true;
114
+ readonly allStrings: false;
115
+ };
116
+ readonly additionalPathFunctions: readonly [];
117
+ readonly absolutePathRegex: undefined;
118
+ readonly useAsWd: "@script";
119
+ };
120
+ };
121
+ };
122
+ readonly 'unused-definitions': {
123
+ readonly createSearch: (config: import("./rules/unused-definition").UnusedDefinitionConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], 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").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
124
+ 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/unused-definition").UnusedDefinitionConfig, data: {
125
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
126
+ dataflow: import("../dataflow/info").DataflowInformation;
127
+ config: import("../config").FlowrConfigOptions;
128
+ }) => {
129
+ results: import("./rules/unused-definition").UnusedDefinitionResult[];
130
+ ".meta": import("./rules/unused-definition").UnusedDefinitionMetadata;
131
+ };
132
+ readonly prettyPrint: {
133
+ readonly query: (result: import("./rules/unused-definition").UnusedDefinitionResult) => string;
134
+ readonly full: (result: import("./rules/unused-definition").UnusedDefinitionResult) => string;
135
+ };
136
+ readonly info: {
137
+ readonly name: "Unused Definitions";
138
+ readonly description: "Checks for unused definitions.";
139
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Readability, import("./linter-tags").LintingRuleTag.Smell, import("./linter-tags").LintingRuleTag.QuickFix];
140
+ readonly defaultConfig: {
141
+ readonly includeFunctionDefinitions: true;
142
+ };
143
+ };
144
+ };
145
+ readonly 'naming-convention': {
146
+ readonly createSearch: (_config: import("./rules/naming-convention").NamingConventionConfig) => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], 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").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>;
147
+ readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/naming-convention").NamingConventionConfig, data: {
25
148
  normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
26
149
  dataflow: import("../dataflow/info").DataflowInformation;
150
+ config: import("../config").FlowrConfigOptions;
27
151
  }) => {
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;
152
+ results: {
153
+ quickFix: import("./linter-format").LintQuickFixReplacement[] | undefined;
154
+ certainty: import("./linter-format").LintingCertainty;
155
+ detectedCasing: import("./rules/naming-convention").CasingConvention;
156
+ name: string;
157
+ range: import("../util/range").SourceRange;
158
+ }[];
159
+ '.meta': {
160
+ numMatches: number;
161
+ numBreak: number;
162
+ };
163
+ };
164
+ readonly prettyPrint: {
165
+ readonly query: (result: import("./rules/naming-convention").NamingConventionResult) => string;
166
+ readonly full: (result: import("./rules/naming-convention").NamingConventionResult) => string;
167
+ };
168
+ readonly info: {
169
+ readonly name: "Naming Convention";
170
+ readonly description: "Checks wether the symbols conform to a certain naming convention";
171
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Style, import("./linter-tags").LintingRuleTag.QuickFix];
172
+ readonly defaultConfig: {
173
+ readonly caseing: "auto";
174
+ };
175
+ };
176
+ };
177
+ readonly 'dataframe-access-validation': {
178
+ readonly createSearch: () => 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>[]>>;
179
+ 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/dataframe-access-validation").DataFrameAccessValidationConfig, data: {
180
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
181
+ dataflow: import("../dataflow/info").DataflowInformation;
182
+ config: import("../config").FlowrConfigOptions;
183
+ }) => {
184
+ results: import("./rules/dataframe-access-validation").DataFrameAccessValidationResult[];
185
+ '.meta': import("./rules/dataframe-access-validation").DataFrameAccessValidationMetadata;
186
+ };
187
+ readonly prettyPrint: {
188
+ readonly query: (result: import("./rules/dataframe-access-validation").DataFrameAccessValidationResult) => string;
189
+ readonly full: (result: import("./rules/dataframe-access-validation").DataFrameAccessValidationResult) => string;
190
+ };
191
+ readonly info: {
192
+ readonly name: "Dataframe Access Validation";
193
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Bug, import("./linter-tags").LintingRuleTag.Usability, import("./linter-tags").LintingRuleTag.Reproducibility];
194
+ readonly description: "Validates the existance of accessed columns and rows of dataframes.";
195
+ readonly defaultConfig: {
196
+ readonly readLoadedData: false;
197
+ };
36
198
  };
37
199
  };
38
200
  };
@@ -1,14 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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");
4
+ const deprecated_functions_1 = require("./rules/deprecated-functions");
5
+ const file_path_validity_1 = require("./rules/file-path-validity");
6
+ const absolute_path_1 = require("./rules/absolute-path");
7
+ const unused_definition_1 = require("./rules/unused-definition");
8
+ const seeded_randomness_1 = require("./rules/seeded-randomness");
9
+ const naming_convention_1 = require("./rules/naming-convention");
10
+ const dataframe_access_validation_1 = require("./rules/dataframe-access-validation");
6
11
  /**
7
12
  * The registry of currently supported linting rules.
8
13
  * A linting rule can be executed on a dataflow pipeline result using {@link executeLintingRule}.
9
14
  */
10
15
  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
16
+ 'deprecated-functions': deprecated_functions_1.DEPRECATED_FUNCTIONS,
17
+ 'file-path-validity': file_path_validity_1.FILE_PATH_VALIDITY,
18
+ 'seeded-randomness': seeded_randomness_1.SEEDED_RANDOMNESS,
19
+ 'absolute-file-paths': absolute_path_1.ABSOLUTE_PATH,
20
+ 'unused-definitions': unused_definition_1.UNUSED_DEFINITION,
21
+ 'naming-convention': naming_convention_1.NAMING_CONVENTION,
22
+ 'dataframe-access-validation': dataframe_access_validation_1.DATA_FRAME_ACCESS_VALIDATION
13
23
  };
14
24
  //# sourceMappingURL=linter-rules.js.map
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Specify the tags for the linter rules.
3
+ */
4
+ export declare enum LintingRuleTag {
5
+ /**
6
+ * This rule is used to detect bugs in the code.
7
+ * Everything that affects the semantics of the code, such as incorrect function calls, wrong arguments, etc.
8
+ * is to be considered a bug. Otherwise, it may be a smell or a style issue.
9
+ */
10
+ Bug = "bug",
11
+ /**
12
+ * This signals the use of deprecated functions or features.
13
+ */
14
+ Deprecated = "deprecated",
15
+ /**
16
+ * This rule is used to detect issues that are related to the documentation of the code.
17
+ * For example, missing or misleading comments.
18
+ */
19
+ Documentation = "documentation",
20
+ /**
21
+ * This marks rules which are currently considered experimental, _not_ that they detect experimental code.
22
+ */
23
+ Experimental = "experimental",
24
+ /**
25
+ * This rule is used to detect issues that are related to the performance of the code.
26
+ * For example, inefficient algorithms, unnecessary computations, or unoptimized data structures.
27
+ */
28
+ Performance = "performance",
29
+ /**
30
+ * This rule is used to detect issues that are related to the portability of the code.
31
+ * For example, platform-specific code, or code that relies on specific R versions or packages.
32
+ */
33
+ Robustness = "robustness",
34
+ /**
35
+ * The rule is specific to R version 3.x.
36
+ */
37
+ Rver3 = "rver3",
38
+ /**
39
+ * The rule is specific to R version 4.x.
40
+ */
41
+ Rver4 = "rver4",
42
+ /**
43
+ * This rule is used to detect issues that are related to the readability of the code.
44
+ * For example, complex expressions, long lines, or inconsistent formatting.
45
+ */
46
+ Readability = "readability",
47
+ /**
48
+ * This rule is used to detect issues that are related to the reproducibility of the code.
49
+ * For example, missing or incorrect random seeds, or missing data.
50
+ */
51
+ Reproducibility = "reproducibility",
52
+ /**
53
+ * This rule is used to detect security-critical.
54
+ * For example, missing input validation.
55
+ */
56
+ Security = "security",
57
+ /**
58
+ * This rule is used to detect issues that are related to the shiny framework.
59
+ */
60
+ Shiny = "shiny",
61
+ /**
62
+ * This rule is used to detect issues that do not directly affect the semantics of the code,
63
+ * but are still considered bad practice.
64
+ */
65
+ Smell = "smell",
66
+ /**
67
+ * This rule is used to detect issues that are related to the style of the code.
68
+ * For example, inconsistent naming conventions, or missing or incorrect formatting.
69
+ */
70
+ Style = "style",
71
+ /**
72
+ * This rule is used to detect issues that are related to the (re-)usability of the code.
73
+ * For example, missing or incorrect error handling, or missing or incorrect user interface elements.
74
+ */
75
+ Usability = "usability",
76
+ /**
77
+ * This rule may provide quickfixes to automatically fix the issues it detects.
78
+ */
79
+ QuickFix = "quickfix"
80
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LintingRuleTag = void 0;
4
+ /**
5
+ * Specify the tags for the linter rules.
6
+ */
7
+ var LintingRuleTag;
8
+ (function (LintingRuleTag) {
9
+ /**
10
+ * This rule is used to detect bugs in the code.
11
+ * Everything that affects the semantics of the code, such as incorrect function calls, wrong arguments, etc.
12
+ * is to be considered a bug. Otherwise, it may be a smell or a style issue.
13
+ */
14
+ LintingRuleTag["Bug"] = "bug";
15
+ /**
16
+ * This signals the use of deprecated functions or features.
17
+ */
18
+ LintingRuleTag["Deprecated"] = "deprecated";
19
+ /**
20
+ * This rule is used to detect issues that are related to the documentation of the code.
21
+ * For example, missing or misleading comments.
22
+ */
23
+ LintingRuleTag["Documentation"] = "documentation";
24
+ /**
25
+ * This marks rules which are currently considered experimental, _not_ that they detect experimental code.
26
+ */
27
+ LintingRuleTag["Experimental"] = "experimental";
28
+ /**
29
+ * This rule is used to detect issues that are related to the performance of the code.
30
+ * For example, inefficient algorithms, unnecessary computations, or unoptimized data structures.
31
+ */
32
+ LintingRuleTag["Performance"] = "performance";
33
+ /**
34
+ * This rule is used to detect issues that are related to the portability of the code.
35
+ * For example, platform-specific code, or code that relies on specific R versions or packages.
36
+ */
37
+ LintingRuleTag["Robustness"] = "robustness";
38
+ /**
39
+ * The rule is specific to R version 3.x.
40
+ */
41
+ LintingRuleTag["Rver3"] = "rver3";
42
+ /**
43
+ * The rule is specific to R version 4.x.
44
+ */
45
+ LintingRuleTag["Rver4"] = "rver4";
46
+ /**
47
+ * This rule is used to detect issues that are related to the readability of the code.
48
+ * For example, complex expressions, long lines, or inconsistent formatting.
49
+ */
50
+ LintingRuleTag["Readability"] = "readability";
51
+ /**
52
+ * This rule is used to detect issues that are related to the reproducibility of the code.
53
+ * For example, missing or incorrect random seeds, or missing data.
54
+ */
55
+ LintingRuleTag["Reproducibility"] = "reproducibility";
56
+ /**
57
+ * This rule is used to detect security-critical.
58
+ * For example, missing input validation.
59
+ */
60
+ LintingRuleTag["Security"] = "security";
61
+ /**
62
+ * This rule is used to detect issues that are related to the shiny framework.
63
+ */
64
+ LintingRuleTag["Shiny"] = "shiny";
65
+ /**
66
+ * This rule is used to detect issues that do not directly affect the semantics of the code,
67
+ * but are still considered bad practice.
68
+ */
69
+ LintingRuleTag["Smell"] = "smell";
70
+ /**
71
+ * This rule is used to detect issues that are related to the style of the code.
72
+ * For example, inconsistent naming conventions, or missing or incorrect formatting.
73
+ */
74
+ LintingRuleTag["Style"] = "style";
75
+ /**
76
+ * This rule is used to detect issues that are related to the (re-)usability of the code.
77
+ * For example, missing or incorrect error handling, or missing or incorrect user interface elements.
78
+ */
79
+ LintingRuleTag["Usability"] = "usability";
80
+ /**
81
+ * This rule may provide quickfixes to automatically fix the issues it detects.
82
+ */
83
+ LintingRuleTag["QuickFix"] = "quickfix";
84
+ })(LintingRuleTag || (exports.LintingRuleTag = LintingRuleTag = {}));
85
+ //# sourceMappingURL=linter-tags.js.map
@@ -0,0 +1,71 @@
1
+ import type { LintingResult } from '../linter-format';
2
+ import type { MergeableRecord } from '../../util/objects';
3
+ import type { SourceRange } from '../../util/range';
4
+ import { LintingRuleTag } from '../linter-tags';
5
+ import type { FunctionInfo } from '../../queries/catalog/dependencies-query/function-info/function-info';
6
+ import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
7
+ import type { FlowrConfigOptions } from '../../config';
8
+ export interface AbsoluteFilePathResult extends LintingResult {
9
+ filePath: string;
10
+ range: SourceRange;
11
+ }
12
+ type SupportedWd = '@script' | '@home' | string;
13
+ export interface AbsoluteFilePathConfig extends MergeableRecord {
14
+ /** Include paths that are built by functions, e.g., `file.path()` */
15
+ include: {
16
+ /** Whether to include paths that are constructed by functions */
17
+ constructed: boolean;
18
+ /** Include every string, even if it is not used as a file path, to count, strings must have a length of at least 3 chars */
19
+ allStrings: boolean;
20
+ };
21
+ /** Extend the built-in absolute path recognition with additional regexes */
22
+ absolutePathRegex: string | undefined;
23
+ /**
24
+ * The set of functions that should additionally be considered as using a file path.
25
+ * Entries in this array use the {@link FunctionInfo} format from the dependencies query.
26
+ */
27
+ additionalPathFunctions: FunctionInfo[];
28
+ /**
29
+ * Which path should be considered to be the origin for relative paths.
30
+ * This is only relevant with quickfixes. In the future we may be sensitive to setwd etc.
31
+ */
32
+ useAsWd: SupportedWd;
33
+ }
34
+ export interface AbsoluteFilePathMetadata extends MergeableRecord {
35
+ totalConsidered: number;
36
+ totalUnknown: number;
37
+ }
38
+ export declare const ABSOLUTE_PATH: {
39
+ readonly createSearch: (config: AbsoluteFilePathConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"from-query", ["unique"], ParentInformation, import("../../search/flowr-search").FlowrSearchElements<ParentInformation, import("../../search/flowr-search").FlowrSearchElement<ParentInformation>[]>>;
40
+ readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, {
41
+ readonly query?: "config" | "origin" | "dataflow" | "search" | "call-context" | "control-flow" | "dataflow-lens" | "df-shape" | "normalized-ast" | "id-map" | "dataflow-cluster" | "static-slice" | "lineage" | "dependencies" | "location-map" | "happens-before" | "resolve-value" | "project" | "linter" | undefined;
42
+ readonly queryResult?: import("../../queries/base-query-format").BaseQueryResult | undefined;
43
+ readonly node: import("../../r-bridge/lang-4.x/ast/model/nodes/r-expression-list").RExpressionList<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition").RFunctionDefinition<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call").RNamedFunctionCall<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-function-call").RUnnamedFunctionCall<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-parameter").RParameter<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-argument").RArgument<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-comment").RComment<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-line-directive").RLineDirective<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-for-loop").RForLoop<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop").RRepeatLoop<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-while-loop").RWhileLoop<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-if-then-else").RIfThenElse<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-access").RNamedAccess<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-access").RIndexAccess<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-unary-op").RUnaryOp<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-binary-op").RBinaryOp<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-symbol").RSymbol<ParentInformation, string> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-number").RNumber<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-string").RString<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-logical").RLogical<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-break").RBreak<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-next").RNext<ParentInformation> | import("../../r-bridge/lang-4.x/ast/model/nodes/r-pipe").RPipe<ParentInformation>;
44
+ }[]>, config: AbsoluteFilePathConfig, data: {
45
+ normalize: import("../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
46
+ dataflow: import("../../dataflow/info").DataflowInformation;
47
+ config: FlowrConfigOptions;
48
+ }) => {
49
+ results: AbsoluteFilePathResult[];
50
+ ".meta": AbsoluteFilePathMetadata;
51
+ };
52
+ readonly prettyPrint: {
53
+ readonly query: (result: AbsoluteFilePathResult) => string;
54
+ readonly full: (result: AbsoluteFilePathResult) => string;
55
+ };
56
+ readonly info: {
57
+ readonly name: "Absolute Paths";
58
+ readonly description: "Checks whether file paths are absolute.";
59
+ readonly tags: readonly [LintingRuleTag.Robustness, LintingRuleTag.Reproducibility, LintingRuleTag.Smell, LintingRuleTag.QuickFix];
60
+ readonly defaultConfig: {
61
+ readonly include: {
62
+ readonly constructed: true;
63
+ readonly allStrings: false;
64
+ };
65
+ readonly additionalPathFunctions: readonly [];
66
+ readonly absolutePathRegex: undefined;
67
+ readonly useAsWd: "@script";
68
+ };
69
+ };
70
+ };
71
+ export {};