From 5181c42c57a328429d04eba449b107612fea7176 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 7 Aug 2023 22:44:04 +0200 Subject: [PATCH 1/3] fix(cli): Allow Nd in man pages --- crates/typos-cli/src/file_type_specifics.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index 76442cc..4d7d02e 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -7,6 +7,15 @@ pub const NO_CHECK_TYPES: &[&str] = &["cert", "lock"]; pub const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[ + ( + "man", + StaticDictConfig { + ignore_idents: &[ + "Nd", // .Nd macro of mdoc (see https://man.openbsd.org/mdoc.7#Nd) + ], + ignore_words: &[], + }, + ), ( "py", StaticDictConfig { From e5e8f25c8e993ef99f097d01473456f504ee1613 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Tue, 8 Aug 2023 08:00:03 +0200 Subject: [PATCH 2/3] fix(cli): Allow nd in css --- crates/typos-cli/src/file_type_specifics.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index 4d7d02e..e5c00af 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -7,6 +7,15 @@ pub const NO_CHECK_TYPES: &[&str] = &["cert", "lock"]; pub const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[ + ( + "css", + StaticDictConfig { + ignore_idents: &[ + "nd", // CSS class used by pygments (see https://github.com/pygments/pygments/blob/2.16.1/pygments/token.py#L146) + ], + ignore_words: &[], + }, + ), ( "man", StaticDictConfig { From d3e48b202bba17451e55b8b0767c551245c7ca83 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Tue, 8 Aug 2023 09:16:01 +0200 Subject: [PATCH 3/3] fix(cli): Allow ot and stap in sh --- crates/typos-cli/src/file_type_specifics.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index e5c00af..273a250 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -45,6 +45,16 @@ pub const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[ ], }, ), + ( + "sh", + StaticDictConfig { + ignore_idents: &[ + "ot", // the test command from GNU coreutils supports an -ot argument (see https://www.gnu.org/software/coreutils/manual/html_node/File-characteristic-tests.html) + "stap", // command from SystemTap (see https://sourceware.org/systemtap/man/stap.1.html) + ], + ignore_words: &[], + }, + ), ( "vim", StaticDictConfig {