PageRenderTime 226ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/crates/ignore/src/default_types.rs

https://github.com/BurntSushi/ripgrep
Rust | 248 lines | 228 code | 0 blank | 20 comment | 0 complexity | 5d97db6b4e76de02529423eec76d3ea4 MD5 | raw file
Possible License(s): MIT, Unlicense
  1. /// This list represents the default file types that ripgrep ships with. In
  2. /// general, any file format is fair game, although it should generally be
  3. /// limited to reasonably popular open formats. For other cases, you can add
  4. /// types to each invocation of ripgrep with the '--type-add' flag.
  5. ///
  6. /// If you would like to add or improve this list, please file a PR:
  7. /// https://github.com/BurntSushi/ripgrep
  8. ///
  9. /// Please try to keep this list sorted lexicographically and wrapped to 79
  10. /// columns (inclusive).
  11. #[rustfmt::skip]
  12. pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
  13. ("agda", &["*.agda", "*.lagda"]),
  14. ("aidl", &["*.aidl"]),
  15. ("amake", &["*.mk", "*.bp"]),
  16. ("asciidoc", &["*.adoc", "*.asc", "*.asciidoc"]),
  17. ("asm", &["*.asm", "*.s", "*.S"]),
  18. ("asp", &[
  19. "*.aspx", "*.aspx.cs", "*.aspx.cs", "*.ascx", "*.ascx.cs", "*.ascx.vb",
  20. ]),
  21. ("ats", &["*.ats", "*.dats", "*.sats", "*.hats"]),
  22. ("avro", &["*.avdl", "*.avpr", "*.avsc"]),
  23. ("awk", &["*.awk"]),
  24. ("bazel", &["*.bzl", "WORKSPACE", "BUILD", "BUILD.bazel"]),
  25. ("bitbake", &["*.bb", "*.bbappend", "*.bbclass", "*.conf", "*.inc"]),
  26. ("brotli", &["*.br"]),
  27. ("buildstream", &["*.bst"]),
  28. ("bzip2", &["*.bz2", "*.tbz2"]),
  29. ("c", &["*.[chH]", "*.[chH].in", "*.cats"]),
  30. ("cabal", &["*.cabal"]),
  31. ("cbor", &["*.cbor"]),
  32. ("ceylon", &["*.ceylon"]),
  33. ("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
  34. ("cmake", &["*.cmake", "CMakeLists.txt"]),
  35. ("coffeescript", &["*.coffee"]),
  36. ("config", &["*.cfg", "*.conf", "*.config", "*.ini"]),
  37. ("coq", &["*.v"]),
  38. ("cpp", &[
  39. "*.[ChH]", "*.cc", "*.[ch]pp", "*.[ch]xx", "*.hh", "*.inl",
  40. "*.[ChH].in", "*.cc.in", "*.[ch]pp.in", "*.[ch]xx.in", "*.hh.in",
  41. ]),
  42. ("creole", &["*.creole"]),
  43. ("crystal", &["Projectfile", "*.cr"]),
  44. ("cs", &["*.cs"]),
  45. ("csharp", &["*.cs"]),
  46. ("cshtml", &["*.cshtml"]),
  47. ("css", &["*.css", "*.scss"]),
  48. ("csv", &["*.csv"]),
  49. ("cython", &["*.pyx", "*.pxi", "*.pxd"]),
  50. ("d", &["*.d"]),
  51. ("dart", &["*.dart"]),
  52. ("dhall", &["*.dhall"]),
  53. ("diff", &["*.patch", "*.diff"]),
  54. ("docker", &["*Dockerfile*"]),
  55. ("ebuild", &["*.ebuild"]),
  56. ("edn", &["*.edn"]),
  57. ("elisp", &["*.el"]),
  58. ("elixir", &["*.ex", "*.eex", "*.exs"]),
  59. ("elm", &["*.elm"]),
  60. ("erb", &["*.erb"]),
  61. ("erlang", &["*.erl", "*.hrl"]),
  62. ("fidl", &["*.fidl"]),
  63. ("fish", &["*.fish"]),
  64. ("fortran", &[
  65. "*.f", "*.F", "*.f77", "*.F77", "*.pfo",
  66. "*.f90", "*.F90", "*.f95", "*.F95",
  67. ]),
  68. ("fsharp", &["*.fs", "*.fsx", "*.fsi"]),
  69. ("gap", &["*.g", "*.gap", "*.gi", "*.gd", "*.tst"]),
  70. ("gn", &["*.gn", "*.gni"]),
  71. ("go", &["*.go"]),
  72. ("gradle", &["*.gradle"]),
  73. ("groovy", &["*.groovy", "*.gradle"]),
  74. ("gzip", &["*.gz", "*.tgz"]),
  75. ("h", &["*.h", "*.hpp"]),
  76. ("haml", &["*.haml"]),
  77. ("haskell", &["*.hs", "*.lhs", "*.cpphs", "*.c2hs", "*.hsc"]),
  78. ("hbs", &["*.hbs"]),
  79. ("hs", &["*.hs", "*.lhs"]),
  80. ("html", &["*.htm", "*.html", "*.ejs"]),
  81. ("idris", &["*.idr", "*.lidr"]),
  82. ("java", &["*.java", "*.jsp", "*.jspx", "*.properties"]),
  83. ("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
  84. ("jl", &["*.jl"]),
  85. ("js", &["*.js", "*.jsx", "*.vue"]),
  86. ("json", &["*.json", "composer.lock"]),
  87. ("jsonl", &["*.jsonl"]),
  88. ("julia", &["*.jl"]),
  89. ("jupyter", &["*.ipynb", "*.jpynb"]),
  90. ("k", &["*.k"]),
  91. ("kotlin", &["*.kt", "*.kts"]),
  92. ("less", &["*.less"]),
  93. ("license", &[
  94. // General
  95. "COPYING", "COPYING[.-]*",
  96. "COPYRIGHT", "COPYRIGHT[.-]*",
  97. "EULA", "EULA[.-]*",
  98. "licen[cs]e", "licen[cs]e.*",
  99. "LICEN[CS]E", "LICEN[CS]E[.-]*", "*[.-]LICEN[CS]E*",
  100. "NOTICE", "NOTICE[.-]*",
  101. "PATENTS", "PATENTS[.-]*",
  102. "UNLICEN[CS]E", "UNLICEN[CS]E[.-]*",
  103. // GPL (gpl.txt, etc.)
  104. "agpl[.-]*",
  105. "gpl[.-]*",
  106. "lgpl[.-]*",
  107. // Other license-specific (APACHE-2.0.txt, etc.)
  108. "AGPL-*[0-9]*",
  109. "APACHE-*[0-9]*",
  110. "BSD-*[0-9]*",
  111. "CC-BY-*",
  112. "GFDL-*[0-9]*",
  113. "GNU-*[0-9]*",
  114. "GPL-*[0-9]*",
  115. "LGPL-*[0-9]*",
  116. "MIT-*[0-9]*",
  117. "MPL-*[0-9]*",
  118. "OFL-*[0-9]*",
  119. ]),
  120. ("lisp", &["*.el", "*.jl", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
  121. ("lock", &["*.lock", "package-lock.json"]),
  122. ("log", &["*.log"]),
  123. ("lua", &["*.lua"]),
  124. ("lz4", &["*.lz4"]),
  125. ("lzma", &["*.lzma"]),
  126. ("m4", &["*.ac", "*.m4"]),
  127. ("make", &[
  128. "[Gg][Nn][Uu]makefile", "[Mm]akefile",
  129. "[Gg][Nn][Uu]makefile.am", "[Mm]akefile.am",
  130. "[Gg][Nn][Uu]makefile.in", "[Mm]akefile.in",
  131. "*.mk", "*.mak"
  132. ]),
  133. ("mako", &["*.mako", "*.mao"]),
  134. ("man", &["*.[0-9lnpx]", "*.[0-9][cEFMmpSx]"]),
  135. ("markdown", &["*.markdown", "*.md", "*.mdown", "*.mkdn"]),
  136. ("matlab", &["*.m"]),
  137. ("md", &["*.markdown", "*.md", "*.mdown", "*.mkdn"]),
  138. ("mk", &["mkfile"]),
  139. ("ml", &["*.ml"]),
  140. ("msbuild", &[
  141. "*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets",
  142. ]),
  143. ("nim", &["*.nim", "*.nimf", "*.nimble", "*.nims"]),
  144. ("nix", &["*.nix"]),
  145. ("objc", &["*.h", "*.m"]),
  146. ("objcpp", &["*.h", "*.mm"]),
  147. ("ocaml", &["*.ml", "*.mli", "*.mll", "*.mly"]),
  148. ("org", &["*.org", "*.org_archive"]),
  149. ("pascal", &["*.pas", "*.dpr", "*.lpr", "*.pp", "*.inc"]),
  150. ("pdf", &["*.pdf"]),
  151. ("perl", &["*.perl", "*.pl", "*.PL", "*.plh", "*.plx", "*.pm", "*.t"]),
  152. ("php", &["*.php", "*.php3", "*.php4", "*.php5", "*.phtml"]),
  153. ("pod", &["*.pod"]),
  154. ("postscript", &["*.eps", "*.ps"]),
  155. ("protobuf", &["*.proto"]),
  156. ("ps", &["*.cdxml", "*.ps1", "*.ps1xml", "*.psd1", "*.psm1"]),
  157. ("puppet", &["*.erb", "*.pp", "*.rb"]),
  158. ("purs", &["*.purs"]),
  159. ("py", &["*.py"]),
  160. ("qmake", &["*.pro", "*.pri", "*.prf"]),
  161. ("qml", &["*.qml"]),
  162. ("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
  163. ("rdoc", &["*.rdoc"]),
  164. ("readme", &["README*", "*README"]),
  165. ("robot", &["*.robot"]),
  166. ("rst", &["*.rst"]),
  167. ("ruby", &["Gemfile", "*.gemspec", ".irbrc", "Rakefile", "*.rb"]),
  168. ("rust", &["*.rs"]),
  169. ("sass", &["*.sass", "*.scss"]),
  170. ("scala", &["*.scala", "*.sbt"]),
  171. ("sh", &[
  172. // Portable/misc. init files
  173. ".login", ".logout", ".profile", "profile",
  174. // bash-specific init files
  175. ".bash_login", "bash_login",
  176. ".bash_logout", "bash_logout",
  177. ".bash_profile", "bash_profile",
  178. ".bashrc", "bashrc", "*.bashrc",
  179. // csh-specific init files
  180. ".cshrc", "*.cshrc",
  181. // ksh-specific init files
  182. ".kshrc", "*.kshrc",
  183. // tcsh-specific init files
  184. ".tcshrc",
  185. // zsh-specific init files
  186. ".zshenv", "zshenv",
  187. ".zlogin", "zlogin",
  188. ".zlogout", "zlogout",
  189. ".zprofile", "zprofile",
  190. ".zshrc", "zshrc",
  191. // Extensions
  192. "*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh", "*.zsh",
  193. ]),
  194. ("slim", &["*.skim", "*.slim", "*.slime"]),
  195. ("smarty", &["*.tpl"]),
  196. ("sml", &["*.sml", "*.sig"]),
  197. ("soy", &["*.soy"]),
  198. ("spark", &["*.spark"]),
  199. ("spec", &["*.spec"]),
  200. ("sql", &["*.sql", "*.psql"]),
  201. ("stylus", &["*.styl"]),
  202. ("sv", &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]),
  203. ("svg", &["*.svg"]),
  204. ("swift", &["*.swift"]),
  205. ("swig", &["*.def", "*.i"]),
  206. ("systemd", &[
  207. "*.automount", "*.conf", "*.device", "*.link", "*.mount", "*.path",
  208. "*.scope", "*.service", "*.slice", "*.socket", "*.swap", "*.target",
  209. "*.timer",
  210. ]),
  211. ("taskpaper", &["*.taskpaper"]),
  212. ("tcl", &["*.tcl"]),
  213. ("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*.bib", "*.dtx", "*.ins"]),
  214. ("textile", &["*.textile"]),
  215. ("tf", &["*.tf"]),
  216. ("thrift", &["*.thrift"]),
  217. ("toml", &["*.toml", "Cargo.lock"]),
  218. ("ts", &["*.ts", "*.tsx"]),
  219. ("twig", &["*.twig"]),
  220. ("txt", &["*.txt"]),
  221. ("typoscript", &["*.typoscript", "*.ts"]),
  222. ("vala", &["*.vala"]),
  223. ("vb", &["*.vb"]),
  224. ("verilog", &["*.v", "*.vh", "*.sv", "*.svh"]),
  225. ("vhdl", &["*.vhd", "*.vhdl"]),
  226. ("vim", &["*.vim"]),
  227. ("vimscript", &["*.vim"]),
  228. ("webidl", &["*.idl", "*.webidl", "*.widl"]),
  229. ("wiki", &["*.mediawiki", "*.wiki"]),
  230. ("xml", &[
  231. "*.xml", "*.xml.dist", "*.dtd", "*.xsl", "*.xslt", "*.xsd", "*.xjb",
  232. "*.rng", "*.sch", "*.xhtml",
  233. ]),
  234. ("xz", &["*.xz", "*.txz"]),
  235. ("yacc", &["*.y"]),
  236. ("yaml", &["*.yaml", "*.yml"]),
  237. ("z", &["*.Z"]),
  238. ("zig", &["*.zig"]),
  239. ("zsh", &[
  240. ".zshenv", "zshenv",
  241. ".zlogin", "zlogin",
  242. ".zlogout", "zlogout",
  243. ".zprofile", "zprofile",
  244. ".zshrc", "zshrc",
  245. "*.zsh",
  246. ]),
  247. ("zstd", &["*.zst", "*.zstd"]),
  248. ];