pub trait StaticAnalyzer<Config: StaticAnalyzerConfig> {
    // Required methods
    fn command(self) -> String;
    fn download(
        self,
        config: Option<Config>,
        skip_verify_checksum: bool,
    ) -> Self;
    fn download_checksums(self) -> Result<HashMap<String, String>, String>;
    fn extract(self, path: PathBuf, destination: Option<PathBuf>) -> PathBuf;
    fn resolve(
        _config: Config,
        _is_offline: bool,
        _skip_verify_checksum: bool,
    ) -> Self;
    fn run(&self, id: String, content: String, output: Option<String>) -> Check;
    fn sync(self, is_offline: bool) -> Result<(), Error>;
    fn with_binary<P>(self, path: P) -> Self
       where P: Into<PathBuf>;
    fn with_config(self, value: Config) -> Self;
    fn with_system_command(self) -> Self;
    fn with_version(self, value: String) -> Self;
}Expand description
Trait for static analyzers (e.g. Vale)
Required Methods§
Sourcefn download_checksums(self) -> Result<HashMap<String, String>, String>
 
fn download_checksums(self) -> Result<HashMap<String, String>, String>
Download checksum values
Sourcefn resolve(
    _config: Config,
    _is_offline: bool,
    _skip_verify_checksum: bool,
) -> Self
 
fn resolve( _config: Config, _is_offline: bool, _skip_verify_checksum: bool, ) -> Self
Resolve analyzer
Sourcefn run(&self, id: String, content: String, output: Option<String>) -> Check
 
fn run(&self, id: String, content: String, output: Option<String>) -> Check
Run analyzer on content
Sourcefn sync(self, is_offline: bool) -> Result<(), Error>
 
fn sync(self, is_offline: bool) -> Result<(), Error>
Perform sync operation (only applies to Vale)
Sourcefn with_binary<P>(self, path: P) -> Self
 
fn with_binary<P>(self, path: P) -> Self
Set binary
Sourcefn with_config(self, value: Config) -> Self
 
fn with_config(self, value: Config) -> Self
Set config
Sourcefn with_system_command(self) -> Self
 
fn with_system_command(self) -> Self
Set system command
Sourcefn with_version(self, value: String) -> Self
 
fn with_version(self, value: String) -> Self
Set version
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.