improved checks
This commit is contained in:
parent
2f71ed5e03
commit
17636fca11
5 changed files with 57 additions and 20 deletions
17
src/check/formatting.rs
Normal file
17
src/check/formatting.rs
Normal 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} }}")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue