UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

27 lines (26 loc) 1.33 kB
import { FlowrAnalyzerFilePlugin } from './flowr-analyzer-file-plugin'; import { SemVer } from 'semver'; import type { PathLike } from 'fs'; import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context'; import type { FlowrFileProvider } from '../../context/flowr-file'; /** * This plugin provides supports for the identification of test files. * If you use multiple plugins, this should be included *before* other plugins. */ export declare class FlowrAnalyzerMetaTestFilesPlugin extends FlowrAnalyzerFilePlugin { readonly name = "flowr-analyzer-test-files-plugin"; readonly description = "This plugin provides support for loading test files."; readonly version: SemVer; private readonly pathPattern; /** * Creates a new instance of the TEST file plugin. * @param pathPattern - The pathPattern to identify TEST files, see {@link TestPathPattern} for the default pathPattern. */ constructor(pathPattern?: RegExp); applies(file: PathLike): boolean; /** * Processes the given file, assigning it the {@link FileRole.Test} role. * Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose. */ process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true]; }