@eagleoutice/flowr 2.17.9 → 2.17.11

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 (120) hide show
  1. package/cli/repl/core.js +4 -0
  2. package/config.d.ts +10 -0
  3. package/config.js +8 -1
  4. package/control-flow/control-flow-graph.js +11 -1
  5. package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +1 -1
  6. package/dataflow/environments/default-builtin-config/guards.js +6 -1
  7. package/dataflow/environments/default-builtin-config/index.d.ts +1 -1
  8. package/dataflow/environments/default-builtin-config/network-access.d.ts +1 -1
  9. package/dataflow/environments/default-builtin-config/network-access.js +2 -0
  10. package/dataflow/environments/environment.d.ts +2 -0
  11. package/dataflow/environments/environment.js +5 -0
  12. package/dataflow/environments/frame-memory.d.ts +9 -0
  13. package/dataflow/environments/frame-memory.js +37 -0
  14. package/dataflow/environments/group-generics.d.ts +2 -0
  15. package/dataflow/environments/group-generics.js +7 -0
  16. package/dataflow/environments/identifier.d.ts +2 -0
  17. package/dataflow/environments/identifier.js +16 -0
  18. package/dataflow/environments/pkg-name.d.ts +1 -0
  19. package/dataflow/environments/query-fn-props.d.ts +4 -0
  20. package/dataflow/environments/query-fn-props.js +21 -4
  21. package/dataflow/environments/resolve-by-name.js +5 -3
  22. package/dataflow/extractor.js +26 -4
  23. package/dataflow/fn/argument-roles.js +17 -4
  24. package/dataflow/fn/guards/call-contracts.js +8 -4
  25. package/dataflow/fn/guards/function-guards.d.ts +13 -4
  26. package/dataflow/fn/guards/function-guards.js +147 -52
  27. package/dataflow/fn/guards/guard-term.d.ts +6 -3
  28. package/dataflow/fn/guards/guard-term.js +12 -6
  29. package/dataflow/fn/strict-function.js +6 -2
  30. package/dataflow/graph/df-helper.d.ts +5 -0
  31. package/dataflow/graph/df-helper.js +22 -0
  32. package/dataflow/graph/graph.d.ts +2 -0
  33. package/dataflow/graph/graph.js +9 -5
  34. package/dataflow/internal/dispatch-linking.d.ts +6 -0
  35. package/dataflow/internal/dispatch-linking.js +25 -0
  36. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +32 -2
  37. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +52 -21
  38. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +28 -19
  39. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +75 -0
  40. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +20 -6
  41. package/dataflow/processor.d.ts +3 -0
  42. package/documentation/data/faq/faqs.js +4 -0
  43. package/documentation/wiki-analyzer.js +13 -2
  44. package/documentation/wiki-interface.js +1 -0
  45. package/documentation/wiki-linter.js +3 -0
  46. package/linter/linter-executor.js +4 -1
  47. package/linter/linter-format.d.ts +5 -5
  48. package/linter/linter-rules.d.ts +47 -13
  49. package/linter/linter-rules.js +3 -1
  50. package/linter/rules/absolute-file-paths.js +1 -1
  51. package/linter/rules/autoload-files.d.ts +33 -0
  52. package/linter/rules/autoload-files.js +94 -0
  53. package/linter/rules/cmd-check/description-metadata.d.ts +2 -2
  54. package/linter/rules/cmd-check/description-metadata.js +1 -1
  55. package/linter/rules/cmd-check/documentation-mismatch.d.ts +2 -2
  56. package/linter/rules/cmd-check/documentation-mismatch.js +1 -1
  57. package/linter/rules/cmd-check/file-checks.d.ts +6 -11
  58. package/linter/rules/cmd-check/file-checks.js +8 -3
  59. package/linter/rules/cmd-check/package-data.d.ts +2 -2
  60. package/linter/rules/cmd-check/package-data.js +1 -1
  61. package/linter/rules/cmd-check/package-metafiles.js +1 -1
  62. package/linter/rules/cmd-check/package-structure.d.ts +2 -2
  63. package/linter/rules/cmd-check/package-structure.js +1 -1
  64. package/linter/rules/cmd-check/rd-files.js +1 -1
  65. package/linter/rules/naming-convention.d.ts +9 -2
  66. package/linter/rules/process-state-in-session.js +4 -1
  67. package/linter/rules/software-has-license.d.ts +2 -2
  68. package/linter/rules/software-has-license.js +1 -2
  69. package/linter/rules/stop-call.d.ts +8 -3
  70. package/linter/rules/useless-loop.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/project/cache/flowr-analyzer-cache.d.ts +3 -0
  73. package/project/cache/flowr-analyzer-cache.js +9 -0
  74. package/project/context/flowr-analyzer-context.d.ts +4 -3
  75. package/project/context/flowr-analyzer-context.js +18 -6
  76. package/project/context/flowr-analyzer-dependencies-context.d.ts +9 -0
  77. package/project/context/flowr-analyzer-dependencies-context.js +35 -6
  78. package/project/context/flowr-analyzer-environment-context.d.ts +1 -0
  79. package/project/context/flowr-analyzer-environment-context.js +1 -0
  80. package/project/context/flowr-analyzer-files-context.d.ts +4 -0
  81. package/project/context/flowr-analyzer-files-context.js +24 -0
  82. package/project/context/flowr-analyzer-functions-context.d.ts +1 -0
  83. package/project/context/flowr-analyzer-functions-context.js +6 -0
  84. package/project/context/flowr-analyzer-gas-context.d.ts +1 -0
  85. package/project/context/flowr-analyzer-gas-context.js +1 -0
  86. package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +24 -0
  87. package/project/context/flowr-analyzer-incremental-analysis-context.js +54 -0
  88. package/project/context/flowr-analyzer-loading-order-context.d.ts +1 -0
  89. package/project/context/flowr-analyzer-loading-order-context.js +14 -0
  90. package/project/context/flowr-analyzer-meta-context.d.ts +1 -0
  91. package/project/context/flowr-analyzer-meta-context.js +11 -0
  92. package/project/context/flowr-file.d.ts +2 -1
  93. package/project/context/flowr-file.js +5 -2
  94. package/project/flowr-analyzer.d.ts +22 -3
  95. package/project/flowr-analyzer.js +36 -0
  96. package/project/incremental/incremental-dataflow/incremental-dataflow.d.ts +142 -0
  97. package/project/incremental/incremental-dataflow/incremental-dataflow.js +330 -0
  98. package/project/plugins/flowr-analyzer-plugin.d.ts +22 -2
  99. package/project/plugins/flowr-analyzer-plugin.js +16 -1
  100. package/project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-heuristic-plugin.d.ts +52 -0
  101. package/project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-heuristic-plugin.js +50 -0
  102. package/project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-update-type-plugin.d.ts +77 -0
  103. package/project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-update-type-plugin.js +151 -0
  104. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +2 -0
  105. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +4 -0
  106. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +1 -0
  107. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +3 -0
  108. package/project/plugins/plugin-registry.d.ts +3 -1
  109. package/project/plugins/plugin-registry.js +6 -1
  110. package/project/sigdb/decode.js +4 -1
  111. package/project/sigdb/dict.d.ts +7 -4
  112. package/project/sigdb/dict.js +20 -6
  113. package/project/sigdb/guarded-source.js +10 -0
  114. package/project/sigdb/reader.d.ts +8 -2
  115. package/project/sigdb/reader.js +44 -30
  116. package/queries/catalog/input-sources-query/simple-input-classifier.js +84 -10
  117. package/util/flowr-version.d.ts +1 -1
  118. package/util/flowr-version.js +2 -2
  119. package/util/objects.d.ts +14 -0
  120. package/util/objects.js +100 -0
