From 97014a87c0dba41a4259661db53695082ed20eab Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 4 Apr 2024 16:43:51 -0700 Subject: [PATCH] ci: add extra dictionary and patterns to spellcheck --- .github/actions/spelling/patterns.txt | 75 +++++++++++++++++++++++++++ .github/workflows/spelling.yml | 7 +++ 2 files changed, 82 insertions(+) create mode 100644 .github/actions/spelling/patterns.txt diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt new file mode 100644 index 0000000..a5d58b5 --- /dev/null +++ b/.github/actions/spelling/patterns.txt @@ -0,0 +1,75 @@ +# Automatically suggested patterns +# hit-count: 460 file-count: 2 +# base64 encoded content, possibly wrapped in mime +(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$) + +# hit-count: 129 file-count: 2 +# node packages +(["'])@[^/'" ]+/[^/'" ]+\g{-1} + +# hit-count: 51 file-count: 2 +# version suffix v# +(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) + +# hit-count: 20 file-count: 2 +# IPv6 +\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b + +# hit-count: 17 file-count: 7 +# https/http/file urls +(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] + +# hit-count: 5 file-count: 1 +# latex (check-spelling >= 0.0.22) +\\\w{2,}\{ + +# hit-count: 4 file-count: 1 +# Lorem +# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally ) +# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review - +# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into: +# ... Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary). +# ... You could manually change `(?i)X...` to use `[Xx]...` +# ... or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path) +(?:(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*) + +# hit-count: 2 file-count: 2 +# w3 +\bw3\.org/[-0-9a-zA-Z/#.]+ + +# hit-count: 2 file-count: 1 +# mailto urls +mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,} + +# hit-count: 2 file-count: 1 +# IServiceProvider / isAThing +\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z]|\b)) + +# hit-count: 2 file-count: 1 +# This does not cover multiline strings, if your repository has them, +# you'll want to remove the `(?=.*?")` suffix. +# The `(?=.*?")` suffix should limit the false positives rate +# printf +%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"]) + +# hit-count: 2 file-count: 1 +# Alternative printf +# %s +%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"]) + +# hit-count: 2 file-count: 1 +# libraries +\blib(?!rar(?:ies|y))(?=[a-z]) + +# hit-count: 1 file-count: 1 +# Twitter status +\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|) + +# hit-count: 1 file-count: 1 +# in check-spelling@v0.0.22+, printf markers aren't automatically consumed +# printf markers +(?