mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Add severity to mono reports
This commit is contained in:
parent
70939f1d6a
commit
a1e7610709
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::report::{Annotation, Report, RocDocAllocator, RocDocBuilder};
|
||||
use crate::report::{Annotation, Report, RocDocAllocator, RocDocBuilder, Severity};
|
||||
use std::path::PathBuf;
|
||||
use ven_pretty::DocAllocator;
|
||||
|
||||
|
@ -33,6 +33,7 @@ pub fn mono_problem<'b>(
|
|||
filename,
|
||||
title: "UNSAFE PATTERN".to_string(),
|
||||
doc,
|
||||
severity: Severity::RuntimeError,
|
||||
}
|
||||
}
|
||||
BadDestruct => {
|
||||
|
@ -56,6 +57,7 @@ pub fn mono_problem<'b>(
|
|||
filename,
|
||||
title: "UNSAFE PATTERN".to_string(),
|
||||
doc,
|
||||
severity: Severity::RuntimeError,
|
||||
}
|
||||
}
|
||||
BadCase => {
|
||||
|
@ -79,6 +81,7 @@ pub fn mono_problem<'b>(
|
|||
filename,
|
||||
title: "UNSAFE PATTERN".to_string(),
|
||||
doc,
|
||||
severity: Severity::RuntimeError,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -104,6 +107,7 @@ pub fn mono_problem<'b>(
|
|||
filename,
|
||||
title: "REDUNDANT PATTERN".to_string(),
|
||||
doc,
|
||||
severity: Severity::Warning,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue