From 61aa6561a338b827f9b3b476571e78d6bbf0438c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:20:04 -0400 Subject: [PATCH] Update check-spelling to v0.0.22 --- .github/actions/spelling/allow.txt | 3 +- .github/actions/spelling/candidate.patterns | 117 ++++++++++++++---- .github/actions/spelling/excludes.txt | 6 + .github/actions/spelling/expect.txt | 28 +++-- .../actions/spelling/line_forbidden.patterns | 41 ++++-- .github/actions/spelling/patterns.txt | 38 +++--- .github/workflows/spelling.yml | 28 ++--- 7 files changed, 176 insertions(+), 85 deletions(-) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 9b028381e1..d273928068 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -1,7 +1,6 @@ +Controlflow github https ssh ubuntu workarounds -Controlflow -controflow diff --git a/.github/actions/spelling/candidate.patterns b/.github/actions/spelling/candidate.patterns index af82ea4400..8a2b3d7cd6 100644 --- a/.github/actions/spelling/candidate.patterns +++ b/.github/actions/spelling/candidate.patterns @@ -12,8 +12,11 @@ # git index header index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40} +# file permissions +['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s] + # css url wrappings -\burl\([^)]*\) +\burl\([^)]+\) # cid urls (['"])cid:.*?\g{-1} @@ -130,6 +133,8 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. (?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|) # GitHub SHAs \bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b +# GitHub SHA refs +\[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]* # GitHub wiki \bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b # githubusercontent @@ -141,9 +146,9 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+. # git.io \bgit\.io/[0-9a-zA-Z]+ # GitHub JSON -"node_id": "[-a-zA-Z=;:/0-9+]*" +"node_id": "[-a-zA-Z=;:/0-9+_]*" # Contributor -\[[^\]]+\]\(https://github\.com/[^/\s"]+\) +\[[^\]]+\]\(https://github\.com/[^/\s"]+/?\) # GHSA GHSA(?:-[0-9a-z]{4}){3} @@ -156,7 +161,7 @@ GHSA(?:-[0-9a-z]{4}){3} # GitLab commits \bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b -# binanace +# binance accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]* # bitbucket diff @@ -385,7 +390,9 @@ ipfs://[0-9a-zA-Z]{3,} (?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m # URL escaped characters -\%[0-9A-F][A-F] +\%[0-9A-F][A-F](?=[A-Za-z]) +# lower URL escaped characters +\%[0-9a-f][a-f](?=[a-z]{2,}) # IPv6 \b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b # c99 hex digits (not the full format, just one I've seen) @@ -418,7 +425,7 @@ sha\d+:[0-9]*[a-f]{3,}[0-9a-f]* # hex digits including css/html color classes: (?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b # integrity -integrity=(['"])sha\d+-[-a-zA-Z=;:/0-9+]{40,}\g{-1} +integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1} # https://www.gnu.org/software/groff/manual/groff.html # man troff content @@ -433,8 +440,8 @@ integrity=(['"])sha\d+-[-a-zA-Z=;:/0-9+]{40,}\g{-1} # Localized .desktop content Name\[[^\]]+\]=.* -# IServiceProvider -\bI(?=(?:[A-Z][a-z]{2,})+\b) +# IServiceProvider / isAThing +\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+\b) # crypt (['"])\$2[ayb]\$.{56}\g{-1} @@ -442,6 +449,12 @@ Name\[[^\]]+\]=.* # scrypt / argon \$(?:scrypt|argon\d+[di]*)\$\S+ +# go.sum +\bh1:\S+ + +# scala modules +("[^"]+"\s*%%?\s*){2,3}"[^"]+" + # Input to GitHub JSON content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1} @@ -449,38 +462,58 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1} # 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,}))(?=.*?['"]) +%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,}))(?=[_a-zA-Z]+\b)(?!%)(?=.*?['"]) -# Python stringprefix / binaryprefix +# Python string prefix / binary prefix # Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings -(?|m([|!/@#,;']).*?\g{-1}) + +# perl qr regex +(?|\(.*?\)|([|!/@#,;']).*?\g{-1}) + +# perl run +perl(?:\s+-[a-zA-Z]\w*)+ # Go regular expressions regexp?\.MustCompile\(`[^`]*`\) +# regex choice +\(\?:[^)]+\|[^)]+\) + +# proto +^\s*(\w+)\s\g{-1} = + # sed regular expressions sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2} +# node packages +(["'])\@[^/'" ]+/[^/'" ]+\g{-1} + # go install go install(?:\s+[a-z]+\.[-@\w/.]+)+ +# jetbrains schema https://youtrack.jetbrains.com/issue/RSRP-489571 +urn:shemas-jetbrains-com + # kubernetes pod status lists # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase \w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+ @@ -492,7 +525,7 @@ go install(?:\s+[a-z]+\.[-@\w/.]+)+ -[0-9a-f]{10}-\w{5}\s # posthog secrets -posthog\.init\((['"])phc_[^"',]+\g{-1}, +([`'"])phc_[^"',]+\g{-1} # xcode @@ -508,15 +541,32 @@ customObjectInstantitationMethod # font awesome classes \.fa-[-a-z0-9]+ +# bearer auth +(['"])Bear[e][r] .*?\g{-1} + # basic auth (['"])Basic [-a-zA-Z=;:/0-9+]{3,}\g{-1} # base64 encoded content -(['"])[-a-zA-Z=;:/0-9+]+=\g{-1} +#([`'"])[-a-zA-Z=;:/0-9+]+=\g{-1} + +# base64 encoded content in xml/sgml +>[-a-zA-Z=;:/0-9+]+== 0.0.22) +\\\w{2,}\{ # eslint "varsIgnorePattern": ".+" @@ -542,13 +595,18 @@ customObjectInstantitationMethod # Windows short paths [/\\][^/\\]{5,6}~\d{1,2}[/\\] -# in a version of check-spelling after @0.0.21 printf markers won't be automatically consumed +# in check-spelling@v0.0.22+, printf markers aren't automatically consumed # printf markers (?v# (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) -# Compiler flags (Scala) -(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) -# Compiler flags -(?:^|[\t ,>"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (Unix, Java/Scala) +# Use if you have things like `-Pdocker` and want to treat them as `docker` +(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) + +# Compiler flags (Windows / PowerShell) +# This is a subset of the more general compiler flags pattern. +# It avoids matching `-Path` to prevent it from being treated as `ath` +(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})) + # Compiler flags (linker) ,-B + # curl arguments \b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)* # set arguments diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index d4a48c3352..4aa0971c58 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -17,6 +17,7 @@ \.cer$ \.class$ \.coveragerc$ +\.crl$ \.crt$ \.csr$ \.dll$ @@ -24,6 +25,7 @@ \.drawio$ \.DS_Store$ \.eot$ +\.eps$ \.exe$ \.gif$ \.git-blame-ignore-revs$ @@ -59,17 +61,21 @@ \.pylintrc$ \.qm$ \.s$ +\.sig$ \.so$ \.svgz?$ \.sys$ \.tar$ +\.tgz$ \.tiff?$ \.ttf$ \.wav$ \.webm$ \.webp$ \.woff2?$ +\.xcf$ \.xlsx?$ +\.xpm$ \.xz$ \.zip$ ^\.github/actions/spelling/ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 5a61f51bbd..0b0df6c0ea 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1,7 +1,7 @@ abbreviaterecipe +ACollection addjaxwsruntimegradle addjaxwsruntimemaven -ACollection admins Adoptium AKV @@ -15,6 +15,7 @@ autoconfigure avro awt azzert +baz bfa BOMs camelcase @@ -24,6 +25,7 @@ checkstyle circleci classdeclaration clickjacking +Cloudfront cloudsuitability CMK cmn @@ -35,6 +37,7 @@ Configurer contextualized controlflow corba +ctx cursoring cus customizability @@ -43,6 +46,7 @@ CWE cyclonedx databind datasource +DAX defaultstringfallbackrecipe defaultstringrecipe deletedirectoryfilerecipe @@ -72,6 +76,7 @@ gpg gpgsign gradlew hamcrest +hashcode Heroku HSQL httpclient @@ -80,6 +85,7 @@ identityprovider IHzb indexofcharrecipe indexofstringrecipe +inferrable initscript Intelli intranode @@ -136,7 +142,6 @@ MDBs methoddeclaration micronaut Migratetohypersistenceutilshibernate -Migratetohypersistenceutilshibernate6 minidev misk MNG @@ -145,7 +150,6 @@ mockito multimodule mvc mvn -mvnw mycompany NACHA netflix @@ -159,9 +163,9 @@ okio omg openj openrewrite -orgmeow owasp passwordencoder +pem petclinic Pgp Picatic @@ -173,10 +177,10 @@ projectlombok protobuf quarkus Querydsl +quickstart qute reactivestreams rebranded -Recile recipespec redundantcallrecipe Refaster @@ -187,8 +191,9 @@ replacerecipe reverserecipe rewritetest roadmap +Rsa Runtimes -Saas +saml scanningrecipe scryptpasswordencoder SDKMAN @@ -196,13 +201,13 @@ sdkmanrc searchresult securitycontextrepository semeru +servlet setcustomerinfo Skywalker slf smallrye smushed snakeyaml -Snyk Sonatype sourcespecs splitrecipe @@ -214,6 +219,7 @@ SSRF staticanalysis Stewjon striprecipe +subdir subpackages supertypes temurin @@ -223,6 +229,7 @@ throwz thymeleaf TML TODOs +tostring trimrecipe trimtoemptyrecipe trimtonullrecipe @@ -230,14 +237,19 @@ TVP Twilio uppercaserecipe useequalsignorecaserecipe +varargs variabledeclarations +versioning vladmihalcea +VPC Webflux websecurityconfigureradapter -wlp wiremock +wlp +workflows writestringtofilerecipe Wsoc +XRange xsi XXE Yoda diff --git a/.github/actions/spelling/line_forbidden.patterns b/.github/actions/spelling/line_forbidden.patterns index c138c53cf7..dc9cd9e535 100644 --- a/.github/actions/spelling/line_forbidden.patterns +++ b/.github/actions/spelling/line_forbidden.patterns @@ -11,21 +11,27 @@ # s.b. anymore \bany more[,.] +# s.b. cannot +\b[Cc]an not\b + # s.b. GitHub -\bGithub\b +(?"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) +# hit-count: 27 file-count: 8 +# Compiler flags (Unix, Java/Scala) +# Use if you have things like `-Pdocker` and want to treat them as `docker` +(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}) -# hit-count: 202 file-count: 201 -# Non-English -[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,} - -# hit-count: 17 file-count: 10 +# hit-count: 9 file-count: 5 # hex runs \b[0-9a-fA-F]{16,}\b -# hit-count: 12 file-count: 8 -# version suffix v# -(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) - -# hit-count: 2 file-count: 2 -# base64 encoded content -(['"])[-a-zA-Z=;:/0-9+]+=\g{-1} - # hit-count: 2 file-count: 1 # hex digits including css/html color classes: (?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b # hit-count: 1 file-count: 1 -# IServiceProvider -\bI(?=(?:[A-Z][a-z]{2,})+\b) +# version suffix v# +(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_])) # markdown file links \]\([^)]*\.md\) @@ -42,21 +31,24 @@ # Questionably acceptable forms of `in to` # Personally, I prefer `log into`, but people object # https://www.tprteaching.com/log-into-log-in-to-login/ -\b[Ll]og in to\b +\b(?:[Ll]og|[Ss]ign) in to\b + +# to opt in +\bto opt in\b # acceptable duplicates # ls directory listings -[-bcdlpsw](?:[-r][-w][-Ssx]){3}\s+\d+\s+\S+\s+\S+\s+\d+\s+ +[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+\d+\s+ # mount \bmount\s+-t\s+(\w+)\s+\g{-1}\b # C types and repeated CSS values -\s(center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s +\s(auto|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s # C struct \bstruct\s+(\w+)\s+\g{-1}\b # go templates \s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml): # doxygen / javadoc / .net -(?:[\\@](?:brief|groupname|t?param|return|retval)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s +(?:[\\@](?:brief|groupname|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+static|\s+override|\s+readonly)*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s # Commit message -- Signed-off-by and friends ^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$ diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index a73396da90..64090f077c 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -93,33 +93,25 @@ jobs: steps: - name: check-spelling id: spelling - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: - suppress_push_for_open_pull_request: 1 + suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} checkout: true check_file_names: 1 spell_check_this: openrewrite/rewrite-docs@master post_comment: 0 use_magic_file: 1 + warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check experimental_apply_changes_via_bot: ${{ github.repository_owner != 'openrewrite' && 1 }} use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} extra_dictionary_limit: 10 - dictionary_source_prefixes: | - {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell1": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/"} - check_extra_dictionaries: '' extra_dictionaries: - cspell1:software-terms/dict/softwareTerms.txt - cspell1:aws/aws.txt - cspell1:npm/dict/npm.txt - cspell1:java/src/java.txt - cspell1:k8s/dict/k8s.txt - cspell1:typescript/dict/typescript.txt - cspell1:filetypes/filetypes.txt - cspell1:fullstack/dict/fullstack.txt - cspell1:python/src/python/python-lib.txt - cspell1:scala/dict/scala.txt - cspell1:php/dict/php.txt - cspell1:node/dict/node.txt + cspell:software-terms/dict/softwareTerms.txt + cspell:java/src/java.txt + cspell:filetypes/filetypes.txt + cspell:k8s/dict/k8s.txt + cspell:npm/dict/npm.txt + cspell:typescript/dict/typescript.txt update: name: Update PR @@ -140,7 +132,7 @@ jobs: cancel-in-progress: false steps: - name: apply spelling updates - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: experimental_apply_changes_via_bot: 1 checkout: true