summaryrefslogtreecommitdiff
path: root/cli/tools/lint/reporters.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/lint/reporters.rs')
-rw-r--r--cli/tools/lint/reporters.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/lint/reporters.rs b/cli/tools/lint/reporters.rs
index cb00ad296..bf80be9f2 100644
--- a/cli/tools/lint/reporters.rs
+++ b/cli/tools/lint/reporters.rs
@@ -12,6 +12,8 @@ use crate::args::LintReporterKind;
use super::LintError;
+const JSON_SCHEMA_VERSION: u8 = 1;
+
pub fn create_reporter(kind: LintReporterKind) -> Box<dyn LintReporter + Send> {
match kind {
LintReporterKind::Pretty => Box::new(PrettyLintReporter::new()),
@@ -170,6 +172,7 @@ struct JsonLintDiagnostic {
#[derive(Serialize)]
struct JsonLintReporter {
+ version: u8,
diagnostics: Vec<JsonLintDiagnostic>,
errors: Vec<LintError>,
}
@@ -177,6 +180,7 @@ struct JsonLintReporter {
impl JsonLintReporter {
fn new() -> JsonLintReporter {
JsonLintReporter {
+ version: JSON_SCHEMA_VERSION,
diagnostics: Vec::new(),
errors: Vec::new(),
}