Skip to content

Commit c63f61b

Browse files
authored
Merge pull request #1155 from epage/ft
feat: Update type-list for ripgrep 2acf25c
2 parents f468223 + 061bc78 commit c63f61b

File tree

1 file changed

+63
-14
lines changed

1 file changed

+63
-14
lines changed

crates/typos-cli/src/default_types.rs

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,33 @@
1010
/// columns (inclusive).
1111
#[rustfmt::skip]
1212
pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
13+
("ada", &["*.adb", "*.ads"]),
1314
("agda", &["*.agda", "*.lagda"]),
1415
("aidl", &["*.aidl"]),
16+
("alire", &["alire.toml"]),
1517
("amake", &["*.mk", "*.bp"]),
1618
("asciidoc", &["*.adoc", "*.asc", "*.asciidoc"]),
1719
("asm", &["*.asm", "*.s", "*.S"]),
1820
("asp", &[
19-
"*.aspx", "*.aspx.cs", "*.aspx.vb", "*.ascx", "*.ascx.cs", "*.ascx.vb",
21+
"*.aspx", "*.aspx.cs", "*.aspx.vb", "*.ascx", "*.ascx.cs",
22+
"*.ascx.vb", "*.asp"
2023
]),
2124
("ats", &["*.ats", "*.dats", "*.sats", "*.hats"]),
2225
("avro", &["*.avdl", "*.avpr", "*.avsc"]),
2326
("awk", &["*.awk"]),
27+
("bat", &["*.bat", "*.cmd"]),
2428
("bazel", &[
25-
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "WORKSPACE",
29+
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "MODULE.bazel",
30+
"WORKSPACE", "WORKSPACE.bazel",
2631
]),
2732
("bitbake", &["*.bb", "*.bbappend", "*.bbclass", "*.conf", "*.inc"]),
2833
("brotli", &["*.br"]),
2934
("buildstream", &["*.bst"]),
3035
("bzip2", &["*.bz2", "*.tbz2"]),
3136
("c", &["*.[chH]", "*.[chH].in", "*.cats"]),
3237
("cabal", &["*.cabal"]),
38+
("candid", &["*.did"]),
39+
("carp", &["*.carp"]),
3340
("cbor", &["*.cbor"]),
3441
("cert", &[
3542
// Certificate files:
@@ -51,6 +58,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
5158
("ceylon", &["*.ceylon"]),
5259
("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
5360
("cmake", &["*.cmake", "CMakeLists.txt"]),
61+
("cml", &["*.cml"]),
5462
("coffeescript", &["*.coffee"]),
5563
("config", &["*.cfg", "*.conf", "*.config", "*.ini"]),
5664
("coq", &["*.v"]),
@@ -68,14 +76,17 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
6876
("cython", &["*.pyx", "*.pxi", "*.pxd"]),
6977
("d", &["*.d"]),
7078
("dart", &["*.dart"]),
79+
("devicetree", &["*.dts", "*.dtsi"]),
7180
("dhall", &["*.dhall"]),
7281
("diff", &["*.patch", "*.diff"]),
82+
("dita", &["*.dita", "*.ditamap", "*.ditaval"]),
7383
("docker", &["*Dockerfile*"]),
84+
("dockercompose", &["docker-compose.yml", "docker-compose.*.yml"]),
7485
("dvc", &["Dvcfile", "*.dvc"]),
75-
("ebuild", &["*.ebuild"]),
86+
("ebuild", &["*.ebuild", "*.eclass"]),
7687
("edn", &["*.edn"]),
7788
("elisp", &["*.el"]),
78-
("elixir", &["*.ex", "*.eex", "*.exs"]),
89+
("elixir", &["*.ex", "*.eex", "*.exs", "*.heex", "*.leex", "*.livemd"]),
7990
("elm", &["*.elm"]),
8091
("erb", &["*.erb"]),
8192
("erlang", &["*.erl", "*.hrl"]),
@@ -92,26 +103,33 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
92103
("gap", &["*.g", "*.gap", "*.gi", "*.gd", "*.tst"]),
93104
("gn", &["*.gn", "*.gni"]),
94105
("go", &["*.go"]),
95-
("gradle", &["*.gradle"]),
106+
("gprbuild", &["*.gpr"]),
107+
("gradle", &[
108+
"*.gradle", "*.gradle.kts", "gradle.properties", "gradle-wrapper.*",
109+
"gradlew", "gradlew.bat",
110+
]),
111+
("graphql", &["*.graphql", "*.graphqls"]),
96112
("groovy", &["*.groovy", "*.gradle"]),
97113
("gzip", &["*.gz", "*.tgz"]),
98114
("h", &["*.h", "*.hpp"]),
99115
("haml", &["*.haml"]),
116+
("hare", &["*.ha"]),
100117
("hbs", &["*.hbs"]),
101-
("hs", &["*.hs", "*.lhs"]),
118+
("hs", &["*.hs", "*.lhs", "*.cpphs", "*.c2hs", "*.hsc"]),
102119
("html", &["*.htm", "*.html", "*.ejs"]),
103120
("hy", &["*.hy"]),
104121
("idris", &["*.idr", "*.lidr"]),
105122
("janet", &["*.janet"]),
106123
("java", &["*.java", "*.jsp", "*.jspx", "*.properties"]),
107124
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
108125
("jl", &["*.jl"]),
109-
("js", &["*.js", "*.jsx", "*.vue"]),
126+
("js", &["*.js", "*.jsx", "*.vue", "*.cjs", "*.mjs"]),
110127
("json", &["*.json"]),
111128
("jsonl", &["*.jsonl"]),
112129
("jupyter", &["*.ipynb", "*.jpynb"]),
113130
("k", &["*.k"]),
114131
("kotlin", &["*.kt", "*.kts"]),
132+
("lean", &["*.lean"]),
115133
("less", &["*.less"]),
116134
("license", &[
117135
// General
@@ -142,7 +160,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
142160
]),
143161
("lilypond", &["*.ly", "*.ily"]),
144162
("lisp", &["*.el", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
145-
("lock", &["*.lock", "package-lock.json", "requirements.txt", "go.sum", "pnpm-lock.yaml"]),
163+
("lock", &["*.lock", "package-lock.json", "composer.lock", "*.terraform.lock.hcl"]),
146164
("log", &["*.log"]),
147165
("lua", &["*.lua"]),
148166
("lz4", &["*.lz4"]),
@@ -157,14 +175,24 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
157175
("mako", &["*.mako", "*.mao"]),
158176
("man", &["*.[0-9lnpx]", "*.[0-9][cEFMmpSx]"]),
159177
("matlab", &["*.m"]),
160-
("md", &["*.markdown", "*.md", "*.mdown", "*.mkdn"]),
161-
("meson", &["meson.build", "meson_options.txt"]),
178+
("md", &[
179+
"*.markdown",
180+
"*.md",
181+
"*.mdown",
182+
"*.mdwn",
183+
"*.mkd",
184+
"*.mkdn",
185+
"*.mdx",
186+
]),
187+
("meson", &["meson.build", "meson_options.txt", "meson.options"]),
162188
("minified", &["*.min.html", "*.min.css", "*.min.js"]),
163189
("mint", &["*.mint"]),
164190
("mk", &["mkfile"]),
165191
("ml", &["*.ml"]),
192+
("motoko", &["*.mo"]),
166193
("msbuild", &[
167194
"*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets",
195+
"*.sln",
168196
]),
169197
("nim", &["*.nim", "*.nimf", "*.nimble", "*.nims"]),
170198
("nix", &["*.nix"]),
@@ -175,13 +203,19 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
175203
("pascal", &["*.pas", "*.dpr", "*.lpr", "*.pp", "*.inc"]),
176204
("pdf", &["*.pdf"]),
177205
("perl", &["*.perl", "*.pl", "*.PL", "*.plh", "*.plx", "*.pm", "*.t"]),
178-
("php", &["*.php", "*.php3", "*.php4", "*.php5", "*.phtml"]),
206+
("php", &[
207+
// note that PHP 6 doesn't exist
208+
// See: https://wiki.php.net/rfc/php6
209+
"*.php", "*.php3", "*.php4", "*.php5", "*.php7", "*.php8",
210+
"*.pht", "*.phtml"
211+
]),
179212
("po", &["*.po"]),
180213
("pod", &["*.pod"]),
181214
("postscript", &["*.eps", "*.ps"]),
215+
("prolog", &["*.prolog", "*.P"]),
182216
("protobuf", &["*.proto"]),
183217
("ps", &["*.cdxml", "*.ps1", "*.ps1xml", "*.psd1", "*.psm1"]),
184-
("puppet", &["*.erb", "*.pp", "*.rb"]),
218+
("puppet", &["*.epp", "*.erb", "*.pp", "*.rb"]),
185219
("purs", &["*.purs"]),
186220
("py", &[
187221
"*.py",
@@ -193,9 +227,15 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
193227
("qml", &["*.qml"]),
194228
("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
195229
("racket", &["*.rkt"]),
230+
("raku", &[
231+
"*.raku", "*.rakumod", "*.rakudoc", "*.rakutest",
232+
"*.p6", "*.pl6", "*.pm6"
233+
]),
196234
("rdoc", &["*.rdoc"]),
197235
("readme", &["README*", "*README"]),
236+
("reasonml", &["*.re", "*.rei"]),
198237
("red", &["*.r", "*.red", "*.reds"]),
238+
("rescript", &["*.res", "*.resi"]),
199239
("robot", &["*.robot"]),
200240
("rst", &["*.rst"]),
201241
("ruby", &[
@@ -237,12 +277,14 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
237277
("slim", &["*.skim", "*.slim", "*.slime"]),
238278
("smarty", &["*.tpl"]),
239279
("sml", &["*.sml", "*.sig"]),
280+
("solidity", &["*.sol"]),
240281
("soy", &["*.soy"]),
241282
("spark", &["*.spark"]),
242283
("spec", &["*.spec"]),
243284
("sql", &["*.sql", "*.psql"]),
244285
("stylus", &["*.styl"]),
245286
("sv", &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]),
287+
("svelte", &["*.svelte"]),
246288
("svg", &["*.svg"]),
247289
("swift", &["*.swift"]),
248290
("swig", &["*.def", "*.i"]),
@@ -256,13 +298,19 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
256298
("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*.bib", "*.dtx", "*.ins"]),
257299
("texinfo", &["*.texi"]),
258300
("textile", &["*.textile"]),
259-
("tf", &["*.tf"]),
301+
("tf", &[
302+
"*.tf", "*.auto.tfvars", "terraform.tfvars", "*.tf.json",
303+
"*.auto.tfvars.json", "terraform.tfvars.json", "*.terraformrc",
304+
"terraform.rc", "*.tfrc",
305+
]),
260306
("thrift", &["*.thrift"]),
261307
("toml", &["*.toml"]),
262-
("ts", &["*.ts", "*.tsx"]),
308+
("ts", &["*.ts", "*.tsx", "*.cts", "*.mts"]),
263309
("twig", &["*.twig"]),
264310
("txt", &["*.txt"]),
265311
("typoscript", &["*.typoscript"]),
312+
("usd", &["*.usd", "*.usda", "*.usdc"]),
313+
("v", &["*.v", "*.vsh"]),
266314
("vala", &["*.vala"]),
267315
("vb", &["*.vb"]),
268316
("vcl", &["*.vcl"]),
@@ -272,6 +320,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
272320
"*.vim", ".vimrc", ".gvimrc", "vimrc", "gvimrc", "_vimrc", "_gvimrc",
273321
]),
274322
("webidl", &["*.idl", "*.webidl", "*.widl"]),
323+
("wgsl", &["*.wgsl"]),
275324
("wiki", &["*.mediawiki", "*.wiki"]),
276325
("xml", &[
277326
"*.xml", "*.xml.dist", "*.dtd", "*.xsl", "*.xslt", "*.xsd", "*.xjb",

0 commit comments

Comments
 (0)