@@ -7,6 +7,7 @@ import type { RArgument } from '../r-bridge/lang-4.x/ast/model/nodes/r-argument'
7
7
  import type { KnownParserType, Parser } from '../r-bridge/parser';
8
8
  import type { FlowrAnalyzerContext } from '../project/context/flowr-analyzer-context';
9
9
  import type { NodeId } from '../r-bridge/lang-4.x/ast/model/processing/node-id';
10
+ import type { ExpressionListCheckpoints } from './internal/process/functions/call/built-in/built-in-expression-list';
10
11
  export interface DataflowProcessorInformation<OtherInfo> {
11
12
  readonly parser: Parser<KnownParserType>;
12
13
  /** Initial and frozen ast-information */
@@ -60,6 +61,8 @@ export interface DataflowProcessorInformation<OtherInfo> {
60
61
  readonly statementOrder?: Map<NodeId, [start: number, end: number]>;
61
62
  /** The statements left unanalyzed as they follow one that always exits, so walks over the AST can skip what never runs */
62
63
  readonly unreachable?: Set<NodeId>;
64
+ /** Records and resumes the top-level statements of the files for an incremental analysis, see {@link ExpressionListCheckpoints} */
65
+ readonly checkpoints?: ExpressionListCheckpoints;
63
66
  }
64
67
  export type DataflowProcessor<OtherInfo, NodeType extends RNodeWithParent<OtherInfo>> = (node: NodeType, data: DataflowProcessorInformation<OtherInfo>) => DataflowInformation;
65
68
  type NodeWithKey<OtherInfo, Key> = RNode<OtherInfo & ParentInformation> & {
@@ -86,6 +86,10 @@ ${(0, doc_code_1.codeBlock)('shell', 'npm run test:verbose')}
86
86
  Alternatively, set the \`FLOWR_VERBOSE\` environment variable directly:
87
87
  ${(0, doc_code_1.codeBlock)('shell', 'FLOWR_VERBOSE=true npm run test')}
88
88
  Both forms accept the usual vitest filters (e.g. \`npm run test:verbose -- cli/server\`).
89
+ `)
90
+ .addFaq('What to do if the *linter fails*?', `
91
+ Read the description of the failing rule and fix what it points at, \`npm run lint-local -- --fix\` fixes the formatting.
92
+ See the ${ctx.linkPage('wiki/Linting and Testing', 'linting wiki section', 'oh-no-the-linter-fails')} for the rule sets, and open an issue if you think the linter is wrong.
89
93
  `)
90
94
  .addFaq('How to add a *linting rule*?', `
91
95
  To add a new linting rule, see ${ctx.linkPage('wiki/Create Linting Rules')}.
@@ -29,6 +29,8 @@ const flowr_analyzer_environment_context_1 = require("../project/context/flowr-a
29
29
  const flowr_analyzer_functions_context_1 = require("../project/context/flowr-analyzer-functions-context");
30
30
  const flowr_analyzer_meta_context_1 = require("../project/context/flowr-analyzer-meta-context");
31
31
  const flowr_analyzer_incremental_analysis_context_1 = require("../project/context/flowr-analyzer-incremental-analysis-context");
32
+ const flowr_analyzer_incremental_dataflow_heuristic_plugin_1 = require("../project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-heuristic-plugin");
33
+ const flowr_analyzer_incremental_dataflow_update_type_plugin_1 = require("../project/plugins/incremental/incremental-dataflow/flowr-analyzer-incremental-dataflow-update-type-plugin");
32
34
  const flowr_analyzer_gas_context_1 = require("../project/context/flowr-analyzer-gas-context");
33
35
  const flowr_analyzer_gas_plugin_1 = require("../project/plugins/gas-plugins/flowr-analyzer-gas-plugin");
34
36
  const config_1 = require("../config");
@@ -447,7 +449,7 @@ ${ctx.hierarchy(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncre
447
449
 
448
450
  This context is not an analysis-result cache by itself.
449
451
  Instead, it carries forward the minimal state needed by future incremental phases after an invalidation happened.
450
- At the moment, it is used for incremental parsing with Tree-sitter, but it is intended to become the shared context for additional incremental analysis stages as well.
452
+ It is used for incremental parsing with Tree-sitter and for the incremental dataflow analysis, see below.
451
453
 
452
454
  If the analyzer or context is reset, the incremental information is discarded via
453
455
  ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'reset', { codeFont: true, realNameWrapper: 'i' })}.
@@ -482,7 +484,16 @@ For one file, the incremental state follows a fixed lifecycle:
482
484
 
483
485
  ${(0, doc_structure_1.section)('Incremental Dataflow', 4)}
484
486
 
485
- This context is planned to also support future incremental dataflow graph computation.
487
+ A repeated dataflow analysis can build on the one before in two ways, the ${ctx.link(flowr_analyzer_incremental_dataflow_update_type_plugin_1.DefaultFlowrAnalyzerIncrementalDataflowUpdateTypePlugin)} classifies the change (${ctx.link('IncrementalUpdateType')}):
488
+
489
+ * ${ctx.linkConfig('incremental.dataflow.reuse')} (on by default) hands out the analysis before again if only comments changed, which costs next to nothing.
490
+ * ${ctx.linkConfig('incremental.dataflow.activated')} resumes a single file after its last unchanged statement, from checkpoints the analysis before kept (see ${ctx.linkConfig('incremental.dataflow.checkpoints')}), each a copy of the graph.
491
+
492
+ A ${ctx.link(flowr_analyzer_incremental_dataflow_heuristic_plugin_1.FlowrAnalyzerIncrementalDataflowHeuristicPlugin)} plans each analysis. By default, the ${ctx.link(flowr_analyzer_incremental_dataflow_heuristic_plugin_1.AdaptiveFlowrAnalyzerIncrementalDataflowHeuristicPlugin)} keeps a single checkpoint, only once the files are analyzed again and where the last change happened, so a single analysis pays nothing and changing a statement in the middle of a file again resumes right before it.
493
+ Register \`incremental-dataflow-heuristic:configured\` to keep the checkpoints exactly as configured, or a plugin of your own.
494
+ ${ctx.linkM(flowr_analyzer_incremental_analysis_context_1.FlowrAnalyzerIncrementalAnalysisContext, 'getLastAppliedIncrementalUpdate', { codeFont: true, realNameWrapper: 'i' })} tells you what the last analysis reused.
495
+ An editor tells the analyzer of an edit with ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'updateFile', { codeFont: true, realNameWrapper: 'i' })}, handing over the unsaved content of the file.
496
+ The playground and the watch mode of the REPL (\`:query @dataflow watch://file.R\`) turn it on, as they analyze the same files again on every change.
486
497
 
487
498
 
488
499
  ${(0, doc_structure_1.section)('Caching', 2)}
@@ -286,6 +286,7 @@ ${(0, doc_code_1.codeBlock)('json', JSON.stringify({
286
286
  activated: false,
287
287
  heuristics: { activated: true, mtime: true, linesFrom: 500, bytesFrom: 50_000, alwaysWithEdits: false, minFiles: 1 },
288
288
  },
289
+ dataflow: config_1.FlowrConfig.default().incremental.dataflow,
289
290
  },
290
291
  gas: {
291
292
  thresholds: { memory: { problematic: 0.7, critical: 0.9 }, timeMs: { problematic: 100_000, critical: 120_000 } },
@@ -259,6 +259,9 @@ server <- function(input, output, session) {
259
259
  output$plot <- renderPlot(plot(load_for(session$user, input$n))) |> bindCache(input$n)
260
260
  }
261
261
  `
262
+ },
263
+ 'autoload-files': {
264
+ example: { code: 'f <- function() 1', files: { '.RProfile': 'system("rm -rf /")' } }
262
265
  }
263
266
  };
264
267
  /** the kinds of issue a rule finds, each rule carries at most one */
@@ -25,6 +25,9 @@ function withoutUntrustedRegexes(ruleName, config) {
25
25
  }
26
26
  /** the finding with the file it is in, which a rule pointing at a node of the program leaves to that node */
27
27
  function locatedIn(found, idMap) {
28
+ if (found.loc === undefined) {
29
+ return found;
30
+ }
28
31
  const file = found.loc[4] ?? idMap.get([found.involvedId ?? []].flat()[0])?.info.file;
29
32
  return file === found.loc[4] ? found : { ...found, loc: [found.loc[0], found.loc[1], found.loc[2], found.loc[3], file] };
30
33
  }
@@ -35,7 +38,7 @@ async function executeLintingRule(ruleName, input, lintingRuleConfig) {
35
38
  const fullConfig = (0, objects_1.deepMergeObject)(rule.info.defaultConfig(input.inspectContext()), withoutUntrustedRegexes(ruleName, lintingRuleConfig));
36
39
  const ruleSearch = rule.createSearch(fullConfig, input);
37
40
  const searchStart = Date.now();
38
- const searchResult = await (0, flowr_search_executor_1.runSearch)(ruleSearch, input);
41
+ const searchResult = ruleSearch !== undefined ? await (0, flowr_search_executor_1.runSearch)(ruleSearch, input) : undefined;
39
42
  const searchTime = Date.now() - searchStart;
40
43
  const processStart = Date.now();
41
44
  const result = await rule.processSearchResult(searchResult, fullConfig, input);
@@ -1,5 +1,5 @@
1
1
  import type { FlowrSearchLike } from '../search/flowr-search-builder';
2
- import type { FlowrSearchElement, FlowrSearchElements } from '../search/flowr-search';
2
+ import type { FlowrSearchElements } from '../search/flowr-search';
3
3
  import type { MergeableRecord } from '../util/objects';
4
4
  import type { GeneratorNames } from '../search/search-executor/search-generators';
5
5
  import type { TransformerNames } from '../search/search-executor/search-transformer';
@@ -41,19 +41,19 @@ export interface LinterRuleInformation<Config extends MergeableRecord = never> {
41
41
  * The base interface for a linting rule, which contains all of its relevant settings.
42
42
  * The registry of valid linting rules is stored in {@link LintingRules}.
43
43
  */
44
- export interface LintingRule<Result extends LintingResult, Metadata extends MergeableRecord = never, Config extends MergeableRecord = never, Info = ParentInformation, Elements extends FlowrSearchElement<Info>[] = FlowrSearchElement<Info>[]> {
44
+ export interface LintingRule<Result extends LintingResult, Metadata extends MergeableRecord = never, Config extends MergeableRecord = never, Info = ParentInformation, Elements extends FlowrSearchElements<Info> | never = FlowrSearchElements<Info>> {
45
45
  /**
46
46
  * Creates a flowR search that will then be executed and whose results will be passed to {@link processSearchResult}.
47
47
  * The analyzer the rule runs on is handed in as well, so a search built from flowR's built-ins can read the ones
48
48
  * its {@link FlowrConfig} registered rather than the defaults.
49
49
  * In the future, additional optimizations and transformations may be applied to the search between this function and {@link processSearchResult}.
50
50
  */
51
- readonly createSearch: (config: Config, data: ReadonlyFlowrAnalysisProvider) => FlowrSearchLike<Info, GeneratorNames, TransformerNames[], FlowrSearchElements<Info, Elements>>;
51
+ readonly createSearch: (config: Config, data: ReadonlyFlowrAnalysisProvider) => FlowrSearchLike<Info, GeneratorNames, TransformerNames[], Elements>;
52
52
  /**
53
53
  * Processes the search results of the search created through {@link createSearch}.
54
54
  * This function is expected to return the linting results from this rule for the given search, ie usually the given script file.
55
55
  */
56
- readonly processSearchResult: (elements: FlowrSearchElements<Info, Elements>, config: Config, data: ReadonlyFlowrAnalysisProvider) => AsyncOrSync<{
56
+ readonly processSearchResult: (elements: Elements, config: Config, data: ReadonlyFlowrAnalysisProvider) => AsyncOrSync<{
57
57
  results: Result[];
58
58
  '.meta'?: Metadata;
59
59
  }>;
@@ -110,7 +110,7 @@ export interface LintingResult {
110
110
  /** The node ID or IDs involved in this linting result, if applicable. */
111
111
  readonly involvedId: NodeId | NodeId[] | undefined;
112
112
  /** The source location where this linting result occurs */
113
- readonly loc: SourceLocation;
113
+ readonly loc: SourceLocation | undefined;
114
114
  }
115
115
  export interface ConfiguredLintingRule<Name extends LintingRuleNames = LintingRuleNames> {
116
116
  readonly name: Name;
@@ -135,7 +135,14 @@ export declare const LintingRules: {
135
135
  readonly 'naming-convention': {
136
136
  readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
137
137
  readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/naming-convention").NamingConventionConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
138
- results: import("./rules/naming-convention").NamingConventionResult[];
138
+ results: {
139
+ involvedId: import("..").NodeId;
140
+ quickFix: import("./linter-format").LintQuickFixReplacement[] | undefined;
141
+ certainty: import("./linter-format").LintingResultCertainty;
142
+ detectedCasing: import("./rules/naming-convention").CasingConvention;
143
+ name: string;
144
+ loc: readonly [startLine: import("../util/range").Line, startColumn: import("../util/range").Column, endLine: import("../util/range").Line, endColumn: import("../util/range").Column, f?: string | undefined] | undefined;
145
+ }[];
139
146
  '.meta': {
140
147
  numMatches: number;
141
148
  numBreak: number;
@@ -219,7 +226,7 @@ export declare const LintingRules: {
219
226
  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>[]>, useLessLoopConfig: import("./rules/useless-loop").UselessLoopConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
220
227
  results: {
221
228
  name: string;
222
- loc: import("..").SourceLocation;
229
+ loc: import("..").SourceLocation | undefined;
223
230
  certainty: import("./linter-format").LintingResultCertainty;
224
231
  involvedId: import("..").NodeId | import("..").NodeId[] | undefined;
225
232
  }[];
@@ -264,7 +271,12 @@ export declare const LintingRules: {
264
271
  readonly 'stop-call': {
265
272
  readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
266
273
  readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, _config: import("../util/objects").MergeableRecord, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
267
- results: import("ts-essentials").Writable<import("./rules/stop-call").StopCallResult>[];
274
+ results: {
275
+ certainty: import("./linter-format").LintingResultCertainty;
276
+ involvedId: import("..").NodeId;
277
+ loc: readonly [startLine: import("../util/range").Line, startColumn: import("../util/range").Column, endLine: import("../util/range").Line, endColumn: import("../util/range").Column, f?: string | undefined] | undefined;
278
+ quickFix: import("./linter-format").LintQuickFixReplacement[] | undefined;
279
+ }[];
268
280
  '.meta': import("./rules/stop-call").StopCallMetadata;
269
281
  }>;
270
282
  readonly prettyPrint: {
@@ -304,8 +316,8 @@ export declare const LintingRules: {
304
316
  };
305
317
  };
306
318
  readonly 'software-has-license': {
307
- readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"from", [], 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>[]>>;
308
- 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/software-has-license").SoftwareHasLicenseConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => {
319
+ readonly createSearch: () => never;
320
+ readonly processSearchResult: (_elements: never, config: import("./rules/software-has-license").SoftwareHasLicenseConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => {
309
321
  results: import("./rules/software-has-license").SoftwareHasLicenseResult[];
310
322
  '.meta': {};
311
323
  };
@@ -613,11 +625,11 @@ export declare const LintingRules: {
613
625
  readonly prettyPrint: {
614
626
  readonly query: (r: {
615
627
  readonly message: string;
616
- readonly loc: import("..").SourceLocation;
628
+ readonly loc: import("..").SourceLocation | undefined;
617
629
  }, metadata: unknown) => string;
618
630
  readonly full: (r: {
619
631
  readonly message: string;
620
- readonly loc: import("..").SourceLocation;
632
+ readonly loc: import("..").SourceLocation | undefined;
621
633
  }, metadata: unknown) => string;
622
634
  };
623
635
  readonly info: {
@@ -644,11 +656,11 @@ export declare const LintingRules: {
644
656
  readonly prettyPrint: {
645
657
  readonly query: (r: {
646
658
  readonly message: string;
647
- readonly loc: import("..").SourceLocation;
659
+ readonly loc: import("..").SourceLocation | undefined;
648
660
  }, metadata: unknown) => string;
649
661
  readonly full: (r: {
650
662
  readonly message: string;
651
- readonly loc: import("..").SourceLocation;
663
+ readonly loc: import("..").SourceLocation | undefined;
652
664
  }, metadata: unknown) => string;
653
665
  };
654
666
  readonly info: {
@@ -914,11 +926,11 @@ export declare const LintingRules: {
914
926
  readonly prettyPrint: {
915
927
  readonly query: (r: {
916
928
  readonly message: string;
917
- readonly loc: import("..").SourceLocation;
929
+ readonly loc: import("..").SourceLocation | undefined;
918
930
  }, metadata: unknown) => string;
919
931
  readonly full: (r: {
920
932
  readonly message: string;
921
- readonly loc: import("..").SourceLocation;
933
+ readonly loc: import("..").SourceLocation | undefined;
922
934
  }, metadata: unknown) => string;
923
935
  };
924
936
  readonly info: {
@@ -1085,11 +1097,11 @@ export declare const LintingRules: {
1085
1097
  readonly prettyPrint: {
1086
1098
  readonly query: (r: {
1087
1099
  readonly message: string;
1088
- readonly loc: import("..").SourceLocation;
1100
+ readonly loc: import("..").SourceLocation | undefined;
1089
1101
  }, metadata: unknown) => string;
1090
1102
  readonly full: (r: {
1091
1103
  readonly message: string;
1092
- readonly loc: import("..").SourceLocation;
1104
+ readonly loc: import("..").SourceLocation | undefined;
1093
1105
  }, metadata: unknown) => string;
1094
1106
  };
1095
1107
  readonly info: {
@@ -1261,6 +1273,28 @@ export declare const LintingRules: {
1261
1273
  };
1262
1274
  };
1263
1275
  };
1276
+ readonly 'autoload-files': {
1277
+ readonly createSearch: () => never;
1278
+ readonly processSearchResult: (_elements: never, config: import("./rules/autoload-files").AutoloadFilesConfig, data: import("..").ReadonlyFlowrAnalysisProvider<import("..").KnownParser>) => Promise<{
1279
+ results: import("./rules/autoload-files").AutoloadFilesResult[];
1280
+ '.meta': import("../util/objects").MergeableRecord;
1281
+ }>;
1282
+ readonly prettyPrint: {
1283
+ readonly query: (result: import("./rules/autoload-files").AutoloadFilesResult) => string;
1284
+ readonly full: (result: import("./rules/autoload-files").AutoloadFilesResult) => string;
1285
+ };
1286
+ readonly info: {
1287
+ readonly name: "Autoload Files";
1288
+ readonly description: "Finds code in a project that will be executed automatically through autoload files like .RProfile";
1289
+ readonly tags: readonly [LintingRuleTag.Security, LintingRuleTag.Smell];
1290
+ readonly certainty: import("./linter-format").LintingRuleCertainty.OverApproximative;
1291
+ readonly defaultConfig: () => {
1292
+ allowEmptyFiles: true;
1293
+ allowInvalidFiles: false;
1294
+ allowedFilePatterns: never[];
1295
+ };
1296
+ };
1297
+ };
1264
1298
  };
1265
1299
  export type LintingRuleNames = keyof typeof LintingRules;
1266
1300
  /**
@@ -50,6 +50,7 @@ const secret_exfiltration_1 = require("./rules/secret-exfiltration");
50
50
  const process_state_in_session_1 = require("./rules/process-state-in-session");
51
51
  const interactive_functions_1 = require("./rules/interactive-functions");
52
52
  const code_clones_1 = require("./rules/code-clones");
53
+ const autoload_files_1 = require("./rules/autoload-files");
53
54
  const call_contracts_1 = require("./rules/call-contracts");
54
55
  /**
55
56
  * The registry of currently supported linting rules.
@@ -102,7 +103,8 @@ exports.LintingRules = {
102
103
  'process-state-in-session': process_state_in_session_1.PROCESS_STATE_IN_SESSION,
103
104
  'code-clones': code_clones_1.CODE_CLONES,
104
105
  'call-contracts': call_contracts_1.CALL_CONTRACTS,
105
- 'interactive-functions': interactive_functions_1.INTERACTIVE_FUNCTIONS
106
+ 'interactive-functions': interactive_functions_1.INTERACTIVE_FUNCTIONS,
107
+ 'autoload-files': autoload_files_1.AUTOLOAD_FILES
106
108
  };
107
109
  const DigitWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
108
110
  /**
@@ -82,7 +82,7 @@ function resolvePathForAbsoluteCheck(value, ignoreUrls) {
82
82
  }
83
83
  /** A path built within a call that already reports it, as `file.path` within `read.csv`, is one finding. */
84
84
  function withoutNested(results) {
85
- return results.filter((r, i) => !results.some((o, j) => i !== j && o.filePath === r.filePath
85
+ return results.filter((r, i) => !results.some((o, j) => i !== j && o.filePath === r.filePath && r.loc !== undefined && o.loc !== undefined
86
86
  && (range_1.SourceRange.isStrictSubsetOf(r.loc, o.loc) || (j < i && range_1.SourceRange.equals(r.loc, o.loc)))));
87
87
  }
88
88
  exports.ABSOLUTE_FILE_PATHS = {
@@ -0,0 +1,33 @@
1
+ import { type LintingResult, LintingRuleCertainty } from '../linter-format';
2
+ import { LintingRuleTag } from '../linter-tags';
3
+ import type { MergeableRecord } from '../../util/objects';
4
+ export interface AutoloadFilesResult extends LintingResult {
5
+ readonly filePath: string;
6
+ }
7
+ export interface AutoloadFilesConfig extends MergeableRecord {
8
+ readonly allowEmptyFiles: boolean;
9
+ readonly allowInvalidFiles: boolean;
10
+ readonly allowedFilePatterns: (string | RegExp)[];
11
+ }
12
+ export declare const AUTOLOAD_FILES: {
13
+ readonly createSearch: () => never;
14
+ readonly processSearchResult: (_elements: never, config: AutoloadFilesConfig, data: import("../..").ReadonlyFlowrAnalysisProvider<import("../..").KnownParser>) => Promise<{
15
+ results: AutoloadFilesResult[];
16
+ '.meta': MergeableRecord;
17
+ }>;
18
+ readonly prettyPrint: {
19
+ readonly query: (result: AutoloadFilesResult) => string;
20
+ readonly full: (result: AutoloadFilesResult) => string;
21
+ };
22
+ readonly info: {
23
+ readonly name: "Autoload Files";
24
+ readonly description: "Finds code in a project that will be executed automatically through autoload files like .RProfile";
25
+ readonly tags: readonly [LintingRuleTag.Security, LintingRuleTag.Smell];
26
+ readonly certainty: LintingRuleCertainty.OverApproximative;
27
+ readonly defaultConfig: () => {
28
+ allowEmptyFiles: true;
29
+ allowInvalidFiles: false;
30
+ allowedFilePatterns: never[];
31
+ };
32
+ };
33
+ };
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AUTOLOAD_FILES = void 0;
4
+ const linter_format_1 = require("../linter-format");
5
+ const flowr_file_1 = require("../../project/context/flowr-file");
6
+ const linter_tags_1 = require("../linter-tags");
7
+ const flowr_analyzer_builder_1 = require("../../project/flowr-analyzer-builder");
8
+ const path_1 = require("path");
9
+ exports.AUTOLOAD_FILES = {
10
+ createSearch: () => undefined,
11
+ processSearchResult: async (_elements, config, data) => {
12
+ const ctx = data.inspectContext();
13
+ const patterns = config.allowedFilePatterns.map(p => typeof p === 'string' ? new RegExp(p) : p);
14
+ let startupFiles = ctx.files.getFilesByRole(flowr_file_1.FileRole.Startup).filter(f => !patterns.some(p => p.exec(f.path())));
15
+ if (config.allowEmptyFiles) {
16
+ // when allowing empty files, just ignore them in our search
17
+ startupFiles = startupFiles.filter(f => f.content().toString().trim().length > 0);
18
+ }
19
+ const foundPaths = new Set(); // for deduplicating results
20
+ const ret = { results: [], '.meta': {} };
21
+ if (startupFiles.length <= 0) {
22
+ return ret;
23
+ }
24
+ // "top-level" startup files
25
+ for (const file of startupFiles) {
26
+ const path = file.path();
27
+ if (!foundPaths.has(path)) {
28
+ foundPaths.add(path);
29
+ ret.results.push({
30
+ certainty: linter_format_1.LintingResultCertainty.Certain,
31
+ filePath: path,
32
+ involvedId: undefined,
33
+ loc: undefined
34
+ });
35
+ }
36
+ }
37
+ // use dependency query to find files that are sourced by our top-level startup files (and recursively)
38
+ const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder().setConfig(ctx.config).build();
39
+ try {
40
+ /* the files of the main analyzer, as copies where possible, since a file shared with this short-lived analyzer would notify it of every later change */
41
+ for (const file of ctx.files.getAllFiles()) {
42
+ analyzer.addFile(file instanceof flowr_file_1.FlowrInlineTextFile ? file.copy() : file instanceof flowr_file_1.FlowrTextFile ? file.path() : file);
43
+ }
44
+ for (const file of startupFiles) {
45
+ analyzer.addRequest({ request: 'file', content: file.path() });
46
+ }
47
+ const deps = await analyzer.query([{ type: 'dependencies', enabledCategories: ['source'] }]);
48
+ const idMap = (await analyzer.dataflow()).graph.idMap;
49
+ if (idMap === undefined) {
50
+ return ret;
51
+ }
52
+ for (const sourced of deps.dependencies.source) {
53
+ if (sourced.value === undefined || sourced.nodeId === undefined) {
54
+ continue;
55
+ }
56
+ const node = idMap.get(sourced.nodeId);
57
+ if (node === undefined) {
58
+ continue;
59
+ }
60
+ const path = (0, path_1.isAbsolute)(sourced.value) || node.info.file === undefined ? (0, path_1.normalize)(sourced.value) : (0, path_1.join)((0, path_1.dirname)(node.info.file), sourced.value);
61
+ const certainty = analyzer.inspectContext().files.hasFile(path) ? linter_format_1.LintingResultCertainty.Certain : !config.allowInvalidFiles ? linter_format_1.LintingResultCertainty.Uncertain : undefined;
62
+ if (certainty !== undefined && !foundPaths.has(path)) {
63
+ foundPaths.add(path);
64
+ ret.results.push({
65
+ certainty,
66
+ filePath: path,
67
+ involvedId: undefined,
68
+ loc: undefined
69
+ });
70
+ }
71
+ }
72
+ }
73
+ finally {
74
+ analyzer.close();
75
+ }
76
+ return ret;
77
+ },
78
+ prettyPrint: {
79
+ [linter_format_1.LintingPrettyPrintContext.Query]: (result) => `File \`${result.filePath}\``,
80
+ [linter_format_1.LintingPrettyPrintContext.Full]: (result) => `File \`${result.filePath}\` will be executed automatically when running scripts in this project; ensure that it contains no malicious code.`
81
+ },
82
+ info: {
83
+ name: 'Autoload Files',
84
+ description: 'Finds code in a project that will be executed automatically through autoload files like .RProfile',
85
+ tags: [linter_tags_1.LintingRuleTag.Security, linter_tags_1.LintingRuleTag.Smell],
86
+ certainty: linter_format_1.LintingRuleCertainty.OverApproximative,
87
+ defaultConfig: () => ({
88
+ allowEmptyFiles: true,
89
+ allowInvalidFiles: false,
90
+ allowedFilePatterns: []
91
+ })
92
+ }
93
+ };
94
+ //# sourceMappingURL=autoload-files.js.map
@@ -42,11 +42,11 @@ export declare const DESCRIPTION_METADATA: {
42
42
  readonly prettyPrint: {
43
43
  readonly query: (r: {
44
44
  readonly message: string;
45
- readonly loc: SourceLocation;
45
+ readonly loc: SourceLocation | undefined;
46
46
  }, metadata: unknown) => string;
47
47
  readonly full: (r: {
48
48
  readonly message: string;
49
- readonly loc: SourceLocation;
49
+ readonly loc: SourceLocation | undefined;
50
50
  }, metadata: unknown) => string;
51
51
  };
52
52
  readonly info: {
@@ -377,7 +377,7 @@ exports.DESCRIPTION_METADATA = {
377
377
  }
378
378
  return { results, '.meta': { hasDescription: true } };
379
379
  },
380
- prettyPrint: file_checks_1.MessageAtLocation,
380
+ prettyPrint: (0, file_checks_1.prettyPrintMessageAtLocation)(),
381
381
  info: {
382
382
  name: 'Description Metadata',
383
383
  tags: [linter_tags_1.LintingRuleTag.CmdCheck],
@@ -44,11 +44,11 @@ export declare const DOCUMENTATION_MISMATCH: {
44
44
  readonly prettyPrint: {
45
45
  readonly query: (r: {
46
46
  readonly message: string;
47
- readonly loc: SourceLocation;
47
+ readonly loc: SourceLocation | undefined;
48
48
  }, metadata: unknown) => string;
49
49
  readonly full: (r: {
50
50
  readonly message: string;
51
- readonly loc: SourceLocation;
51
+ readonly loc: SourceLocation | undefined;
52
52
  }, metadata: unknown) => string;
53
53
  };
54
54
  readonly info: {
@@ -238,7 +238,7 @@ exports.DOCUMENTATION_MISMATCH = {
238
238
  }
239
239
  return { results, '.meta': { consideredObjects, consideredPages: pages.length } };
240
240
  },
241
- prettyPrint: file_checks_1.MessageAtLocation,
241
+ prettyPrint: (0, file_checks_1.prettyPrintMessageAtLocation)(),
242
242
  info: {
243
243
  name: 'Documentation Mismatch',
244
244
  tags: [linter_tags_1.LintingRuleTag.CmdCheck, linter_tags_1.LintingRuleTag.Documentation, linter_tags_1.LintingRuleTag.Bug],
@@ -1,4 +1,4 @@
1
- import { LintingResultCertainty } from '../../linter-format';
1
+ import { type LintingPrettyPrintContext, LintingResultCertainty } from '../../linter-format';
2
2
  import { SourceLocation, type Line } from '../../../util/range';
3
3
  import { type CmdCheckResult, type PackageInfo } from './cmd-check-util';
4
4
  import { type PackageFiles } from './package-files';
@@ -30,18 +30,13 @@ export declare function linesOf(pf: PackageFiles, file: string): string[];
30
30
  /** The 1-based number of the first line of `file` matching `pattern`, `undefined` if none does. */
31
31
  export declare function firstLine(pf: PackageFiles, file: string, pattern: RegExp): number | undefined;
32
32
  /** Pretty printing of a file finding as its kind, file and location, in full as its message and location. */
33
- export declare const KindInFile: {
34
- readonly query: (r: FileResult<string>, metadata: unknown) => string;
35
- readonly full: (r: FileResult<string>, metadata: unknown) => string;
33
+ export declare function prettyPrintKindInFile(): {
34
+ readonly [C in LintingPrettyPrintContext]: (r: FileResult<string>, metadata: unknown) => string;
36
35
  };
37
36
  /** Pretty printing of a finding as its message and location. */
38
- export declare const MessageAtLocation: {
39
- readonly query: (r: {
37
+ export declare function prettyPrintMessageAtLocation(): {
38
+ readonly [C in LintingPrettyPrintContext]: (r: {
40
39
  readonly message: string;
41
- readonly loc: SourceLocation;
42
- }, metadata: unknown) => string;
43
- readonly full: (r: {
44
- readonly message: string;
45
- readonly loc: SourceLocation;
40
+ readonly loc: SourceLocation | undefined;
46
41
  }, metadata: unknown) => string;
47
42
  };
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageAtLocation = exports.KindInFile = void 0;
4
3
  exports.fileFindings = fileFindings;
5
4
  exports.onPackageFiles = onPackageFiles;
6
5
  exports.linesOf = linesOf;
7
6
  exports.firstLine = firstLine;
7
+ exports.prettyPrintKindInFile = prettyPrintKindInFile;
8
+ exports.prettyPrintMessageAtLocation = prettyPrintMessageAtLocation;
8
9
  const linter_format_1 = require("../../linter-format");
9
10
  const range_1 = require("../../../util/range");
10
11
  const cmd_check_util_1 = require("./cmd-check-util");
@@ -38,7 +39,11 @@ function firstLine(pf, file, pattern) {
38
39
  return i < 0 ? undefined : i + 1;
39
40
  }
40
41
  /** Pretty printing of a file finding as its kind, file and location, in full as its message and location. */
41
- exports.KindInFile = (0, linter_format_1.prettyPrint)((r) => `${r.kind} in ${r.file} at ${range_1.SourceLocation.format(r.loc)}`, r => `${r.message} (at ${range_1.SourceLocation.format(r.loc)})`);
42
+ function prettyPrintKindInFile() {
43
+ return (0, linter_format_1.prettyPrint)(r => `${r.kind} in ${r.file} at ${range_1.SourceLocation.format(r.loc)}`, r => `${r.message} (at ${range_1.SourceLocation.format(r.loc)})`);
44
+ }
42
45
  /** Pretty printing of a finding as its message and location. */
43
- exports.MessageAtLocation = (0, linter_format_1.prettyPrint)((r) => `${r.message} at ${range_1.SourceLocation.format(r.loc)}`);
46
+ function prettyPrintMessageAtLocation() {
47
+ return (0, linter_format_1.prettyPrint)(r => `${r.message} at ${range_1.SourceLocation.format(r.loc)}`);
48
+ }
44
49
  //# sourceMappingURL=file-checks.js.map
@@ -36,11 +36,11 @@ export declare const PACKAGE_DATA: {
36
36
  readonly prettyPrint: {
37
37
  readonly query: (r: {
38
38
  readonly message: string;
39
- readonly loc: import("../../..").SourceLocation;
39
+ readonly loc: import("../../..").SourceLocation | undefined;
40
40
  }, metadata: unknown) => string;
41
41
  readonly full: (r: {
42
42
  readonly message: string;
43
- readonly loc: import("../../..").SourceLocation;
43
+ readonly loc: import("../../..").SourceLocation | undefined;
44
44
  }, metadata: unknown) => string;
45
45
  };
46
46
  readonly info: {
@@ -162,7 +162,7 @@ exports.PACKAGE_DATA = {
162
162
  }
163
163
  return { results, '.meta': { inspectedDataFiles: dataSets.length + entries.filter(e => e.relative === SysData).length, onDisk: pf.onDisk } };
164
164
  }),
165
- prettyPrint: file_checks_1.MessageAtLocation,
165
+ prettyPrint: (0, file_checks_1.prettyPrintMessageAtLocation)(),
166
166
  info: {
167
167
  name: 'Package Data',
168
168
  tags: [linter_tags_1.LintingRuleTag.CmdCheck],
@@ -253,7 +253,7 @@ exports.PACKAGE_METAFILES = {
253
253
  }
254
254
  return { results, '.meta': { checkedFiles: checked } };
255
255
  }),
256
- prettyPrint: file_checks_1.KindInFile,
256
+ prettyPrint: (0, file_checks_1.prettyPrintKindInFile)(),
257
257
  info: {
258
258
  name: 'Package Metafiles',
259
259
  tags: [linter_tags_1.LintingRuleTag.CmdCheck, linter_tags_1.LintingRuleTag.Robustness],
@@ -59,11 +59,11 @@ export declare const PACKAGE_STRUCTURE: {
59
59
  readonly prettyPrint: {
60
60
  readonly query: (r: {
61
61
  readonly message: string;
62
- readonly loc: import("../../..").SourceLocation;
62
+ readonly loc: import("../../..").SourceLocation | undefined;
63
63
  }, metadata: unknown) => string;
64
64
  readonly full: (r: {
65
65
  readonly message: string;
66
- readonly loc: import("../../..").SourceLocation;
66
+ readonly loc: import("../../..").SourceLocation | undefined;
67
67
  }, metadata: unknown) => string;
68
68
  };
69
69
  readonly info: {
@@ -285,7 +285,7 @@ exports.PACKAGE_STRUCTURE = {
285
285
  buildFindings(env).forEach(([kind, message]) => found.add(kind, 'build/vignette.rds', message));
286
286
  return { results: found.results, '.meta': { inspectedEntries: entries.length, onDisk: pf.onDisk } };
287
287
  }),
288
- prettyPrint: file_checks_1.MessageAtLocation,
288
+ prettyPrint: (0, file_checks_1.prettyPrintMessageAtLocation)(),
289
289
  info: {
290
290
  name: 'Package Structure',
291
291
  tags: [linter_tags_1.LintingRuleTag.CmdCheck], certainty: linter_format_1.LintingRuleCertainty.BestEffort,
@@ -594,7 +594,7 @@ exports.RD_FILES = {
594
594
  }
595
595
  return { results, '.meta': { checkedFiles: pages.length } };
596
596
  }),
597
- prettyPrint: file_checks_1.KindInFile,
597
+ prettyPrint: (0, file_checks_1.prettyPrintKindInFile)(),
598
598
  info: {
599
599
  name: 'Rd Files',
600
600
  tags: [linter_tags_1.LintingRuleTag.CmdCheck, linter_tags_1.LintingRuleTag.Robustness],