@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
39 lines (38 loc) • 2.92 kB
TypeScript
import { LintingRuleCertainty } from '../linter-format';
import { type FunctionsMetadata, type FunctionsResult } from './function-finder-util';
import { LintingRuleTag } from '../linter-tags';
import type { MergeableRecord } from '../../util/objects';
import type { FlowrSearchElement } from '../../search/flowr-search';
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
export interface NetworkFunctionsConfig extends MergeableRecord {
/** The list of function names that should be marked in the given context if their arguments match. */
fns: readonly string[];
/** only trigger if the function's read argument is linked to a value that matches this pattern */
onlyTriggerWithArgument?: RegExp | string;
}
export declare const NETWORK_FUNCTIONS: {
readonly createSearch: (config: NetworkFunctionsConfig) => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter", "with", "filter"], ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<ParentInformation, [] | FlowrSearchElement<ParentInformation>[]>>>;
readonly processSearchResult: (e: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, c: NetworkFunctionsConfig, d: {
normalize: import("../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
dataflow: import("../../dataflow/info").DataflowInformation;
cfg: import("../../control-flow/control-flow-graph").ControlFlowInformation;
analyzer: import("../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider;
}) => {
results: FunctionsResult[];
'.meta': FunctionsMetadata;
};
readonly prettyPrint: {
query: (result: FunctionsResult) => string;
full: (result: FunctionsResult) => string;
};
readonly info: {
readonly name: "Network Functions";
readonly tags: readonly [LintingRuleTag.Reproducibility, LintingRuleTag.Security, LintingRuleTag.Performance, LintingRuleTag.Smell];
readonly certainty: LintingRuleCertainty.BestEffort;
readonly description: "Marks network functions that execute network operations, such as downloading files or making HTTP requests.";
readonly defaultConfig: {
readonly fns: readonly ["read.table", "read.csv", "read.csv2", "read.delim", "read.delim2", "readRDS", "download.file", "url", "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "content", "handle", "get_callback", "VERB", "fread", "gzcon", "readlines", "source", "load", "curl_download", "curl_fetch_memory", "getURL", "getForm", "read_html", "html_nodes", "html_text", "fromJSON", "read.xlsx", "drive_download", "drive_get", "s3read_using", "s3write_using", "storage_download", "AnnotationHub", "ExperimentHub"];
readonly onlyTriggerWithArgument: RegExp;
};
};
};