Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: default.extend-words-re #852

Closed
LilithHafner opened this issue Oct 14, 2023 · 1 comment · Fixed by #854
Closed

Feature request: default.extend-words-re #852

LilithHafner opened this issue Oct 14, 2023 · 1 comment · Fixed by #854

Comments

@LilithHafner
Copy link

I have a pretty long typos.toml file, my project allows abbreviations in variable names, and I don't want to have to keep adding more entries to typos.toml whenever a new abbreviation is used. I'd like to exclude all corrections that are 4 or fewer letters long. default.extend-words-re = ["^[a-zA-Z][a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] seems like a reasonable extension for my repo.

Here's my typos.toml, for reference

[default.extend-words]
ba = "ba"
egal = "egal"
parm = "parm"
modul = "modul"
fpt = "fpt"
nd = "nd"
strat = "strat"
WRONLY = "WRONLY"
thisy = "thisy"
vally = "vally"
foor = "foor"
Ot = "Ot"
clos = "clos"
applys = "applys"
dne = "dne"
findn = "findn"
mis = "mis"
whos = "whos"
caf = "caf"
seh = "seh"
ue = "ue"
Daa = "Daa"
Missings = "Missings"
SOM = "SOM"
sais = "sais"
LITS = "LITS"
Merly = "Merly"
Filetimes = "Filetimes"
HSA = "HSA"
Strategems = "Strategems"
nce = "nce"
anumber = "anumber"
uupper = "uupper"
shttp = "shttp"
ser = "ser"
somes = "somes"
sav = "sav"
noo = "noo"
egals = "egals"
OLT = "OLT"
eyt = "eyt"
matc = "matc"

# strings in tests directories
fo = "fo"
Uest = "Uest"
Worl = "Worl"
helo = "helo"
bage = "bage"
Dows = "Dows"
truw = "truw"
aquire = "aquire"
noe = "noe"
Hel = "Hel"
nam = "nam"
Facilisi = "Facilisi"
vailable = "vailable"
thre = "thre"
alls = "alls"

# typos that are programmatically observable
compileable = "compileable"
overlayed = "overlayed"

[default.extend-identifiers]
mrs_claus = "mrs_claus"
womens = "womens"
siz = "siz"
breal = "breal"
Breal = "Breal"
Numer = "Numer"
dout = "dout"
splitted = "splitted"
affinitized = "affinitized"
bre = "bre"
key_smove = "key_smove"
readed_zero = "readed_zero"
wee = "wee"
alo = "alo"
laf = "laf"
check_inconsistentcy = "check_inconsistentcy"
blok = "blok"
clen = "clen"
enew = "enew"
ACI = "ACI"
usig = "usig"
eles = "eles"
L_OP_CALLL = "L_OP_CALLL"
OP_CALLL = "OP_CALLL"
nast = "nast"
@epage
Copy link
Collaborator

epage commented Oct 16, 2023

We added extend-ignore-identifiers-re in #693. Seems reasonable to extend this to words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants