epitls-pi/src/check/formatting.rs
2022-10-06 18:10:07 +02:00

17 lines
402 B
Rust

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} }}")
}