Add severity to mono reports

This commit is contained in:
Richard Feldman 2021-09-02 21:06:44 -04:00
parent 70939f1d6a
commit a1e7610709

View file

@ -1,4 +1,4 @@
use crate::report::{Annotation, Report, RocDocAllocator, RocDocBuilder}; use crate::report::{Annotation, Report, RocDocAllocator, RocDocBuilder, Severity};
use std::path::PathBuf; use std::path::PathBuf;
use ven_pretty::DocAllocator; use ven_pretty::DocAllocator;
@ -33,6 +33,7 @@ pub fn mono_problem<'b>(
filename, filename,
title: "UNSAFE PATTERN".to_string(), title: "UNSAFE PATTERN".to_string(),
doc, doc,
severity: Severity::RuntimeError,
} }
} }
BadDestruct => { BadDestruct => {
@ -56,6 +57,7 @@ pub fn mono_problem<'b>(
filename, filename,
title: "UNSAFE PATTERN".to_string(), title: "UNSAFE PATTERN".to_string(),
doc, doc,
severity: Severity::RuntimeError,
} }
} }
BadCase => { BadCase => {
@ -79,6 +81,7 @@ pub fn mono_problem<'b>(
filename, filename,
title: "UNSAFE PATTERN".to_string(), title: "UNSAFE PATTERN".to_string(),
doc, doc,
severity: Severity::RuntimeError,
} }
} }
}, },
@ -104,6 +107,7 @@ pub fn mono_problem<'b>(
filename, filename,
title: "REDUNDANT PATTERN".to_string(), title: "REDUNDANT PATTERN".to_string(),
doc, doc,
severity: Severity::Warning,
} }
} }
} }