mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +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 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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue