Add ruleset packs, linter, fixtures, and JSON schema
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user