improved checks

This commit is contained in:
mb 2022-10-06 18:10:07 +02:00
parent 2f71ed5e03
commit 17636fca11
5 changed files with 57 additions and 20 deletions

17
src/check/formatting.rs Normal file
View file

@ -0,0 +1,17 @@
pub type StaticConf = [(&'static str, &'static str)];
/// TODO: fill with appropriate rules
pub const FORMAT_CONFIG: &StaticConf = &[
// (key, value)
("BasedOnStyle", "GNU"),
("IndentWidth", "4"),
];
pub fn formatted_config() -> String {
let middle = FORMAT_CONFIG
.into_iter()
.map(|(key, value)| format!("{key}: {value}"))
.collect::<Vec<_>>()
.join(", ");
format!("{{ {middle} }}")
}