UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

25 lines (24 loc) 1.31 kB
/** * Machine-readable renderings of linting results, for the tools that consume them (a CI, a code scanner, an editor). * @module */ import { type LintingRuleNames } from './linter-rules'; import { LintingResults } from './linter-format'; /** The linting results of every rule that ran, i.e. what a linter query returns. */ export type LintResultsByRule = { [L in LintingRuleNames]?: LintingResults<L>; }; /** The formats linting results are reported in. */ export declare enum LinterOutputFormat { /** flowR's own summary, made to be read by a human. The default, and the one {@link formatLints} leaves to flowR. */ Text = "text", /** [SARIF 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html), e.g. to upload to GitHub code scanning */ Sarif = "sarif", /** [GitHub workflow commands](https://docs.github.com/actions/reference/workflow-commands-for-github-actions), one annotation per finding */ Github = "github" } /** * Renders the linting results in the given {@link LinterOutputFormat|format}, `undefined` for * {@link LinterOutputFormat.Text|Text}: that one is flowR's own summary, which only flowR itself renders. */ export declare function formatLints(results: LintResultsByRule, format: LinterOutputFormat, flowrVersion: string): string | undefined;