patterns.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
  2. # Automatically suggested patterns
  3. # hit-count: 198 file-count: 52
  4. # https/http/file urls
  5. (?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
  6. # hit-count: 22 file-count: 8
  7. # GitHub actions
  8. \buses:\s+[-\w.]+/[-\w./]+@[-\w.]+
  9. # hit-count: 19 file-count: 5
  10. # libraries
  11. (?:\b|_)[Ll]ib(?:re(?=office)|era(?![lt])|)(?!ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
  12. # hit-count: 17 file-count: 8
  13. # version suffix <word>v#
  14. (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
  15. # hit-count: 15 file-count: 7
  16. # container images
  17. image: [-\w./:@]+
  18. # hit-count: 14 file-count: 9
  19. # imports
  20. ^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+
  21. # hit-count: 11 file-count: 2
  22. # hex digits including css/html color classes:
  23. (?:[\\0][xX]|\\u|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
  24. # hit-count: 8 file-count: 5
  25. # node packages
  26. (["'])@[^/'" ]+/[^/'" ]+\g{-1}
  27. # hit-count: 5 file-count: 2
  28. # css fonts
  29. \bfont(?:-family|):[^;}]+
  30. # hit-count: 4 file-count: 4
  31. # set arguments
  32. \b(?:bash|sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
  33. # hit-count: 4 file-count: 2
  34. # css url wrappings
  35. \burl\([^)]+\)
  36. # hit-count: 2 file-count: 2
  37. # C network byte conversions
  38. (?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()
  39. # hit-count: 2 file-count: 1
  40. # GitHub SHA refs
  41. \[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]*
  42. # hit-count: 1 file-count: 1
  43. # copyright
  44. Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
  45. # hit-count: 1 file-count: 1
  46. # IPv6
  47. \b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b
  48. # hit-count: 1 file-count: 1
  49. # Docker images
  50. ^\s*(?i)FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
  51. # hit-count: 1 file-count: 1
  52. # perl run
  53. perl(?:\s+-[a-zA-Z]\w*)+
  54. # hit-count: 1 file-count: 1
  55. # go install
  56. go install(?:\s+[a-z]+\.[-@\w/.]+)+
  57. # hit-count: 1 file-count: 1
  58. # in check-spelling@v0.0.22+, printf markers aren't automatically consumed
  59. # printf markers
  60. (?<!\\)\\[nrt](?=[a-z]{2,})
  61. # hit-count: 1 file-count: 1
  62. # tar arguments
  63. \b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
  64. # Questionably acceptable forms of `in to`
  65. # Personally, I prefer `log into`, but people object
  66. # https://www.tprteaching.com/log-into-log-in-to-login/
  67. \b(?:(?:[Ll]og(?:g(?=[a-z])|)|[Ss]ign)(?:ed|ing)?) in to\b
  68. # to opt in
  69. \bto opt in\b
  70. # pass(ed|ing) in
  71. \bpass(?:ed|ing) in\b
  72. # acceptable duplicates
  73. # ls directory listings
  74. [-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+[.\d]+(?:[KMGT]|)\s+
  75. # mount
  76. \bmount\s+-t\s+(\w+)\s+\g{-1}\b
  77. # C types and repeated CSS values
  78. \s(auto|buffalo|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s
  79. # C enum and struct
  80. \b(?:enum|struct)\s+(\w+)\s+\g{-1}\b
  81. # go templates
  82. \s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml):
  83. # doxygen / javadoc / .net
  84. (?:[\\@](?:brief|defgroup|groupname|link|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+(?:static|override|readonly|required|virtual))*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s
  85. # macOS file path
  86. (?:Contents\W+|(?!iOS)/)MacOS\b
  87. # Python package registry has incorrect spelling for macOS / Mac OS X
  88. "Operating System :: MacOS :: MacOS X"
  89. # "company" in Germany
  90. \bGmbH\b
  91. # IntelliJ
  92. \bIntelliJ\b
  93. # Commit message -- Signed-off-by and friends
  94. ^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
  95. # Autogenerated revert commit message
  96. ^This reverts commit [0-9a-f]{40}\.$
  97. # ignore long runs of a single character:
  98. \b([A-Za-z])\g{-1}{3,}\b
  99. # hit-count: 1 file-count: 1
  100. # microsoft
  101. \b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
  102. # hit-count: 1 file-count: 1
  103. # data url
  104. \bdata:[-a-zA-Z=;:/0-9+]*,\S*