git-scanner 0.2.0

Git Scanner for code analaysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![warn(clippy::all)]

use failure::Error;
use serde_json::Value;
use std::path::Path;

/// Wrapper for the logic that calculates toxicity indicators
pub trait IndicatorCalculator: std::fmt::Debug {
    fn name(&self) -> String;
    fn calculate(&mut self, path: &Path) -> Result<Option<Value>, Error>;
    /// root-level metadata - output after all files added
    fn metadata(&self) -> Result<Option<Value>, Error>;
}