Add ruleset packs, linter, fixtures, and JSON schema

This commit is contained in:
2025-12-31 22:21:43 -05:00
parent dddac108fe
commit 21bb7cae5a
16 changed files with 475 additions and 174 deletions

View File

@@ -4,4 +4,4 @@ mod types;
pub use json::render_json;
pub use text::{render_fix_line, render_scan_line, render_summary};
pub use types::{Report, ScanReport};
pub use types::{FixJsonReport, Report, ScanJsonReport, ScanReport, SCHEMA_VERSION};

View File

@@ -3,6 +3,8 @@ use serde::{Deserialize, Serialize};
use crate::fix::FixOutcome;
use crate::scan::ScanOutcome;
pub const SCHEMA_VERSION: &str = "1.0";
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ScanReport {
pub scan: ScanOutcome,
@@ -13,3 +15,16 @@ pub struct Report {
pub scan: ScanOutcome,
pub fix: Option<FixOutcome>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ScanJsonReport {
pub schema_version: String,
pub scans: Vec<ScanOutcome>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FixJsonReport {
pub schema_version: String,
pub scans: Vec<ScanOutcome>,
pub fixes: Vec<FixOutcome>,
}