Skip to main content

fallow_config/config/
format.rs

1/// Output format for results.
2///
3/// This is CLI-only (via `--format` flag), not stored in config files.
4#[derive(Debug, Default, Clone)]
5pub enum OutputFormat {
6    /// Human-readable terminal output with source context.
7    #[default]
8    Human,
9    /// Machine-readable JSON.
10    Json,
11    /// SARIF format for GitHub Code Scanning.
12    Sarif,
13    /// One issue per line (grep-friendly).
14    Compact,
15    /// Markdown for PR comments.
16    Markdown,
17    /// CodeClimate JSON for GitLab Code Quality.
18    CodeClimate,
19}
20
21#[cfg(test)]
22mod tests {
23    use super::*;
24
25    #[test]
26    fn output_format_default_is_human() {
27        let format = OutputFormat::default();
28        assert!(matches!(format, OutputFormat::Human));
29    }
30}