From 544f5bc304c2025de1e3bf4d2f879f872429fdaf Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 6 Oct 2025 13:00:39 -0500 Subject: [PATCH] fix(config): Don't correct PN for bitbake Fixes #1392 --- crates/typos-cli/src/file_type_specifics.rs | 9 +++++++++ crates/typos-cli/tests/cmd/false-positives.toml | 14 +------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/crates/typos-cli/src/file_type_specifics.rs b/crates/typos-cli/src/file_type_specifics.rs index 3440bb58..f617b899 100644 --- a/crates/typos-cli/src/file_type_specifics.rs +++ b/crates/typos-cli/src/file_type_specifics.rs @@ -7,6 +7,15 @@ pub(crate) const NO_CHECK_TYPES: &[&str] = &["cert", "lock"]; pub(crate) const TYPE_SPECIFIC_DICTS: &[(&str, StaticDictConfig)] = &[ + ( + "bitbake", + StaticDictConfig { + ignore_idents: &[], + ignore_words: &[ + "PN", // Package Name variable + ], + }, + ), ( "cpp", StaticDictConfig { diff --git a/crates/typos-cli/tests/cmd/false-positives.toml b/crates/typos-cli/tests/cmd/false-positives.toml index 268ee610..324f41d7 100644 --- a/crates/typos-cli/tests/cmd/false-positives.toml +++ b/crates/typos-cli/tests/cmd/false-positives.toml @@ -1,16 +1,4 @@ bin.name = "typos" -status.code = 2 stdin = "" -stdout = """ -error: `PN` should be `ON` - ╭▸ ./foo.bb:1:11 - │ -1 │ LICENSE:${PN} = "GPL-2.0.only"; FOO:pn-myrecipe = "myrecipe-specific value" - ╰╴ ━━ -error: `pn` should be `on` - ╭▸ ./foo.bb:1:37 - │ -1 │ LICENSE:${PN} = "GPL-2.0.only"; FOO:pn-myrecipe = "myrecipe-specific value" - ╰╴ ━━ -""" +stdout = "" stderr = ""