Skip to content

Commit

Permalink
Suppress typos detections for all short words
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Apr 2, 2024
1 parent 50ee312 commit 34ea8c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 16 additions & 4 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
[default.extend-words]
# https://github.com/crate-ci/typos/issues/415
ba = "ba"
[default]
# https://github.com/crate-ci/typos/blob/v1.19.0/docs/reference.md
# Be careful to handle extend-ignore-* variants
# - extend-ignore-words-re: macthed symbol
# - extend-ignore-identifiers-re: suggesting symbol
# - extend-ignore-re: matching target string
extend-ignore-words-re = [
# In my experience, false positive detection in typos occurred for short words.
#
# * My typos are increased as the words get longer
# * Too short often conflict with hash strings especially `ba`: https://github.com/crate-ci/typos/issues/415
# * Added 2 or 3 character abbreviations as wrong: https://github.com/crate-ci/typos/issues/955
#
# So I guess skipping all these detections makes reasonable behaviors for now and for the future.
"\\A[a-zA-Z]{1,3}\\z",
]

[files]
extend-exclude = [
"go.mod",
"*.terminal",
]
8 changes: 2 additions & 6 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,8 @@
+ "/examples/.irbrc"
;

# typos does not have feature global config, this is used in git hooks for https://github.com/kachick/dotfiles/issues/412
xdg.configFile."typos/_typos.toml".text = ''
[default.extend-words]
# https://github.com/crate-ci/typos/issues/415
ba = "ba"
'';
# typos does not have global config feature, this is used in git hooks for https://github.com/kachick/dotfiles/issues/412
xdg.configFile."typos/_typos.toml".source = ../_typos.toml;

# https://github.com/nix-community/home-manager/blob/release-23.11/modules/programs/fzf.nix
# https://github.com/junegunn/fzf/blob/master/README.md
Expand Down

0 comments on commit 34ea8c2

Please sign in to comment.