From 6ae2453784e38ed9c93b5f9680e6d4bebe939de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20D=C3=A9trez?= Date: Tue, 3 Sep 2024 16:54:42 +0200 Subject: [PATCH] WIP: languages.rs --- src/languages.rs | 7 +++++++ src/main.rs | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/languages.rs diff --git a/src/languages.rs b/src/languages.rs new file mode 100644 index 0000000..2c8bf09 --- /dev/null +++ b/src/languages.rs @@ -0,0 +1,7 @@ +macro_rules! languages { + ( $($lang:ident { } ),+, ) => {}; +} + +languages! { + Go {}, +} diff --git a/src/main.rs b/src/main.rs index 8b59426..bfe075c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ use rules::RuleSet; use unic_ucd_name::Name; mod config; +mod languages; mod rules; mod unicode_blocks; @@ -288,6 +289,13 @@ fn get_default_config() -> Config { .collect(), }, language: HashMap::from([ + ( + Language::Swift, + config::LanguageRules { + paths: Some(vec![glob::Pattern::new("**/*.swift").unwrap()]), + rules: Default::default(), + }, + ), ( Language::Rust, config::LanguageRules {