@eagleoutice/flowr 2.2.15 → 2.2.16

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 (212) hide show
  1. package/README.md +210 -6
  2. package/benchmark/slicer.d.ts +3 -1
  3. package/benchmark/slicer.js +8 -5
  4. package/benchmark/summarizer/first-phase/process.d.ts +2 -1
  5. package/benchmark/summarizer/first-phase/process.js +2 -2
  6. package/cli/benchmark-app.d.ts +1 -0
  7. package/cli/benchmark-app.js +4 -1
  8. package/cli/benchmark-helper-app.d.ts +1 -0
  9. package/cli/benchmark-helper-app.js +7 -8
  10. package/cli/common/options.js +2 -0
  11. package/cli/export-quads-app.js +2 -1
  12. package/cli/flowr.js +58 -57
  13. package/cli/repl/commands/repl-cfg.js +13 -13
  14. package/cli/repl/commands/repl-commands.js +2 -2
  15. package/cli/repl/commands/repl-dataflow.js +10 -10
  16. package/cli/repl/commands/repl-execute.d.ts +2 -3
  17. package/cli/repl/commands/repl-execute.js +4 -4
  18. package/cli/repl/commands/repl-lineage.js +4 -4
  19. package/cli/repl/commands/repl-main.d.ts +12 -1
  20. package/cli/repl/commands/repl-normalize.js +6 -6
  21. package/cli/repl/commands/repl-parse.js +2 -2
  22. package/cli/repl/commands/repl-query.js +9 -9
  23. package/cli/repl/commands/repl-version.js +1 -1
  24. package/cli/repl/core.d.ts +5 -2
  25. package/cli/repl/core.js +10 -8
  26. package/cli/repl/server/connection.d.ts +3 -1
  27. package/cli/repl/server/connection.js +7 -5
  28. package/cli/repl/server/server.d.ts +3 -2
  29. package/cli/repl/server/server.js +4 -2
  30. package/cli/script-core/statistics-core.d.ts +2 -1
  31. package/cli/script-core/statistics-core.js +2 -2
  32. package/cli/script-core/statistics-helper-core.d.ts +2 -1
  33. package/cli/script-core/statistics-helper-core.js +5 -4
  34. package/cli/slicer-app.js +4 -2
  35. package/cli/statistics-app.js +2 -1
  36. package/cli/statistics-helper-app.js +2 -1
  37. package/config.d.ts +12 -10
  38. package/config.js +26 -42
  39. package/control-flow/cfg-dead-code.js +45 -2
  40. package/control-flow/cfg-simplification.d.ts +2 -0
  41. package/control-flow/control-flow-graph.d.ts +1 -0
  42. package/control-flow/control-flow-graph.js +4 -0
  43. package/control-flow/dfg-cfg-guided-visitor.d.ts +5 -3
  44. package/control-flow/dfg-cfg-guided-visitor.js +15 -4
  45. package/control-flow/extract-cfg.d.ts +4 -2
  46. package/control-flow/extract-cfg.js +4 -3
  47. package/control-flow/semantic-cfg-guided-visitor.d.ts +19 -1
  48. package/control-flow/semantic-cfg-guided-visitor.js +23 -3
  49. package/core/pipeline-executor.d.ts +4 -1
  50. package/core/pipeline-executor.js +6 -5
  51. package/core/steps/all/core/10-normalize.d.ts +2 -0
  52. package/core/steps/all/core/10-normalize.js +1 -1
  53. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -1
  54. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -2
  55. package/core/steps/all/core/20-dataflow.d.ts +2 -1
  56. package/core/steps/all/core/20-dataflow.js +2 -2
  57. package/core/steps/all/static-slicing/00-slice.d.ts +2 -1
  58. package/core/steps/all/static-slicing/00-slice.js +2 -2
  59. package/core/steps/pipeline/default-pipelines.d.ts +32 -31
  60. package/core/steps/pipeline/default-pipelines.js +8 -8
  61. package/core/steps/pipeline-step.d.ts +2 -1
  62. package/dataflow/environments/built-in-config.d.ts +3 -3
  63. package/dataflow/environments/built-in.d.ts +7 -1
  64. package/dataflow/environments/built-in.js +2 -2
  65. package/dataflow/environments/default-builtin-config.js +4 -2
  66. package/dataflow/environments/define.d.ts +2 -1
  67. package/dataflow/environments/define.js +4 -5
  68. package/dataflow/environments/remove.d.ts +6 -0
  69. package/dataflow/environments/remove.js +29 -0
  70. package/dataflow/eval/resolve/alias-tracking.d.ts +7 -2
  71. package/dataflow/eval/resolve/alias-tracking.js +9 -6
  72. package/dataflow/eval/resolve/resolve-argument.d.ts +8 -0
  73. package/dataflow/eval/resolve/resolve-argument.js +118 -0
  74. package/dataflow/eval/resolve/resolve.d.ts +18 -15
  75. package/dataflow/eval/resolve/resolve.js +20 -18
  76. package/dataflow/eval/values/string/string-constants.d.ts +1 -1
  77. package/dataflow/eval/values/string/string-constants.js +7 -2
  78. package/dataflow/extractor.d.ts +2 -1
  79. package/dataflow/extractor.js +2 -1
  80. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +5 -6
  81. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  82. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +4 -2
  83. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +11 -11
  84. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +10 -11
  85. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -2
  86. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
  88. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  89. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -3
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +5 -3
  91. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +15 -15
  92. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  93. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  94. package/dataflow/internal/process/functions/call/common.js +1 -1
  95. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  96. package/dataflow/origin/dfg-get-symbol-refs.d.ts +21 -0
  97. package/dataflow/origin/dfg-get-symbol-refs.js +50 -0
  98. package/dataflow/processor.d.ts +5 -0
  99. package/documentation/doc-util/doc-cfg.js +4 -3
  100. package/documentation/doc-util/doc-code.d.ts +1 -1
  101. package/documentation/doc-util/doc-dfg.js +3 -2
  102. package/documentation/doc-util/doc-functions.d.ts +24 -0
  103. package/documentation/doc-util/doc-functions.js +65 -0
  104. package/documentation/doc-util/doc-normalized-ast.js +3 -2
  105. package/documentation/doc-util/doc-print.d.ts +5 -0
  106. package/documentation/doc-util/doc-print.js +36 -0
  107. package/documentation/doc-util/doc-query.js +3 -2
  108. package/documentation/doc-util/doc-repl.js +2 -1
  109. package/documentation/doc-util/doc-search.js +3 -2
  110. package/documentation/doc-util/doc-types.d.ts +28 -6
  111. package/documentation/doc-util/doc-types.js +89 -45
  112. package/documentation/print-cfg-wiki.js +6 -7
  113. package/documentation/print-core-wiki.js +5 -5
  114. package/documentation/print-dataflow-graph-wiki.js +10 -10
  115. package/documentation/print-engines-wiki.js +1 -2
  116. package/documentation/print-faq-wiki.js +8 -2
  117. package/documentation/print-interface-wiki.js +1 -2
  118. package/documentation/print-linter-issue.d.ts +1 -0
  119. package/documentation/print-linter-issue.js +71 -0
  120. package/documentation/print-linter-wiki.js +219 -34
  121. package/documentation/print-linting-and-testing-wiki.js +2 -4
  122. package/documentation/print-normalized-ast-wiki.js +3 -3
  123. package/documentation/print-query-wiki.js +1 -2
  124. package/documentation/print-readme.js +24 -1
  125. package/documentation/print-search-wiki.js +1 -2
  126. package/linter/linter-executor.d.ts +3 -1
  127. package/linter/linter-executor.js +3 -2
  128. package/linter/linter-format.d.ts +67 -7
  129. package/linter/linter-format.js +12 -1
  130. package/linter/linter-rules.d.ts +155 -16
  131. package/linter/linter-rules.js +12 -4
  132. package/linter/linter-tags.d.ts +80 -0
  133. package/linter/linter-tags.js +85 -0
  134. package/linter/rules/absolute-path.d.ts +71 -0
  135. package/linter/rules/absolute-path.js +177 -0
  136. package/linter/rules/deprecated-functions.d.ts +43 -0
  137. package/linter/rules/deprecated-functions.js +58 -0
  138. package/linter/rules/{2-file-path-validity.d.ts → file-path-validity.d.ts} +16 -6
  139. package/linter/rules/{2-file-path-validity.js → file-path-validity.js} +21 -13
  140. package/linter/rules/naming-convention.d.ts +71 -0
  141. package/linter/rules/naming-convention.js +164 -0
  142. package/linter/rules/seeded-randomness.d.ts +65 -0
  143. package/linter/rules/seeded-randomness.js +122 -0
  144. package/linter/rules/unused-definition.d.ts +41 -0
  145. package/linter/rules/unused-definition.js +105 -0
  146. package/package.json +4 -1
  147. package/queries/base-query-format.d.ts +2 -0
  148. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
  149. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
  150. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  151. package/queries/catalog/config-query/config-query-executor.d.ts +1 -1
  152. package/queries/catalog/config-query/config-query-executor.js +2 -3
  153. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +1 -1
  154. package/queries/catalog/control-flow-query/control-flow-query-executor.js +2 -2
  155. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  156. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  157. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  158. package/queries/catalog/dependencies-query/dependencies-query-executor.js +4 -116
  159. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  160. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  161. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  162. package/queries/catalog/lineage-query/lineage-query-format.d.ts +1 -1
  163. package/queries/catalog/linter-query/linter-query-executor.d.ts +1 -1
  164. package/queries/catalog/linter-query/linter-query-executor.js +2 -2
  165. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  166. package/queries/catalog/linter-query/linter-query-format.js +16 -12
  167. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  168. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  169. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  170. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +1 -1
  171. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  172. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  173. package/queries/catalog/search-query/search-query-executor.d.ts +1 -1
  174. package/queries/catalog/search-query/search-query-executor.js +2 -2
  175. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  176. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
  177. package/queries/catalog/static-slice-query/static-slice-query-executor.js +2 -2
  178. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  179. package/queries/query.d.ts +15 -15
  180. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +2 -1
  181. package/r-bridge/lang-4.x/ast/parser/json/parser.js +4 -2
  182. package/r-bridge/lang-4.x/convert-values.js +2 -1
  183. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -1
  184. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +4 -4
  185. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +1 -1
  186. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +7 -5
  187. package/r-bridge/shell.d.ts +3 -2
  188. package/r-bridge/shell.js +4 -5
  189. package/search/flowr-search-builder.d.ts +6 -2
  190. package/search/flowr-search-builder.js +7 -0
  191. package/search/flowr-search-filters.d.ts +32 -8
  192. package/search/flowr-search-filters.js +42 -15
  193. package/search/flowr-search.d.ts +4 -0
  194. package/search/search-executor/search-enrichers.d.ts +7 -3
  195. package/search/search-executor/search-enrichers.js +29 -20
  196. package/search/search-executor/search-generators.js +1 -1
  197. package/search/search-executor/search-transformer.d.ts +2 -0
  198. package/search/search-executor/search-transformer.js +10 -1
  199. package/slicing/static/static-slicer.d.ts +1 -1
  200. package/slicing/static/static-slicer.js +2 -3
  201. package/statistics/statistics.d.ts +3 -1
  202. package/statistics/statistics.js +5 -4
  203. package/util/containers.d.ts +12 -9
  204. package/util/containers.js +12 -9
  205. package/util/objects.d.ts +5 -4
  206. package/util/range.d.ts +5 -1
  207. package/util/range.js +11 -3
  208. package/util/text/strings.d.ts +6 -0
  209. package/util/text/strings.js +35 -0
  210. package/util/version.js +1 -1
  211. package/linter/rules/1-deprecated-functions.d.ts +0 -34
  212. package/linter/rules/1-deprecated-functions.js +0 -54
@@ -14,6 +14,7 @@ const doc_repl_1 = require("./doc-util/doc-repl");
14
14
  const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
15
15
  const doc_general_1 = require("./doc-util/doc-general");
16
16
  const doc_dfg_1 = require("./doc-util/doc-dfg");
17
+ const doc_query_1 = require("./doc-util/doc-query");
17
18
  async function getText(shell) {
18
19
  const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
19
20
  return `
@@ -31,6 +32,28 @@ available for [VSCode](${doc_files_1.FlowrVsCode}), [Positron](${doc_files_1.Flo
31
32
  and [Docker](${doc_files_1.FlowrDockerRef}).
32
33
  It offers a wide variety of features, for example:
33
34
 
35
+ * 🐞 **code linting**\\
36
+ Analyze your R scripts for common issues and potential bugs (see the [wiki page](${doc_files_1.FlowrGithubBaseRef}/flowr/wiki/Linter) for more information on the currently supported linters).
37
+
38
+ ${(0, doc_general_1.prefixLines)((0, doc_structure_1.details)('Example: Linting code with flowR', `To lint your code, you can use the [REPL](${doc_files_1.FlowrWikiBaseRef}/Interface#using-the-repl) or the [Visual Studio Code extension](${doc_files_1.FlowrVsCode}) (see [vscode-flowr#283](https://github.com/flowr-analysis/vscode-flowr/pull/283)).
39
+
40
+ ${await (async () => {
41
+ const code = 'read.csv("/root/x.txt")';
42
+ const res = await (0, doc_query_1.showQuery)(shell, code, [{ type: 'linter' }], { showCode: false, collapseQuery: true, collapseResult: false });
43
+ return await (0, doc_repl_1.documentReplSession)(shell, [{
44
+ command: `:query @linter ${JSON.stringify(code)}`,
45
+ description: `
46
+ The linter will analyze the code and return any issues found.
47
+ Formatted more nicely, this returns:
48
+
49
+ ${res}
50
+ `
51
+ }]);
52
+ })()}
53
+
54
+ `), ' ')}
55
+
56
+
34
57
  * 🍕 **program slicing**\\
35
58
  Given a point of interest like the visualization of a plot, _flowR_ reduces the program to just the parts which are relevant
36
59
  for the computation of the point of interest.
@@ -117,7 +140,7 @@ You can enter ${(0, doc_cli_option_1.getReplCommand)('help')} to gain more infor
117
140
 
118
141
  <summary>Example REPL session</summary>
119
142
 
120
- ![Example of a simple REPL session](wiki/gif/repl-demo.gif)
143
+ ![Example of a simple REPL session](wiki/gif/repl-demo-opt.gif)
121
144
 
122
145
  </details>
123
146
 
@@ -15,9 +15,8 @@ const path_1 = __importDefault(require("path"));
15
15
  const flowr_search_executor_1 = require("../search/flowr-search-executor");
16
16
  async function getText(shell) {
17
17
  const rversion = (await shell.usedRVersion())?.format() ?? 'unknown';
18
- const types = (0, doc_types_1.getTypesFromFolderAsMermaid)({
18
+ const types = (0, doc_types_1.getTypesFromFolder)({
19
19
  rootFolder: path_1.default.resolve('./src/search/'),
20
- typeName: 'FlowrSearchGenerator',
21
20
  inlineTypes: doc_types_1.mermaidHide
22
21
  });
23
22
  return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'search API', rVersion: rversion })}
@@ -3,7 +3,9 @@ import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/de
3
3
  import type { DataflowInformation } from '../dataflow/info';
4
4
  import type { LintingResults } from './linter-format';
5
5
  import type { DeepPartial } from 'ts-essentials';
6
+ import type { FlowrConfigOptions } from '../config';
6
7
  export declare function executeLintingRule<Name extends LintingRuleNames>(ruleName: Name, input: {
7
8
  normalize: NormalizedAst;
8
9
  dataflow: DataflowInformation;
9
- }, config?: DeepPartial<LintingRuleConfig<Name>>): LintingResults<Name>;
10
+ config: FlowrConfigOptions;
11
+ }, lintingRuleConfig?: DeepPartial<LintingRuleConfig<Name>>): LintingResults<Name>;
@@ -4,9 +4,10 @@ exports.executeLintingRule = executeLintingRule;
4
4
  const linter_rules_1 = require("./linter-rules");
5
5
  const flowr_search_executor_1 = require("../search/flowr-search-executor");
6
6
  const flowr_search_1 = require("../search/flowr-search");
7
- function executeLintingRule(ruleName, input, config) {
7
+ const objects_1 = require("../util/objects");
8
+ function executeLintingRule(ruleName, input, lintingRuleConfig) {
8
9
  const rule = linter_rules_1.LintingRules[ruleName];
9
- const fullConfig = { ...rule.defaultConfig, ...config };
10
+ const fullConfig = (0, objects_1.deepMergeObject)(rule.info.defaultConfig, lintingRuleConfig);
10
11
  const ruleSearch = rule.createSearch(fullConfig, input);
11
12
  const searchStart = Date.now();
12
13
  const searchResult = (0, flowr_search_executor_1.runSearch)(ruleSearch, input);
@@ -6,7 +6,28 @@ import type { TransformerNames } from '../search/search-executor/search-transfor
6
6
  import type { NormalizedAst, ParentInformation } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
7
7
  import type { LintingRuleConfig, LintingRuleMetadata, LintingRuleNames, LintingRuleResult } from './linter-rules';
8
8
  import type { DataflowInformation } from '../dataflow/info';
9
- import type { DeepPartial } from 'ts-essentials';
9
+ import type { FlowrConfigOptions } from '../config';
10
+ import type { DeepPartial, DeepReadonly } from 'ts-essentials';
11
+ import type { LintingRuleTag } from './linter-tags';
12
+ import type { SourceRange } from '../util/range';
13
+ export interface LinterRuleInformation<Config extends MergeableRecord = never> {
14
+ /** Human-Readable name of the linting rule. */
15
+ readonly name: string;
16
+ /**
17
+ * The default config for this linting rule.
18
+ * This config is combined with the user config when executing the rule.
19
+ */
20
+ readonly defaultConfig: NoInfer<DeepReadonly<Config>>;
21
+ /**
22
+ * A short list of tags that describe and categorize the linting rule.
23
+ */
24
+ readonly tags: readonly LintingRuleTag[];
25
+ /**
26
+ * A short description of the linting rule.
27
+ * This is used to display the rule in the UI and to provide a brief overview of what the rule does.
28
+ */
29
+ readonly description: string;
30
+ }
10
31
  /**
11
32
  * The base interface for a linting rule, which contains all of its relevant settings.
12
33
  * The registry of valid linting rules is stored in {@link LintingRules}.
@@ -27,26 +48,54 @@ export interface LintingRule<Result extends LintingResult, Metadata extends Merg
27
48
  readonly processSearchResult: (elements: FlowrSearchElements<Info, Elements>, config: Config, data: {
28
49
  normalize: NormalizedAst;
29
50
  dataflow: DataflowInformation;
51
+ config: FlowrConfigOptions;
30
52
  }) => {
31
53
  results: Result[];
32
54
  '.meta': Metadata;
33
55
  };
34
56
  /**
35
- * A function used to pretty-print the given linting result.
36
- * By default, the {@link LintingResult#certainty} is automatically printed alongside this information.
57
+ * A set of functions used to pretty-print the given linting result.
58
+ * By default, the {@link LintingResult#certainty} and whether any {@link LintingResult#quickFix} values are available is automatically printed alongside this information.
59
+ */
60
+ readonly prettyPrint: {
61
+ [C in LintingPrettyPrintContext]: (result: Result, metadata: Metadata) => string;
62
+ };
63
+ readonly info: LinterRuleInformation<NoInfer<Config>>;
64
+ }
65
+ interface BaseQuickFix {
66
+ /**
67
+ * The type of the quick fix.
37
68
  */
38
- readonly prettyPrint: (result: Result, metadata: Metadata) => string;
69
+ readonly type: string;
39
70
  /**
40
- * The default config for this linting rule.
41
- * The default config is combined with the user config when executing the rule.
71
+ * A short, human-readable description of the quick fix.
42
72
  */
43
- readonly defaultConfig: NoInfer<Config>;
73
+ readonly description: string;
74
+ /**
75
+ * The range of the text that should be replaced.
76
+ */
77
+ readonly range: SourceRange;
44
78
  }
79
+ export interface LintQuickFixReplacement extends BaseQuickFix {
80
+ readonly type: 'replace';
81
+ /**
82
+ * The text that should replace the given range.
83
+ */
84
+ readonly replacement: string;
85
+ }
86
+ export interface LintQuickFixRemove extends BaseQuickFix {
87
+ readonly type: 'remove';
88
+ }
89
+ export type LintQuickFix = LintQuickFixReplacement | LintQuickFixRemove;
45
90
  /**
46
91
  * A linting result for a single linting rule match.
47
92
  */
48
93
  export interface LintingResult {
49
94
  readonly certainty: LintingCertainty;
95
+ /**
96
+ * If available, what to do to fix the linting result.
97
+ */
98
+ readonly quickFix?: LintQuickFix[];
50
99
  }
51
100
  export interface ConfiguredLintingRule<Name extends LintingRuleNames = LintingRuleNames> {
52
101
  readonly name: Name;
@@ -60,6 +109,17 @@ export interface LintingResults<Name extends LintingRuleNames> {
60
109
  };
61
110
  }
62
111
  export declare enum LintingCertainty {
112
+ /**
113
+ * The linting rule cannot say for sure whether the result is correct or not.
114
+ */
63
115
  Maybe = "maybe",
116
+ /**
117
+ * The linting rule is certain that the reported lint is real.
118
+ */
64
119
  Definitely = "definitely"
65
120
  }
121
+ export declare enum LintingPrettyPrintContext {
122
+ Query = "query",
123
+ Full = "full"
124
+ }
125
+ export {};
@@ -1,9 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LintingCertainty = void 0;
3
+ exports.LintingPrettyPrintContext = exports.LintingCertainty = void 0;
4
4
  var LintingCertainty;
5
5
  (function (LintingCertainty) {
6
+ /**
7
+ * The linting rule cannot say for sure whether the result is correct or not.
8
+ */
6
9
  LintingCertainty["Maybe"] = "maybe";
10
+ /**
11
+ * The linting rule is certain that the reported lint is real.
12
+ */
7
13
  LintingCertainty["Definitely"] = "definitely";
8
14
  })(LintingCertainty || (exports.LintingCertainty = LintingCertainty = {}));
15
+ var LintingPrettyPrintContext;
16
+ (function (LintingPrettyPrintContext) {
17
+ LintingPrettyPrintContext["Query"] = "query";
18
+ LintingPrettyPrintContext["Full"] = "full";
19
+ })(LintingPrettyPrintContext || (exports.LintingPrettyPrintContext = LintingPrettyPrintContext = {}));
9
20
  //# sourceMappingURL=linter-format.js.map
@@ -5,34 +5,173 @@ 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" | "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: {
25
96
  normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
26
97
  dataflow: import("../dataflow/info").DataflowInformation;
98
+ config: import("../config").FlowrConfigOptions;
27
99
  }) => {
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;
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: {
148
+ normalize: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
149
+ dataflow: import("../dataflow/info").DataflowInformation;
150
+ config: import("../config").FlowrConfigOptions;
151
+ }) => {
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: import("./rules/naming-convention").CasingConvention.PascalCase;
174
+ };
36
175
  };
37
176
  };
38
177
  };
@@ -1,14 +1,22 @@
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");
6
10
  /**
7
11
  * The registry of currently supported linting rules.
8
12
  * A linting rule can be executed on a dataflow pipeline result using {@link executeLintingRule}.
9
13
  */
10
14
  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
15
+ 'deprecated-functions': deprecated_functions_1.DEPRECATED_FUNCTIONS,
16
+ 'file-path-validity': file_path_validity_1.FILE_PATH_VALIDITY,
17
+ 'seeded-randomness': seeded_randomness_1.SEEDED_RANDOMNESS,
18
+ 'absolute-file-paths': absolute_path_1.ABSOLUTE_PATH,
19
+ 'unused-definitions': unused_definition_1.UNUSED_DEFINITION,
20
+ 'naming-convention': naming_convention_1.NAMING_CONVENTION
13
21
  };
14
22
  //# 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