@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
27 lines (26 loc) • 1.61 kB
TypeScript
import { FlowrAnalyzerPlugin, PluginType } from '../flowr-analyzer-plugin';
import type { RParseRequest } from '../../../r-bridge/retriever';
import type { RProjectAnalysisRequest } from '../../context/flowr-analyzer-files-context';
import { type FlowrFile } from '../../context/flowr-file';
/**
* This is the base class for all plugins that discover files in a project for analysis.
* These plugins interplay with the {@link FlowrAnalyzerFilesContext} to gather information about the files in the project.
* See {@link DefaultFlowrAnalyzerProjectDiscoveryPlugin} for the dummy default implementation.
*
* In general, these plugins only trigger for a {@link RProjectAnalysisRequest} with the idea to discover all files in a project.
*/
export declare abstract class FlowrAnalyzerProjectDiscoveryPlugin extends FlowrAnalyzerPlugin<RProjectAnalysisRequest, (RParseRequest | FlowrFile<string>)[]> {
readonly type = PluginType.ProjectDiscovery;
static defaultPlugin(): FlowrAnalyzerProjectDiscoveryPlugin;
}
/** Configuration options for the {@link DefaultFlowrAnalyzerProjectDiscoveryPlugin}. */
export interface ProjectDiscoveryConfig {
/** the regex to trigger R source file discovery on (and hence analyze them as R files) */
triggerOnExtensions?: RegExp;
/** the regex to ignore certain paths entirely */
ignorePathsRegex?: RegExp;
/** the regex to exclude certain paths from being requested as R files (they are still collected as text files) */
excludePathsRegex?: RegExp;
/** if set, only paths matching this regex are traversed */
onlyTraversePaths?: RegExp;
}