@eagleoutice/flowr 2.16.2 → 2.16.4
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.
- package/README.md +15 -15
- package/abstract-interpretation/data-frame/arguments.js +4 -3
- package/abstract-interpretation/data-frame/dataframe-semantics.js +1 -2
- package/abstract-interpretation/data-frame/semantics.d.ts +2 -2
- package/abstract-interpretation/data-frame/semantics.js +2 -6
- package/benchmark/slicer.js +1 -3
- package/benchmark/summarizer/first-phase/input.js +1 -12
- package/benchmark/summarizer/second-phase/process.d.ts +7 -0
- package/benchmark/summarizer/second-phase/process.js +15 -12
- package/cli/repl/commands/repl-cfg.js +18 -49
- package/cli/repl/commands/repl-clipboard.d.ts +2 -0
- package/cli/repl/commands/repl-clipboard.js +5 -0
- package/cli/repl/commands/repl-commands.js +2 -2
- package/cli/repl/commands/repl-dataflow.js +21 -55
- package/cli/repl/commands/repl-normalize.js +15 -28
- package/cli/repl/commands/repl-parse.js +2 -2
- package/cli/repl/commands/repl-query.js +10 -10
- package/cli/repl/commands/repl-signature.js +4 -4
- package/cli/repl/server/connection.d.ts +1 -0
- package/cli/repl/server/connection.js +8 -30
- package/cli/repl/server/messages/message-analysis.js +1 -1
- package/config.d.ts +6 -0
- package/config.js +7 -4
- package/control-flow/cfg-dead-code.js +5 -14
- package/control-flow/cfg-to-basic-blocks.js +1 -6
- package/control-flow/control-flow-graph.d.ts +2 -16
- package/control-flow/control-flow-graph.js +8 -66
- package/control-flow/diff-cfg.js +10 -23
- package/control-flow/semantic-cfg-guided-visitor.js +5 -11
- package/control-flow/simple-visitor.js +2 -2
- package/core/steps/pipeline/default-pipelines.d.ts +138 -138
- package/data/r-base-packages.generated.js +0 -1
- package/data/r-base-primitives.generated.js +0 -1
- package/data/r-s3-generics.generated.d.ts +5 -0
- package/data/r-s3-generics.generated.js +103 -0
- package/dataflow/cluster.js +2 -1
- package/dataflow/environments/append.d.ts +1 -0
- package/dataflow/environments/built-in-props.d.ts +10 -0
- package/dataflow/environments/built-in-props.js +25 -1
- package/dataflow/environments/built-in.js +15 -9
- package/dataflow/environments/clone.d.ts +1 -0
- package/dataflow/environments/clone.js +1 -0
- package/dataflow/environments/default-builtin-config.d.ts +188 -14
- package/dataflow/environments/default-builtin-config.js +125 -65
- package/dataflow/environments/define.d.ts +1 -0
- package/dataflow/environments/define.js +1 -0
- package/dataflow/environments/environment.d.ts +27 -0
- package/dataflow/environments/environment.js +37 -16
- package/dataflow/environments/frame-memory.d.ts +9 -1
- package/dataflow/environments/frame-memory.js +12 -1
- package/dataflow/environments/identifier.d.ts +0 -2
- package/dataflow/environments/identifier.js +5 -7
- package/dataflow/environments/overwrite.js +1 -0
- package/dataflow/environments/query-fn-props.js +4 -4
- package/dataflow/environments/scoping.d.ts +3 -0
- package/dataflow/environments/scoping.js +3 -0
- package/dataflow/eval/resolve/alias-tracking.js +3 -3
- package/dataflow/eval/resolve/resolve-argument.d.ts +7 -3
- package/dataflow/eval/resolve/resolve-argument.js +16 -11
- package/dataflow/eval/resolve/resolve-numbers.js +5 -2
- package/dataflow/eval/resolve/resolve-strings.d.ts +1 -1
- package/dataflow/eval/resolve/resolve-working-directory.js +2 -2
- package/dataflow/eval/resolve/resolve.js +3 -8
- package/dataflow/eval/values/intervals/interval-constants.js +1 -6
- package/dataflow/eval/values/r-value.js +1 -6
- package/dataflow/extractor.js +17 -17
- package/dataflow/fn/argument-roles.js +15 -15
- package/dataflow/fn/class-declaration.js +7 -7
- package/dataflow/fn/frame-reflection.d.ts +1 -23
- package/dataflow/fn/frame-reflection.js +8 -95
- package/dataflow/fn/function-props.d.ts +0 -3
- package/dataflow/fn/function-props.js +9 -11
- package/dataflow/fn/function-semantics.d.ts +1 -0
- package/dataflow/fn/strict-function.js +15 -14
- package/dataflow/graph/call-graph.d.ts +8 -0
- package/dataflow/graph/call-graph.js +40 -25
- package/dataflow/graph/dataflowgraph-builder.d.ts +0 -60
- package/dataflow/graph/dataflowgraph-builder.js +15 -135
- package/dataflow/graph/df-helper.d.ts +56 -4
- package/dataflow/graph/df-helper.js +116 -1
- package/dataflow/graph/diff-dataflow-graph.js +13 -15
- package/dataflow/graph/graph-helper.d.ts +20 -0
- package/dataflow/graph/graph-helper.js +18 -0
- package/dataflow/graph/graph.js +3 -8
- package/dataflow/graph/match-args.d.ts +1 -1
- package/dataflow/graph/match-args.js +3 -3
- package/dataflow/internal/linker.d.ts +4 -10
- package/dataflow/internal/linker.js +21 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +39 -22
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +19 -21
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +3 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +6 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +27 -13
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +33 -35
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +3 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +6 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +7 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +3 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +5 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +6 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +5 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +5 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +8 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +3 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +36 -38
- package/dataflow/internal/process/functions/call/common.d.ts +3 -1
- package/dataflow/internal/process/functions/call/common.js +6 -7
- package/dataflow/internal/process/functions/call/deferred.js +8 -8
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +11 -4
- package/dataflow/internal/process/functions/call/known-call-handling.js +11 -7
- package/dataflow/internal/process/functions/call/named-call-handling.js +4 -3
- package/dataflow/internal/process/functions/call/nse.js +4 -4
- package/dataflow/internal/process/functions/call/quoted.js +16 -14
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +2 -2
- package/dataflow/internal/process/process-named-call.js +1 -1
- package/dataflow/origin/dfg-get-origin.js +2 -2
- package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -0
- package/dataflow/origin/dfg-get-symbol-refs.js +3 -8
- package/documentation/data/faq/wiki-faq-store.js +2 -2
- package/documentation/doc-capabilities.js +2 -1
- package/documentation/doc-util/doc-functions.js +2 -2
- package/documentation/doc-util/doc-query.d.ts +1 -1
- package/documentation/doc-util/doc-query.js +3 -1
- package/documentation/doc-util/doc-repl.js +4 -4
- package/documentation/doc-util/doc-timings.js +3 -2
- package/documentation/doc-util/doc-types.js +2 -2
- package/documentation/wiki-absint.js +2 -1
- package/documentation/wiki-cfg.js +2 -1
- package/documentation/wiki-create-linting-rules.js +2 -2
- package/documentation/wiki-dataflow-graph.js +6 -6
- package/documentation/wiki-interface.js +3 -2
- package/documentation/wiki-linter.d.ts +14 -0
- package/documentation/wiki-linter.js +353 -88
- package/documentation/wiki-mk/doc-maker.js +1 -2
- package/documentation/wiki-query.js +25 -0
- package/documentation/wiki-search.js +2 -1
- package/documentation/wiki-signature-database.js +0 -2
- package/linter/linter-executor.js +4 -0
- package/linter/linter-rules.d.ts +552 -35
- package/linter/linter-rules.js +39 -1
- package/linter/linter-tags.d.ts +6 -0
- package/linter/linter-tags.js +6 -0
- package/linter/rules/absolute-path.d.ts +1 -1
- package/linter/rules/absolute-path.js +9 -6
- package/linter/rules/cmd-check/bogus-return.d.ts +29 -0
- package/linter/rules/cmd-check/bogus-return.js +63 -0
- package/linter/rules/cmd-check/call-arguments.d.ts +63 -0
- package/linter/rules/cmd-check/call-arguments.js +216 -0
- package/linter/rules/cmd-check/class-string-comparison.d.ts +48 -0
- package/linter/rules/cmd-check/class-string-comparison.js +135 -0
- package/linter/rules/cmd-check/cmd-check-util.d.ts +67 -0
- package/linter/rules/cmd-check/cmd-check-util.js +169 -0
- package/linter/rules/cmd-check/compiled-code.d.ts +86 -0
- package/linter/rules/cmd-check/compiled-code.js +350 -0
- package/linter/rules/cmd-check/conformance.d.ts +51 -0
- package/linter/rules/cmd-check/conformance.js +166 -0
- package/linter/rules/cmd-check/dependency-declaration.d.ts +95 -0
- package/linter/rules/cmd-check/dependency-declaration.js +299 -0
- package/linter/rules/cmd-check/description-metadata.d.ts +63 -0
- package/linter/rules/cmd-check/description-metadata.js +393 -0
- package/linter/rules/cmd-check/documentation-mismatch.d.ts +60 -0
- package/linter/rules/cmd-check/documentation-mismatch.js +407 -0
- package/linter/rules/cmd-check/file-checks.d.ts +29 -0
- package/linter/rules/cmd-check/file-checks.js +34 -0
- package/linter/rules/cmd-check/foreign-function-calls.d.ts +54 -0
- package/linter/rules/cmd-check/foreign-function-calls.js +115 -0
- package/linter/rules/cmd-check/global-environment-modification.d.ts +61 -0
- package/linter/rules/cmd-check/global-environment-modification.js +237 -0
- package/linter/rules/cmd-check/namespace-tampering.d.ts +52 -0
- package/linter/rules/cmd-check/namespace-tampering.js +162 -0
- package/linter/rules/cmd-check/non-ascii-code.d.ts +51 -0
- package/linter/rules/cmd-check/non-ascii-code.js +112 -0
- package/linter/rules/cmd-check/package-code.d.ts +30 -0
- package/linter/rules/cmd-check/package-code.js +141 -0
- package/linter/rules/cmd-check/package-data.d.ts +51 -0
- package/linter/rules/cmd-check/package-data.js +181 -0
- package/linter/rules/cmd-check/package-files.d.ts +41 -0
- package/linter/rules/cmd-check/package-files.js +157 -0
- package/linter/rules/cmd-check/package-hooks.d.ts +57 -0
- package/linter/rules/cmd-check/package-hooks.js +173 -0
- package/linter/rules/cmd-check/package-metafiles.d.ts +49 -0
- package/linter/rules/cmd-check/package-metafiles.js +292 -0
- package/linter/rules/cmd-check/package-runtime.d.ts +67 -0
- package/linter/rules/cmd-check/package-runtime.js +284 -0
- package/linter/rules/cmd-check/package-structure.d.ts +85 -0
- package/linter/rules/cmd-check/package-structure.js +320 -0
- package/linter/rules/cmd-check/rd-files.d.ts +83 -0
- package/linter/rules/cmd-check/rd-files.js +621 -0
- package/linter/rules/cmd-check/s-three-method-consistency.d.ts +72 -0
- package/linter/rules/cmd-check/s-three-method-consistency.js +206 -0
- package/linter/rules/cmd-check/true-false-abbreviation.d.ts +45 -0
- package/linter/rules/cmd-check/true-false-abbreviation.js +121 -0
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +1 -1
- package/linter/rules/dead-code.d.ts +4 -4
- package/linter/rules/dead-code.js +19 -4
- package/linter/rules/deprecated-functions.d.ts +1 -1
- package/linter/rules/deprecated-functions.js +5 -5
- package/linter/rules/file-path-validity.d.ts +6 -2
- package/linter/rules/file-path-validity.js +7 -3
- package/linter/rules/namespace-access.d.ts +3 -3
- package/linter/rules/namespace-access.js +12 -3
- package/linter/rules/naming-convention.d.ts +2 -2
- package/linter/rules/naming-convention.js +14 -15
- package/linter/rules/network-functions.d.ts +1 -1
- package/linter/rules/network-functions.js +1 -1
- package/linter/rules/no-leaked-credentials.d.ts +1 -1
- package/linter/rules/no-leaked-credentials.js +5 -5
- package/linter/rules/problematic-inputs.d.ts +2 -2
- package/linter/rules/problematic-inputs.js +4 -3
- package/linter/rules/roxygen-arguments.d.ts +2 -2
- package/linter/rules/roxygen-arguments.js +2 -2
- package/linter/rules/seeded-randomness.d.ts +2 -2
- package/linter/rules/seeded-randomness.js +7 -7
- package/linter/rules/software-has-license.d.ts +3 -3
- package/linter/rules/software-has-license.js +3 -3
- package/linter/rules/software-has-tests.d.ts +2 -2
- package/linter/rules/software-has-tests.js +2 -2
- package/linter/rules/stop-with-call-arg.d.ts +3 -3
- package/linter/rules/stop-with-call-arg.js +21 -4
- package/linter/rules/syntactically-valid.d.ts +1 -1
- package/linter/rules/syntactically-valid.js +1 -1
- package/linter/rules/unclosed-connection.d.ts +2 -2
- package/linter/rules/unclosed-connection.js +5 -5
- package/linter/rules/undefined-symbol-util.js +16 -32
- package/linter/rules/undefined-symbol.d.ts +3 -1
- package/linter/rules/undefined-symbol.js +34 -4
- package/linter/rules/unescaped-arguments.d.ts +1 -1
- package/linter/rules/unescaped-arguments.js +11 -10
- package/linter/rules/unused-definition.d.ts +1 -1
- package/linter/rules/unused-definition.js +14 -20
- package/linter/rules/unused-import.d.ts +1 -1
- package/linter/rules/unused-import.js +1 -1
- package/linter/rules/useless-loop.d.ts +1 -1
- package/linter/rules/useless-loop.js +1 -1
- package/package.json +1 -1
- package/project/cache/flowr-analyzer-cache.js +1 -1
- package/project/context/flowr-analyzer-context.js +1 -1
- package/project/context/flowr-analyzer-environment-context.d.ts +2 -2
- package/project/context/flowr-analyzer-environment-context.js +2 -1
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +15 -11
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +0 -2
- package/project/context/flowr-analyzer-incremental-analysis-context.js +0 -4
- package/project/context/flowr-file.d.ts +4 -0
- package/project/context/flowr-file.js +4 -0
- package/project/flowr-analyzer-builder.js +1 -1
- package/project/plugins/file-plugins/files/flowr-description-file.js +2 -2
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +11 -14
- package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +3 -0
- package/project/plugins/file-plugins/files/flowr-namespace-file.js +25 -15
- package/project/plugins/file-plugins/files/flowr-rd-file.d.ts +44 -0
- package/project/plugins/file-plugins/files/flowr-rd-file.js +130 -61
- package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -1
- package/project/plugins/file-plugins/files/flowr-rda-file.js +4 -16
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +4 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +4 -0
- package/project/plugins/file-plugins/flowr-analyzer-test-file-plugin.js +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-vignette-file-plugin.js +1 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.d.ts +0 -1
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -5
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +2 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-session-info-plugin.js +3 -7
- package/project/sigdb/build.js +16 -30
- package/project/sigdb/dict.d.ts +4 -6
- package/project/sigdb/dict.js +125 -31
- package/project/sigdb/reader.js +2 -18
- package/project/sigdb/sigdb-download.js +14 -23
- package/queries/base-query-format.d.ts +2 -0
- package/queries/base-query-format.js +10 -2
- package/queries/catalog/absint-query/absint-query-format.d.ts +1 -1
- package/queries/catalog/absint-query/absint-query-format.js +5 -7
- package/queries/catalog/call-context-query/call-context-query-executor.js +24 -32
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-format.js +1 -3
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -4
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -4
- package/queries/catalog/call-graph-query/call-graph-query-format.js +2 -3
- package/queries/catalog/config-query/config-query-format.js +3 -3
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +2 -3
- package/queries/catalog/dataflow-query/dataflow-query-format.js +2 -3
- package/queries/catalog/dependencies-query/data-flow.d.ts +45 -0
- package/queries/catalog/dependencies-query/data-flow.js +179 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +18 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +108 -12
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +17 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +14 -11
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +2 -1
- package/queries/catalog/dependencies-query/function-info/function-info.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/library-functions.js +13 -13
- package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/remote-functions.js +3 -3
- package/queries/catalog/dependencies-query/function-info/source-functions.js +2 -2
- package/queries/catalog/dependencies-query/function-info/test-functions.js +8 -8
- package/queries/catalog/dependencies-query/function-info/transform-functions.d.ts +8 -0
- package/queries/catalog/dependencies-query/function-info/transform-functions.js +17 -0
- package/queries/catalog/dependencies-query/function-info/write-functions.js +4 -0
- package/queries/catalog/dependencies-query/implicit-echo.d.ts +5 -3
- package/queries/catalog/dependencies-query/implicit-echo.js +36 -35
- package/queries/catalog/dependencies-query/link-devices.d.ts +3 -2
- package/queries/catalog/dependencies-query/link-devices.js +9 -6
- package/queries/catalog/dependencies-query/plot-description.d.ts +10 -0
- package/queries/catalog/dependencies-query/plot-description.js +119 -0
- package/queries/catalog/dependencies-query/plot-objects.d.ts +13 -0
- package/queries/catalog/dependencies-query/plot-objects.js +61 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +2 -2
- package/queries/catalog/dice-query/dice-query-format.js +3 -40
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -1
- package/queries/catalog/does-call-query/does-call-query-format.js +2 -2
- package/queries/catalog/function-info-query/function-info-query-format.js +2 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +2 -1
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.js +2 -2
- package/queries/catalog/id-map-query/id-map-query-format.js +1 -3
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.js +2 -3
- package/queries/catalog/input-sources-query/simple-input-classifier.js +28 -29
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +4 -7
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +1 -1
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +3 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +2 -2
- package/queries/catalog/linter-query/linter-query-executor.js +10 -3
- package/queries/catalog/linter-query/linter-query-format.d.ts +4 -1
- package/queries/catalog/linter-query/linter-query-format.js +32 -21
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.js +1 -3
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +2 -3
- package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-executor.js +3 -3
- package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
- package/queries/catalog/origin-query/origin-query-format.js +4 -5
- package/queries/catalog/project-query/project-query-format.js +2 -2
- package/queries/catalog/provenance-query/provenance-query-format.js +2 -3
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +4 -4
- package/queries/catalog/search-query/search-query-format.js +1 -3
- package/queries/catalog/signature-query/signature-query-executor.js +3 -3
- package/queries/catalog/signature-query/signature-query-format.js +2 -2
- package/queries/catalog/slice-query-options.d.ts +16 -0
- package/queries/catalog/slice-query-options.js +28 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.js +3 -42
- package/queries/query-print.d.ts +4 -0
- package/queries/query-print.js +17 -1
- package/queries/query.d.ts +3 -3
- package/queries/query.js +3 -4
- package/r-bridge/lang-4.x/ast/model/model.d.ts +27 -3
- package/r-bridge/lang-4.x/ast/model/model.js +28 -1
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +20 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +25 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +18 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +15 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +17 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +20 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +1 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +1 -0
- package/r-bridge/lang-4.x/ast/model/operators.js +0 -2
- package/r-bridge/lang-4.x/ast/model/processing/decorate.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/fold.js +1 -6
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -3
- package/r-bridge/lang-4.x/ast/parser/json/format.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/control/normalize-if-then.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +4 -20
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-next.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-repeat.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/loops/normalize-while.js +2 -9
- package/r-bridge/lang-4.x/ast/parser/main/internal/normalize-access.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -10
- package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-expressions.js +3 -11
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-symbol.js +1 -5
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.d.ts +6 -1
- package/r-bridge/lang-4.x/ast/parser/main/normalize-meta.js +7 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +0 -10
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +30 -82
- package/r-bridge/retriever.d.ts +0 -4
- package/r-bridge/retriever.js +0 -13
- package/r-bridge/roxygen2/documentation-provider.js +3 -7
- package/r-bridge/shell.js +3 -8
- package/reconstruct/auto-select/magic-comments.js +8 -7
- package/reconstruct/inline/source-inline-map.d.ts +3 -0
- package/reconstruct/inline/source-inline-map.js +8 -7
- package/reconstruct/reconstruct.d.ts +1 -1
- package/reconstruct/reconstruct.js +33 -109
- package/search/flowr-search-printer.js +4 -15
- package/search/search-executor/search-generators.js +1 -1
- package/slicing/criterion/filters/all-variables.js +1 -2
- package/slicing/static/fingerprint.js +11 -2
- package/slicing/static/slice-call.d.ts +2 -8
- package/slicing/static/slice-call.js +8 -18
- package/slicing/static/static-slicer.js +81 -6
- package/util/collections/arrays.js +1 -1
- package/util/collections/set.js +1 -1
- package/util/diff-graph.d.ts +4 -0
- package/util/diff-graph.js +12 -0
- package/util/files.js +2 -6
- package/util/json.js +1 -15
- package/util/mermaid/cfg.js +10 -17
- package/util/mermaid/dfg.js +6 -8
- package/util/objects.d.ts +1 -1
- package/util/quads.js +4 -13
- package/util/r-author.js +5 -5
- package/util/range.d.ts +9 -0
- package/util/range.js +11 -0
- package/util/schema.js +3 -3
- package/util/simple-df/dfg-view.js +2 -1
- package/util/text/ansi.js +1 -2
- package/util/text/playground-link.js +2 -1
- package/util/text/r-highlight.js +2 -1
- package/util/text/strings.d.ts +2 -0
- package/util/text/strings.js +5 -0
- package/util/text/time.js +1 -2
- package/util/version.js +4 -3
- package/dataflow/fn/recursive-function.d.ts +0 -6
- package/dataflow/fn/recursive-function.js +0 -32
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +0 -16
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +0 -27
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BaseQueryFormat, type BaseQueryResult } from '../../base-query-format';
|
|
2
2
|
import Joi from 'joi';
|
|
3
3
|
import type { ParsedQueryLine } from '../../query';
|
|
4
4
|
import { executeDoesCallQuery } from './does-call-query-executor';
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DoesCallQueryDefinition = void 0;
|
|
7
|
+
const base_query_format_1 = require("../../base-query-format");
|
|
7
8
|
const ansi_1 = require("../../../util/text/ansi");
|
|
8
9
|
const joi_1 = __importDefault(require("joi"));
|
|
9
10
|
const does_call_query_executor_1 = require("./does-call-query-executor");
|
|
@@ -53,8 +54,7 @@ function constraintParser(argument) {
|
|
|
53
54
|
function doesCallQueryLineParser(output, line, _config) {
|
|
54
55
|
const constraint = constraintParser(line[0]);
|
|
55
56
|
if (!constraint || typeof constraint === 'string') {
|
|
56
|
-
|
|
57
|
-
return { query: [] };
|
|
57
|
+
return (0, base_query_format_1.invalidQueryLine)(output, `Invalid does-call query format:\n ${constraint}`);
|
|
58
58
|
}
|
|
59
59
|
return {
|
|
60
60
|
query: [
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FunctionInfoQueryDefinition = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
const query_print_1 = require("../../query-print");
|
|
8
9
|
const ansi_1 = require("../../../util/text/ansi");
|
|
9
|
-
const time_1 = require("../../../util/text/time");
|
|
10
10
|
const function_info_query_executor_1 = require("./function-info-query-executor");
|
|
11
11
|
function functionInfoLineParser(_output, line, _config) {
|
|
12
12
|
const [name, ...packages] = line.filter(t => t.length > 0);
|
|
@@ -22,7 +22,7 @@ exports.FunctionInfoQueryDefinition = {
|
|
|
22
22
|
syntax: '@function-info <name> [<package>...]',
|
|
23
23
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
24
24
|
const out = queryResults;
|
|
25
|
-
result.push(
|
|
25
|
+
result.push((0, query_print_1.queryHeader)('function-info', formatter, out['.meta'].timing));
|
|
26
26
|
if (out.packages.length === 0 && out.builtin.length === 0) {
|
|
27
27
|
result.push(` ╰ ${(0, ansi_1.italic)(`No package or built-in definition known for ${out.name}`, formatter)}`);
|
|
28
28
|
return true;
|
|
@@ -7,6 +7,7 @@ const r_version_1 = require("../../../util/r-version");
|
|
|
7
7
|
const objects_1 = require("../../../util/objects");
|
|
8
8
|
const visualize_functions_1 = require("../dependencies-query/function-info/visualize-functions");
|
|
9
9
|
const dependency_version_space_1 = require("../../../project/dependency-version-space");
|
|
10
|
+
const range_1 = require("../../../util/range");
|
|
10
11
|
/** flowR's curated builtin-library function to package map (e.g. `ggplot` to `ggplot2`), disambiguating an orphan call several packages re-export */
|
|
11
12
|
const BuiltinLibraryByFunction = new Map(visualize_functions_1.VisualizeFunctions.filter(f => f.package !== undefined).map(f => [f.name, f.package]));
|
|
12
13
|
/** the sources `query` disables: `clean` is sugar for disabling `declared`+`transitive`, `disabled` adds any others by name */
|
|
@@ -19,7 +20,7 @@ function disabledSources(query) {
|
|
|
19
20
|
function locatorOf(idMap) {
|
|
20
21
|
return id => {
|
|
21
22
|
const node = id === undefined ? undefined : idMap.get(id);
|
|
22
|
-
const at = node
|
|
23
|
+
const at = range_1.SourceRange.ownFromNode(node);
|
|
23
24
|
return at === undefined ? undefined : `${node?.info.file ? node.info.file + ':' : ''}${at[0]}:${at[1]}`;
|
|
24
25
|
};
|
|
25
26
|
}
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GuessDepVersionsQueryDefinition = exports.DefaultCandidateCap = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
const query_print_1 = require("../../query-print");
|
|
8
9
|
const ansi_1 = require("../../../util/text/ansi");
|
|
9
|
-
const time_1 = require("../../../util/text/time");
|
|
10
10
|
const r_version_1 = require("../../../util/r-version");
|
|
11
11
|
const arrays_1 = require("../../../util/collections/arrays");
|
|
12
12
|
const identifier_1 = require("../../../dataflow/environments/identifier");
|
|
@@ -230,7 +230,7 @@ exports.GuessDepVersionsQueryDefinition = {
|
|
|
230
230
|
executor: guess_dep_versions_query_executor_1.executeGuessDepVersionsQuery,
|
|
231
231
|
asciiSummarizer: (formatter, _analyzer, queryResults, result, _query) => {
|
|
232
232
|
const out = queryResults;
|
|
233
|
-
result.push(
|
|
233
|
+
result.push((0, query_print_1.queryHeader)('guess-dep-versions', formatter, out['.meta'].timing));
|
|
234
234
|
if (out.dateCutoff) {
|
|
235
235
|
result.push(` ╰ up to ${(0, ansi_1.italic)(out.dateCutoff, formatter)}${out.rVersion ? `, R ${rVersionText(out, formatter)}` : ''}`);
|
|
236
236
|
}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.HappensBeforeQueryDefinition = exports.HappensBeforeKey = void 0;
|
|
7
7
|
const ansi_1 = require("../../../util/text/ansi");
|
|
8
|
-
const
|
|
8
|
+
const query_print_1 = require("../../query-print");
|
|
9
9
|
const joi_1 = __importDefault(require("joi"));
|
|
10
10
|
const happens_before_query_executor_1 = require("./happens-before-query-executor");
|
|
11
11
|
/**
|
|
@@ -30,7 +30,7 @@ exports.HappensBeforeQueryDefinition = {
|
|
|
30
30
|
executor: happens_before_query_executor_1.executeHappensBefore,
|
|
31
31
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
32
32
|
const out = queryResults;
|
|
33
|
-
result.push(
|
|
33
|
+
result.push((0, query_print_1.queryHeader)('happens-before', formatter, out['.meta'].timing));
|
|
34
34
|
for (const [fingerprint, value] of Object.entries(out.results)) {
|
|
35
35
|
const { a, b } = exports.HappensBeforeKey.criteria(fingerprint);
|
|
36
36
|
result.push(` ╰ ${(0, ansi_1.bold)(a, formatter)} happens before ${(0, ansi_1.bold)(b, formatter)}: ${value}`);
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IdMapQueryDefinition = void 0;
|
|
7
7
|
const id_map_query_executor_1 = require("./id-map-query-executor");
|
|
8
|
-
const ansi_1 = require("../../../util/text/ansi");
|
|
9
|
-
const time_1 = require("../../../util/text/time");
|
|
10
8
|
const joi_1 = __importDefault(require("joi"));
|
|
11
9
|
const query_print_1 = require("../../query-print");
|
|
12
10
|
exports.IdMapQueryDefinition = {
|
|
@@ -14,7 +12,7 @@ exports.IdMapQueryDefinition = {
|
|
|
14
12
|
executor: id_map_query_executor_1.executeIdMapQuery,
|
|
15
13
|
asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
|
|
16
14
|
const out = queryResults;
|
|
17
|
-
result.push(
|
|
15
|
+
result.push((0, query_print_1.queryHeader)('id-map', formatter, out['.meta'].timing));
|
|
18
16
|
result.push(` ╰ Id List: {${(0, query_print_1.summarizeIdsIfTooLong)(formatter, Array.from(out.idMap.keys()))}}`);
|
|
19
17
|
return true;
|
|
20
18
|
},
|
|
@@ -23,7 +23,7 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
|
|
|
23
23
|
const df = await analyzer.dataflow();
|
|
24
24
|
const ctx = analyzer.inspectContext();
|
|
25
25
|
const defaultConfig = addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
|
|
26
|
-
const packages =
|
|
26
|
+
const packages = unqualifiedPackages(analyzer, df.environment);
|
|
27
27
|
for (const query of queries) {
|
|
28
28
|
const criteria = Array.isArray(query.criterion)
|
|
29
29
|
? query.criterion
|
|
@@ -52,7 +52,7 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
|
|
|
52
52
|
* The packages whose exports are usable without a namespace: those R has on its search path at the end of the
|
|
53
53
|
* program, the ones the project declares, and the base packages R attaches on startup.
|
|
54
54
|
*/
|
|
55
|
-
function
|
|
55
|
+
function unqualifiedPackages(analyzer, environment) {
|
|
56
56
|
return new Set([
|
|
57
57
|
...environment_1.REnvironment.attachedPackages(environment.current),
|
|
58
58
|
...analyzer.inspectContext().deps.getDependencies().map(d => d.name),
|
|
@@ -5,8 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.InputSourcesDefinition = exports.defaultInputClassifierConfig = void 0;
|
|
7
7
|
const base_query_format_1 = require("../../base-query-format");
|
|
8
|
-
const
|
|
9
|
-
const time_1 = require("../../../util/text/time");
|
|
8
|
+
const query_print_1 = require("../../query-print");
|
|
10
9
|
const joi_1 = __importDefault(require("joi"));
|
|
11
10
|
const simple_input_classifier_1 = require("./simple-input-classifier");
|
|
12
11
|
const slice_query_parser_1 = require("../../../cli/repl/parser/slice-query-parser");
|
|
@@ -54,7 +53,7 @@ exports.InputSourcesDefinition = {
|
|
|
54
53
|
executor: input_sources_query_executor_1.executeInputSourcesQuery,
|
|
55
54
|
asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
|
|
56
55
|
const out = queryResults;
|
|
57
|
-
result.push(
|
|
56
|
+
result.push((0, query_print_1.queryHeader)('input-sources', formatter, out['.meta'].timing));
|
|
58
57
|
const nast = (await analyzer.normalize()).idMap;
|
|
59
58
|
for (const [key, sources] of Object.entries(out.results)) {
|
|
60
59
|
result.push(` ╰ Input Sources for ${key}`);
|
|
@@ -28,7 +28,6 @@ const model_1 = require("../../../r-bridge/lang-4.x/ast/model/model");
|
|
|
28
28
|
const r_function_definition_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-definition");
|
|
29
29
|
const r_function_call_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call");
|
|
30
30
|
const r_argument_1 = require("../../../r-bridge/lang-4.x/ast/model/nodes/r-argument");
|
|
31
|
-
const frame_reflection_1 = require("../../../dataflow/fn/frame-reflection");
|
|
32
31
|
const range_1 = require("../../../util/range");
|
|
33
32
|
const type_1 = require("../../../r-bridge/lang-4.x/ast/model/type");
|
|
34
33
|
/** how far a function handed to an entry point may be passed along before we give up resolving it */
|
|
@@ -103,7 +102,7 @@ class InputClassifier {
|
|
|
103
102
|
}
|
|
104
103
|
/** whether the callee is a definition of the code rather than one handed in as an argument */
|
|
105
104
|
callsDefinition(call) {
|
|
106
|
-
return
|
|
105
|
+
return df_helper_1.Dataflow.calleeIdsOf(this.whole, call.id).some(d => !df_helper_1.Dataflow.hasEdge(this.whole, call.id, d, edge_1.EdgeType.Argument));
|
|
107
106
|
}
|
|
108
107
|
/** whether the package the given entry needs is attached (unknown package information lets everything through) */
|
|
109
108
|
hasPackage(name) {
|
|
@@ -122,11 +121,11 @@ class InputClassifier {
|
|
|
122
121
|
if (ref === undefined || !r_symbol_1.RSymbol.is(node)) {
|
|
123
122
|
return this.classifyAt(ref);
|
|
124
123
|
}
|
|
125
|
-
else if (
|
|
124
|
+
else if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Get) && parent !== undefined && !r_argument_1.RArgument.is(parent)) {
|
|
126
125
|
const written = r_string_1.RString.is(parent) ? (0, objects_1.compactRecord)({ ...sourceOf(ref, input_types_1.InputType.Constant), value: parent.content.str }) : this.classifyAt(parent.info.id);
|
|
127
126
|
return written && { ...written, id: ref };
|
|
128
127
|
}
|
|
129
|
-
else if (
|
|
128
|
+
else if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Apply) && vertex_1.DfgVertex.isFunctionCall(vtx) && df_helper_1.Dataflow.targetsOf(this.dfg, ref, edge_1.EdgeType.Reads).every(t => node_id_1.NodeId.isBuiltIn(t) || !this.functionDefinitionsAt(t).next().done)) {
|
|
130
129
|
/* a name of a function the code defines or flowR knows */
|
|
131
130
|
return sourceOf(ref, input_types_1.InputType.Constant);
|
|
132
131
|
}
|
|
@@ -309,7 +308,7 @@ class InputClassifier {
|
|
|
309
308
|
for (const arg of call.args) {
|
|
310
309
|
const ref = graph_1.FunctionArgument.getReference(arg);
|
|
311
310
|
/* an evaluated argument (`parse_expr(text)`) is code only as far as its value is */
|
|
312
|
-
if (ref !== undefined &&
|
|
311
|
+
if (ref !== undefined && df_helper_1.Dataflow.hasEdge(this.whole, call.id, ref, edge_1.EdgeType.Reads)) {
|
|
313
312
|
if (!this.classifyAt(ref)?.types.every(isConstantLike)) {
|
|
314
313
|
return false;
|
|
315
314
|
}
|
|
@@ -321,9 +320,9 @@ class InputClassifier {
|
|
|
321
320
|
if (r_symbol_1.RSymbol.is(node) && parameters.has(identifier_1.Identifier.getName(node.content))) {
|
|
322
321
|
return false;
|
|
323
322
|
}
|
|
324
|
-
for (const target of
|
|
323
|
+
for (const target of df_helper_1.Dataflow.targetsOf(this.dfg, id, edge_1.EdgeType.Reads | edge_1.EdgeType.DefinedByOnCall)) {
|
|
325
324
|
/* the call evaluating the code is no input to it */
|
|
326
|
-
if (!within.has(target) && !node_id_1.NodeId.isBuiltIn(target) && !
|
|
325
|
+
if (!within.has(target) && !node_id_1.NodeId.isBuiltIn(target) && !df_helper_1.Dataflow.hasEdge(this.dfg, target, id, edge_1.EdgeType.Returns)) {
|
|
327
326
|
return false;
|
|
328
327
|
}
|
|
329
328
|
}
|
|
@@ -336,7 +335,7 @@ class InputClassifier {
|
|
|
336
335
|
* carrying the accessed field as its {@link InputSource.name|name}.
|
|
337
336
|
*/
|
|
338
337
|
classifyLinkedObjectAccess(call) {
|
|
339
|
-
if (!
|
|
338
|
+
if (!vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Access)) {
|
|
340
339
|
return undefined;
|
|
341
340
|
}
|
|
342
341
|
const accessed = graph_1.FunctionArgument.getReference(call.args[0]);
|
|
@@ -364,18 +363,18 @@ class InputClassifier {
|
|
|
364
363
|
}
|
|
365
364
|
/** the argument a built-in hands on: the value of a block or `get` (then `renamed`), the condition of a loop */
|
|
366
365
|
passedOn(call) {
|
|
367
|
-
if (
|
|
366
|
+
if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.ExpressionList)) {
|
|
368
367
|
// `{ a; b }` evaluates to its last expression, just like in R
|
|
369
368
|
return { via: call.args.findLast(a => !graph_1.FunctionArgument.isEmpty(a)), renamed: true };
|
|
370
369
|
}
|
|
371
|
-
else if (
|
|
370
|
+
else if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.WhileLoop)) {
|
|
372
371
|
return { via: call.args[0], renamed: false };
|
|
373
372
|
}
|
|
374
|
-
else if (
|
|
373
|
+
else if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.ForLoop)) {
|
|
375
374
|
return { via: call.args[1], renamed: false };
|
|
376
375
|
}
|
|
377
|
-
else if (
|
|
378
|
-
&&
|
|
376
|
+
else if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Get) && !this.whole.unknownSideEffects.has(node_id_1.NodeId.normalize(call.id))
|
|
377
|
+
&& df_helper_1.Dataflow.targetsOf(this.whole, call.id, edge_1.EdgeType.Returns).length > 0) {
|
|
379
378
|
// a statically resolved `get("x")` yields the value of the retrieved variable, read via its first argument
|
|
380
379
|
return { via: call.args[0], renamed: true };
|
|
381
380
|
}
|
|
@@ -384,7 +383,7 @@ class InputClassifier {
|
|
|
384
383
|
/** an `if` or `switch` yields one of its branches (`NULL` without a matching one), its condition only picks which */
|
|
385
384
|
classifyBranches(call) {
|
|
386
385
|
const acc = new ClassificationAccumulator();
|
|
387
|
-
const isSwitch =
|
|
386
|
+
const isSwitch = vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Switch);
|
|
388
387
|
const condition = conditionArgument(call);
|
|
389
388
|
const branches = call.args.filter(a => a !== condition);
|
|
390
389
|
for (const ref of branches.map(graph_1.FunctionArgument.getReference)) {
|
|
@@ -422,7 +421,7 @@ class InputClassifier {
|
|
|
422
421
|
if (linkedAccess) {
|
|
423
422
|
return this.classifyCdsAndReturn(call, linkedAccess);
|
|
424
423
|
}
|
|
425
|
-
if (
|
|
424
|
+
if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.IfThenElse) || vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Switch)) {
|
|
426
425
|
return this.classifyCdsAndReturn(call, this.classifyBranches(call));
|
|
427
426
|
}
|
|
428
427
|
const handed = this.passedOn(call);
|
|
@@ -465,7 +464,7 @@ class InputClassifier {
|
|
|
465
464
|
if (types.length === 0) {
|
|
466
465
|
/* a call of something the code produced (a shiny `reactive()`) or defines yields what that produced or returns */
|
|
467
466
|
const produced = this.classifyCallee(call) ?? this.classifyDefinitionResult(call);
|
|
468
|
-
if (produced !== undefined &&
|
|
467
|
+
if (produced !== undefined && vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Try)) {
|
|
469
468
|
/* the handlers only answer for a failing block, which may just as well succeed */
|
|
470
469
|
const acc = new ClassificationAccumulator();
|
|
471
470
|
const block = this.argumentReference(call, 0, 'expr');
|
|
@@ -497,7 +496,7 @@ class InputClassifier {
|
|
|
497
496
|
const vtx = ref === undefined ? undefined : this.whole.getVertex(ref);
|
|
498
497
|
const fns = vtx === undefined || vertex_1.DfgVertex.isFunctionCall(vtx) ? [] : [...this.functionDefinitionsAt(ref)];
|
|
499
498
|
const classified = fns.length > 0 ? this.classifyExits(fns, ref)
|
|
500
|
-
: vertex_1.DfgVertex.isFunctionCall(vtx) && identifier_1.Identifier.getName(vtx.name) === '~' &&
|
|
499
|
+
: vertex_1.DfgVertex.isFunctionCall(vtx) && identifier_1.Identifier.getName(vtx.name) === '~' && df_helper_1.Dataflow.hasEdge(this.whole, call.id, vtx.id, edge_1.EdgeType.Calls) ? this.classifyFormula(vtx) : of.classifyAt(ref);
|
|
501
500
|
argTypes.push(...classified?.types ?? [input_types_1.InputType.Unknown]);
|
|
502
501
|
cdTypes.push(...classified?.cds ?? []);
|
|
503
502
|
}
|
|
@@ -520,7 +519,7 @@ class InputClassifier {
|
|
|
520
519
|
}
|
|
521
520
|
/** what a string template like `glue("{x}")` evaluates and reads, which is no argument, but flows in all the same */
|
|
522
521
|
templateReads(call) {
|
|
523
|
-
return
|
|
522
|
+
return vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.StringTemplate) ? df_helper_1.Dataflow.targetsOf(this.whole, call.id, edge_1.EdgeType.Reads).filter(t => this.whole.hasVertex(t) && !vertex_1.DfgVertex.hasOrigin(this.whole.getVertex(t), built_in_proc_name_1.BuiltInProcName.Library)) : [];
|
|
524
523
|
}
|
|
525
524
|
/** a formula called as a function (`purrr::map(x, ~ runif(1))`) yields what its body does */
|
|
526
525
|
classifyFormula(formula) {
|
|
@@ -562,12 +561,12 @@ class InputClassifier {
|
|
|
562
561
|
yield id;
|
|
563
562
|
return;
|
|
564
563
|
}
|
|
565
|
-
const isLoop =
|
|
566
|
-
||
|
|
564
|
+
const isLoop = vertex_1.DfgVertex.hasOrigin(vtx, built_in_proc_name_1.BuiltInProcName.WhileLoop) || vertex_1.DfgVertex.hasOrigin(vtx, built_in_proc_name_1.BuiltInProcName.ForLoop)
|
|
565
|
+
|| vertex_1.DfgVertex.hasOrigin(vtx, built_in_proc_name_1.BuiltInProcName.RepeatLoop);
|
|
567
566
|
if (isLoop) {
|
|
568
567
|
yield undefined;
|
|
569
568
|
}
|
|
570
|
-
else if (
|
|
569
|
+
else if (vertex_1.DfgVertex.hasOrigin(vtx, built_in_proc_name_1.BuiltInProcName.IfThenElse) && depth <= MaxFunctionResolveDepth) {
|
|
571
570
|
for (const branch of vtx.args.slice(1)) {
|
|
572
571
|
const ref = graph_1.FunctionArgument.getReference(branch);
|
|
573
572
|
if (ref === undefined) {
|
|
@@ -606,7 +605,7 @@ class InputClassifier {
|
|
|
606
605
|
}
|
|
607
606
|
const origins = df_helper_1.Dataflow.origin(this.dfg, vtx.id);
|
|
608
607
|
if (origins === undefined || origins.length === 0) {
|
|
609
|
-
if (
|
|
608
|
+
if (df_helper_1.Dataflow.targetsOf(this.whole, vtx.id, edge_1.EdgeType.DefinedByOnCall).length > 0) {
|
|
610
609
|
return this.classifyCdsAndReturn(vtx, sourceOf(vtx.id, input_types_1.InputType.Scope));
|
|
611
610
|
}
|
|
612
611
|
// the definition is not part of the criterion's function, so it has to come from an enclosing scope
|
|
@@ -670,7 +669,7 @@ class InputClassifier {
|
|
|
670
669
|
}
|
|
671
670
|
// if the referenced definition is linked via defined-by-on-call to another id (e.g., a parameter linked to a
|
|
672
671
|
// caller argument), follow it into the caller; only if that leads nowhere is it an opaque Scope origin
|
|
673
|
-
const onCall =
|
|
672
|
+
const onCall = df_helper_1.Dataflow.targetsOf(this.whole, v.id, edge_1.EdgeType.DefinedByOnCall);
|
|
674
673
|
if (onCall.length > 0) {
|
|
675
674
|
const callers = onCall.map(t => this.classifyInFullGraph(t)).filter(assert_1.isNotUndefined);
|
|
676
675
|
const known = callers.filter(c => !c.types.includes(input_types_1.InputType.Unknown));
|
|
@@ -694,9 +693,9 @@ class InputClassifier {
|
|
|
694
693
|
escapes(parameter) {
|
|
695
694
|
const idMap = this.whole.idMap;
|
|
696
695
|
const fn = idMap === undefined ? undefined : model_1.RNode.iterateParents(idMap.get(parameter), idMap).find(r_function_definition_1.RFunctionDefinition.is);
|
|
697
|
-
const holders = fn === undefined ? [] :
|
|
698
|
-
return holders.length === 0 || holders.some(h =>
|
|
699
|
-
.some(r => !r_function_call_1.RFunctionCall.is(idMap?.get(r)) || !
|
|
696
|
+
const holders = fn === undefined ? [] : df_helper_1.Dataflow.sourcesOf(this.whole, fn.info.id, edge_1.EdgeType.DefinedBy);
|
|
697
|
+
return holders.length === 0 || holders.some(h => df_helper_1.Dataflow.sourcesOf(this.whole, h, edge_1.EdgeType.Reads)
|
|
698
|
+
.some(r => !r_function_call_1.RFunctionCall.is(idMap?.get(r)) || !df_helper_1.Dataflow.hasEdge(this.whole, r, fn?.info.id, edge_1.EdgeType.Calls)));
|
|
700
699
|
}
|
|
701
700
|
/** whether code flowR cannot follow (`load`, `eval`, `e$x <-`) may rebind the variable before the use */
|
|
702
701
|
mayBeRebound(use, definitions) {
|
|
@@ -720,7 +719,7 @@ class InputClassifier {
|
|
|
720
719
|
return this.rebinding ??= [
|
|
721
720
|
...[...this.whole.unknownSideEffects].filter(e => !graph_1.UnknownSideEffect.isLinked(e)).map(e => [graph_1.UnknownSideEffect.id(e), undefined]),
|
|
722
721
|
...this.whole.verticesOfType(vertex_1.VertexType.FunctionCall)
|
|
723
|
-
.filter(([, c]) =>
|
|
722
|
+
.filter(([, c]) => vertex_1.DfgVertex.hasOrigin(c, built_in_proc_name_1.BuiltInProcName.Replacement) && FieldReplacements.has(identifier_1.Identifier.getName(c.name)))
|
|
724
723
|
.map(([id, c]) => [id, c.args.slice(1, -1).map(name)])
|
|
725
724
|
];
|
|
726
725
|
}
|
|
@@ -754,10 +753,10 @@ class InputClassifier {
|
|
|
754
753
|
}
|
|
755
754
|
/** the condition of an `if` or `switch`; with named arguments to an `if`, we do not know which it is */
|
|
756
755
|
function conditionArgument(call) {
|
|
757
|
-
if (
|
|
756
|
+
if (vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.Switch)) {
|
|
758
757
|
return call.args.find(a => graph_1.FunctionArgument.hasName(a, 'EXPR')) ?? call.args.find(a => !graph_1.FunctionArgument.isNamed(a));
|
|
759
758
|
}
|
|
760
|
-
return
|
|
759
|
+
return vertex_1.DfgVertex.hasOrigin(call, built_in_proc_name_1.BuiltInProcName.IfThenElse) && !call.args.some(graph_1.FunctionArgument.isNamed) ? call.args[0] : undefined;
|
|
761
760
|
}
|
|
762
761
|
/** the function definitions the given node is nested in, innermost first */
|
|
763
762
|
function* enclosingFunctions(node, idMap) {
|
|
@@ -19,17 +19,14 @@ exports.InspectExceptionQueryDefinition = {
|
|
|
19
19
|
const out = queryResults;
|
|
20
20
|
result.push(`Query: ${(0, ansi_1.bold)('inspect-exception', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
|
|
21
21
|
const n = await processed.normalize();
|
|
22
|
-
function
|
|
22
|
+
function locationOf(r) {
|
|
23
23
|
const node = n.idMap.get(node_id_1.NodeId.normalize(r));
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
function getLexeme(r) {
|
|
27
|
-
return n.idMap.get(node_id_1.NodeId.normalize(r))?.lexeme ?? String(r);
|
|
24
|
+
return range_1.SourceLocation.fromNode(node);
|
|
28
25
|
}
|
|
29
26
|
for (const [r, v] of Object.entries(out.exceptions)) {
|
|
30
|
-
result.push(` - Function ${(0, ansi_1.bold)(r, formatter)} (${range_1.SourceLocation.format(
|
|
27
|
+
result.push(` - Function ${(0, ansi_1.bold)(r, formatter)} (${range_1.SourceLocation.format(locationOf(r))}) ${v.length > 0 ? 'throws exceptions:' : 'does not throw exceptions.'}`);
|
|
31
28
|
for (const { id: ex, cds } of v) {
|
|
32
|
-
result.push(` - Exception ${(0, info_1.happensInEveryBranch)(cds) ? 'always ' : 'maybe '}thrown at id ${(0, ansi_1.bold)(String(ex), formatter)} "${
|
|
29
|
+
result.push(` - Exception ${(0, info_1.happensInEveryBranch)(cds) ? 'always ' : 'maybe '}thrown at id ${(0, ansi_1.bold)(String(ex), formatter)} "${node_id_1.NodeId.recoverName(node_id_1.NodeId.normalize(ex), n.idMap) ?? String(ex)}" (${range_1.SourceLocation.format(locationOf(ex))}, cds: ${cds?.map(c => c.when + ':' + range_1.SourceLocation.format(locationOf(c.id))).join(', ') ?? 'none'})`);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
return true;
|
|
@@ -15,7 +15,7 @@ function keepRoles(all, graph, formals, mask) {
|
|
|
15
15
|
for (const [id, roles] of Object.entries(all)) {
|
|
16
16
|
const some = {};
|
|
17
17
|
for (const [formal, props] of Object.entries(roles)) {
|
|
18
|
-
const named =
|
|
18
|
+
const named = node_id_1.NodeId.recoverName(node_id_1.NodeId.normalize(formal), graph.idMap);
|
|
19
19
|
if ((formals === undefined || (named !== undefined && formals.has(named))) && (props & mask) !== 0) {
|
|
20
20
|
some[formal] = props & mask;
|
|
21
21
|
}
|
|
@@ -14,6 +14,7 @@ const range_1 = require("../../../util/range");
|
|
|
14
14
|
const built_in_props_1 = require("../../../dataflow/environments/built-in-props");
|
|
15
15
|
const objects_1 = require("../../../util/objects");
|
|
16
16
|
const argument_roles_1 = require("../../../dataflow/fn/argument-roles");
|
|
17
|
+
const arrays_1 = require("../../../util/collections/arrays");
|
|
17
18
|
/** refuses a query that can only answer with nothing: `formals` narrowing an answer that carries none, or `props` naming only properties the single half it asks for cannot state */
|
|
18
19
|
function rejectEmptyAnswer(query, helpers) {
|
|
19
20
|
const { only, formals, props } = query;
|
|
@@ -39,7 +40,7 @@ exports.InspectFnPropsQueryDefinition = {
|
|
|
39
40
|
const node = idMap.get(node_id_1.NodeId.normalize(id));
|
|
40
41
|
const loc = node ? range_1.SourceLocation.fromNode(node) : undefined;
|
|
41
42
|
const formals = Object.entries(out.roles[id] ?? {})
|
|
42
|
-
.map(([formal, props]) => `${
|
|
43
|
+
.map(([formal, props]) => `${node_id_1.NodeId.recoverName(node_id_1.NodeId.normalize(formal), idMap) ?? formal}: ${function_semantics_1.FunctionSemantics.call.argument.words(props).join(', ')}`)
|
|
43
44
|
.join(', ');
|
|
44
45
|
const states = function_semantics_1.FunctionSemantics.call.props.labels(out.props[id]).join(', ');
|
|
45
46
|
result.push(` - Function ${(0, ansi_1.bold)(id, formatter)} (${range_1.SourceLocation.format(loc)}) ${formals}${states.length > 0 ? ` [${states}]` : ''}`);
|
|
@@ -58,7 +59,7 @@ exports.InspectFnPropsQueryDefinition = {
|
|
|
58
59
|
}).custom(rejectEmptyAnswer).description('Either returns all function definitions alongside what they and their formals do, or just those matching the filters.'),
|
|
59
60
|
flattenInvolvedNodes: (queryResults) => {
|
|
60
61
|
const out = queryResults;
|
|
61
|
-
return
|
|
62
|
+
return (0, arrays_1.uniqueArrayMerge)(Object.keys(out.roles), Object.keys(out.props));
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
//# sourceMappingURL=inspect-fn-props-query-format.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeRecursionQuery = executeRecursionQuery;
|
|
4
|
-
const
|
|
4
|
+
const call_graph_1 = require("../../../dataflow/graph/call-graph");
|
|
5
5
|
const query_function_filter_1 = require("../../query-function-filter");
|
|
6
6
|
/**
|
|
7
7
|
* Execute recursion function inspection queries on the given analyzer.
|
|
@@ -11,7 +11,7 @@ async function executeRecursionQuery({ analyzer }, queries) {
|
|
|
11
11
|
const { cg, fns } = await query_function_filter_1.QueryFunctionFilter.inCallGraph(queries, analyzer);
|
|
12
12
|
const result = {};
|
|
13
13
|
for (const [id] of fns) {
|
|
14
|
-
result[id] =
|
|
14
|
+
result[id] = call_graph_1.CallGraph.isRecursive(id, cg);
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
17
|
'.meta': {
|
|
@@ -16,11 +16,18 @@ const assert_1 = require("../../../util/assert");
|
|
|
16
16
|
*/
|
|
17
17
|
async function executeLinterQuery({ analyzer }, queries) {
|
|
18
18
|
// no explicit rules: run the rules that opt in via activeByDefault (default true), minus those the (project-kind
|
|
19
|
-
// specialized) config disables -- e.g. software-has-license/-tests are off for a lone script or a
|
|
19
|
+
// specialized) config disables by name or tag -- e.g. software-has-license/-tests are off for a lone script or a
|
|
20
|
+
// notebook, and the cmd-check rules for everything but a package
|
|
20
21
|
const disabled = new Set(analyzer.flowrConfig.linter.disabledRules);
|
|
22
|
+
const disabledTags = new Set(analyzer.flowrConfig.linter.disabledTags ?? []);
|
|
21
23
|
const defaultRules = Object.keys(linter_rules_1.LintingRules)
|
|
22
|
-
.filter((name) =>
|
|
23
|
-
|
|
24
|
+
.filter((name) => {
|
|
25
|
+
const info = linter_rules_1.LintingRules[name].info;
|
|
26
|
+
return info.activeByDefault !== false && !disabled.has(name) && !info.tags.some(t => disabledTags.has(t));
|
|
27
|
+
});
|
|
28
|
+
const tagged = (tags) => Object.keys(linter_rules_1.LintingRules)
|
|
29
|
+
.filter(name => linter_rules_1.LintingRules[name].info.tags.some(t => tags.includes(t)));
|
|
30
|
+
const flattened = queries.flatMap(q => q.rules ?? (q.tags ? tagged(q.tags) : defaultRules));
|
|
24
31
|
const distinct = new Set(flattened);
|
|
25
32
|
if (distinct.size !== flattened.length) {
|
|
26
33
|
const pretty = [...distinct].filter(r => flattened.indexOf(r) !== flattened.lastIndexOf(r)).map(r => typeof r === 'string' ? r : r.name).join(', ');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
|
|
2
2
|
import type { ParsedQueryLine } from '../../query';
|
|
3
3
|
import Joi from 'joi';
|
|
4
|
+
import { LintingRuleTag } from '../../../linter/linter-tags';
|
|
4
5
|
import { executeLinterQuery } from './linter-query-executor';
|
|
5
6
|
import { type LintingRuleNames } from '../../../linter/linter-rules';
|
|
6
7
|
import { type ConfiguredLintingRule, LintingResultCertainty } from '../../../linter/linter-format';
|
|
@@ -16,6 +17,8 @@ export interface LinterQuery extends BaseQueryFormat {
|
|
|
16
17
|
* Optionally, a {@link ConfiguredLintingRule} can be provided, which additionally includes custom user-supplied values for the linting rules' configurations.
|
|
17
18
|
*/
|
|
18
19
|
readonly rules?: readonly (LintingRuleNames | ConfiguredLintingRule)[];
|
|
20
|
+
/** Lint for every rule carrying one of these tags (e.g. `cmd-check` for the R CMD check rules), on by default or not. */
|
|
21
|
+
readonly tags?: readonly LintingRuleTag[];
|
|
19
22
|
/** Print the findings in a machine-readable {@link LinterOutputFormat|format} instead of the human-readable summary. */
|
|
20
23
|
readonly format?: LinterOutputFormat;
|
|
21
24
|
}
|
|
@@ -35,7 +38,7 @@ export declare const LinterQueryDefinition: {
|
|
|
35
38
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
36
39
|
readonly completer: typeof linterQueryCompleter;
|
|
37
40
|
readonly fromLine: typeof linterQueryLineParser;
|
|
38
|
-
readonly syntax: "@linter [rules:<r1>,<r2>,...] [format:<fmt>] <code | file://path>";
|
|
41
|
+
readonly syntax: "@linter [rules:<r1>,<r2>,...] [tags:<t1>,...] [format:<fmt>] <code | file://path>";
|
|
39
42
|
readonly schema: Joi.ObjectSchema<any>;
|
|
40
43
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult, _queries: readonly import("../../query").Query[], certainty: LintingResultCertainty | undefined) => ((string & {
|
|
41
44
|
__brand?: "node-id";
|