From bdad4f2b09ba1280adb1e0e6da0f0787f54e6def Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 16 May 2021 08:14:47 -0400 Subject: [PATCH] Spell check action for markdown documentation (#8675) Merge pull request 8675 --- .github/actions/spelling/README.md | 15 + .github/actions/spelling/advice.md | 27 + .github/actions/spelling/allow.txt | 0 .github/actions/spelling/excludes.txt | 31 + .github/actions/spelling/expect.txt | 684 ++++++++++++++++++ .github/actions/spelling/only.txt | 1 + .github/actions/spelling/patterns.txt | 61 ++ .github/actions/spelling/reject.txt | 7 + .github/workflows/spelling.yml | 19 + docs/_docs/continuous-integration/razorops.md | 2 +- 10 files changed, 846 insertions(+), 1 deletion(-) create mode 100644 .github/actions/spelling/README.md create mode 100644 .github/actions/spelling/advice.md create mode 100644 .github/actions/spelling/allow.txt create mode 100644 .github/actions/spelling/excludes.txt create mode 100644 .github/actions/spelling/expect.txt create mode 100644 .github/actions/spelling/only.txt create mode 100644 .github/actions/spelling/patterns.txt create mode 100644 .github/actions/spelling/reject.txt create mode 100644 .github/workflows/spelling.yml diff --git a/.github/actions/spelling/README.md b/.github/actions/spelling/README.md new file mode 100644 index 00000000..ec59bd73 --- /dev/null +++ b/.github/actions/spelling/README.md @@ -0,0 +1,15 @@ +# check-spelling/check-spelling configuration + +File | Purpose | Format | Info +-|-|-|- +[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary) +[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow) +[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject) +[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes) +[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only) +[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) +[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect) +[advice.txt](advice.txt) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice) + +Note: you can replace any of these files with a directory by the same name (minus the suffix) +and then include multiple files inside that directory (with that suffix) to merge multiple files together. diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md new file mode 100644 index 00000000..2a32b652 --- /dev/null +++ b/.github/actions/spelling/advice.md @@ -0,0 +1,27 @@ + +
If you see a bunch of garbage + +If it relates to a ... +
well-formed pattern + +See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it. + +If not, try writing one and adding it to the `patterns.txt` file. + +Patterns are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. + +Note that patterns can't match multiline strings. +
+
binary-ish string + +Please add a file path to the `excludes.txt` file instead of just accepting the garbage. + +File paths are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. + +`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( +../tree/HEAD/README.md) (on whichever branch you're using). +
+ +
diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt new file mode 100644 index 00000000..e69de29b diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt new file mode 100644 index 00000000..0d035882 --- /dev/null +++ b/.github/actions/spelling/excludes.txt @@ -0,0 +1,31 @@ +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes +(?:^|/)(?i)COPYRIGHT +(?:^|/)(?i)LICEN[CS]E +(?:^|/)package(?:-lock|)\.json$ +(?:^|/)vendor/ +/fonts/ +ignore$ +\.avi$ +\.eot$ +\.ico$ +\.jpe?g$ +\.lock$ +\.map$ +\.min\. +\.mod$ +\.mp[34]$ +\.png$ +\.svg$ +\.ttf$ +\.wav$ +\.woff$ +\.woff2$ +^docs/pages/redirects/github\.html$ +^lib/jekyll/mime\.types$ +^lib/theme_template/example/index\.html$ +^lib/theme_template/example/_post\.md$ +^test/fixtures/empty_permalink\.erb$ +^test/fixtures/webrick/bar/baz\.html$ +^test/fixtures/webrick/bar/foo\.xhtml$ +^test/source/_posts/2009-06-22-no-yaml\.markdown$ +^\.github/ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt new file mode 100644 index 00000000..7fd61c71 --- /dev/null +++ b/.github/actions/spelling/expect.txt @@ -0,0 +1,684 @@ +acl +activesupport +adaoraul +addons +aeiou +AFile +afterall +alfredxing +algolia +allowfullscreen +apps +appveyor +arengu +args +ariejan +arounds +asciinema +asdf +ashmaroli +attr +Autobuild +autocompletion +autogenerated +Autolink +autoload +autoreconf +autosave +aws +awscli +backend +backlink +backport +backtick +barcamp +baseurl +bashrc +baz +bbatsov +bdimcheff +binstubs +bip +bitbucket +blog +Blogger +blogging +bonafide +breadcrumbs +briandoll +bridgetown +bridgetownrb +brightbox +brighterplanet +buddyworks +Bugfix +Burela +byparker +cachegrind +calavera +callgraphs +cartera +cavalle +CDNs +cgi +changefreq +changelog +chango +charset +chcp +chdir +Cheatsheet +chmod +chown +Chrononaut +chruby +cibuild +circleci +CJK +classname +cloudcannon +Cloudinary +cloudsh +CLT +codebase +codeclimate +CODEOWNERS +coderay +codeslinger +coffeescript +colorator +commandline +commonmark +compat +compatibilize +concat +config +configyml +contentblocks +CORS +Cov +CRLFs +cron +crontab +cruft +css +csv +Currin +CWD +cygwin +daringfireball +datafiles +datetime +DCEU +Debian +debuggability +defunkt +delegators +deployer +deps +dest +Devkit +devops +digitalocean +dirs +disqus +ditaa +dnf +doclist +doctype +doeorg +dommmel +dotfile +downcase +downcased +duckduckgo +duritong +dysinger +ecf +editorconfig +eduardoboucas +Elasticsearch +elsif +Emacs +emails +emoji +endcapture +endfor +endhighlight +endif +endraw +endrender +endtablerow +Enumerables +EOL'd +erb +errordocument +eugenebolshakov +evaled +exe +execjs +extensionpack +extname +exts +favicon +Fengyun +ffi +figcaption +filesystem +firstimage +FIXME +flakey +flickr +fnmatch +fontello +forloop +formcake +formester +formingo +formkeep +formspark +formspree +formx +Forwardable +frameborder +freenode +frontmatter +fsnotify +ftp +fullstory +gcc +gcnovus +gemfile +gemset +gemspec +getform +getset +getsimpleform +gettalong +gfm +ghp +ghpages +giraffeacademy +github +githubusercontent +gitignore +gitlab +gjtorikian +globbed +globbing +google +gotcha +gridism +GSo +gsub +gsubbing +Hakiri +hardcode +hashbang +hashmap +helaili +henrik +heredoc +heroku +highlighter +hilighting +homepage +hostman +hostname +href +htaccess +htm +html +htmlproofer +http +httpd +httpdocs +hyperlinks +Iaa +ial +ico +icomoon +iconset +ified +iframe +img +Impl +Inlining +invokables +irc +ivey +ize +jalali +jameshamann +jamstackthemes +javascript +Jax +jayferd +jcon +jdoe +jeffreytse +jeffrydegrande +Jekpack +jekyllbot +jekyllconf +Jekyllers +Jekyllin +jekyllized +jekylllayoutconcept +jekyllrb +jekyllthemes +jemoji +jmcglone +jneen +johnreilly +jpg +jqr +jruby +json +jsonify +juretta +jwarby +kbd +Kentico +keycdn +kickster +kiwifruit +konklone +kontent +kramdown +Lamprecht +laquo +lastmod +launchctl +launchy +laurilehmijoki +ldquo +learnxinyminutes +lexer +LGTM +libcurl +libffi +lifecycle +lightgray +limjh +linenos +linkify +linux +liufengyun +livereload +localhost +localtime +loglevel +Losslessly +lovin +lsi +lsquo +lstrip +lyche +macos +macromates +mademistakes +mailto +markdownify +maruku +mathjax +mathml +mattr +mchung +mdash +memberspace +Memoize +memoized +memoizing +mergable +metadata +microdata +microsoft +mimetype +mingw +minibundle +minifier +minitest +mixin +mkasberg +mkd +mkdir +mkdn +mkdown +modernizr +mojombo +moz +mreid +msdn +mswin +MSYS +mtime +multiline +munging +Mvvm +myblog +mycontent +mydata +mydoc +myimage +mypage +myposts +myrepo +mysite +myvalue +myvar +myvariable +namespace +namespaced +navbar +nbsp +nearlyfreespeech +nethack +netlify +netlifycms +Neue +nginx +ngx +nielsenramon +nodejs +noifniof +nokogiri +notextile +onclick +onebox +oneclick +onschedule +opensource +openssl +Optim +orderofinterpretation +orgs +OSVDB +osx +packagecontrol +pacman +paginator +pandoc +pantulis +params +parkr +parseable +paspagon +passthrough +pathawks +Pathutil +paywall +pdf +permalink +PHP +pinboard +Piwigo +pjhyett +pkill +pkpass +placeholders +planetjekyll +plantuml +plugin +png +podcasts +popen +Posterous +postfiles +postlayout +postmodern +prepends +Prioritise +Probot +projectlist +pubstorm +pufuwozu +pwa +pwd +pygments +qrush +Quaid +quickstart +rackup +Rakefile +raquo +razorops +rbenv +rdiscount +rdoc +rdquo +readme +realz +rebund +redcarpet +redcloth +redgreen +redhat +refactor +refactoring +Refheap +regen +regex +regexp +remi +reqs +Responsify +revertable +rfc +rfelix +RHEL +ridk +roadmap +rowspan +rspec +rsquo +rss +rstrip +rsync +rtomayko +Rubo +rubocop +rubygem +rubyinstaller +rubyprof +rvm +ryanflorence +saas +samplelist +samrayner +sandboxed +Sassc +sassify +schemastore +Schwartzian +scp +screenshot +scrollbar +scroller +scss +scssify +sectore +semver +seo +serverless +setenv +SFTP +shopify +shortlog +shoulda +sieversii +sigpipe +simplecov +siteleaf +sitemap +SITENAME +Slicehost +slugified +slugify +smartforms +smartify +snipcart +socio +somedir +sonnym +Sonomy +sourced +sourcemaps +spam +spotify +src +ssg +ssh +SSL +stackoverflow +standalone +staticfiles +staticman +statictastic +STDERR +stdout +Stickyposts +strftime +stringified +Stringify +styleguide +stylesheet +subdir +subdomain +subfolder +subfolderitems +subnav +subpages +subpath +subpiece +subsubfolderitems +subthing +subvalues +subwidget +sudo +superdirectories +superdirs +SUSE +sverrirs +svg +svn +swfobject +swupd +symlink +symlinking +tablerow +tada +talkyard +tbody +technicalpickles +templating +templatize +Termux +textilize +textpattern +thead +therubyracer +Thornquest +thoughtbot +throughs +Tidelift +timeago +timezone +titleize +TLS +tmm +tmp +toc +tok +tomjoht +toml +tomo +toolset +toshimaru +triaged +triaging +truncatewords +tsv +ttf +Tudou +Tumblr +Tweetsert +txtpen +tzinfo +ubuntu +uby +ujh +ultron +undumpable +unencode +Unescape +unescaping +unicode +uniq +upcase +uppercasing +uri +url +urlset +username +usr +utf +utils +utime +utm +vanpelt +vendored +vercel +versioned +versioning +vertycal +Veyor +vilcans +visualstudio +vnd +vps +vscode +vwochnik +Walkthroughs +wdm +We'd +webfont +webhook +webhosting +webmentions +webrick +website +weekdate +whitelist +whitelisting +wiki +wikipedia +willcodeforfoo +woff +wordpress +Workaround +workflow +wsl +www +xcode +xdg +xhtml +XMinutes +xml +xmlns +xmlschema +yajl +yaml +Yarp +yml +Youku +youtube +yunbox +zeropadding +zlib +zoneinfo +zpinter +Zsh +zshrc +zypper +zzot diff --git a/.github/actions/spelling/only.txt b/.github/actions/spelling/only.txt new file mode 100644 index 00000000..af5f5b1c --- /dev/null +++ b/.github/actions/spelling/only.txt @@ -0,0 +1 @@ +^docs/.*\.md$ diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt new file mode 100644 index 00000000..b4c2bffc --- /dev/null +++ b/.github/actions/spelling/patterns.txt @@ -0,0 +1,61 @@ +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns + +# data urls +(['"])data:.*?\g{-1} +data:[-a-zA-Z=;:/0-9+]*,\S* + +# YouTube +https?://(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_]* +<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"] +\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]* +youtube_id:\s*[-a-zA-Z0-9?&=_]* +# Google Analytics +\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]* +# Google APIs +\bgoogleapis\.com/[a-z]+/v\d+/[a-z]+/[@./?=\w]+ +\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|) +# Google Calendar +\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+ +\w+\@group\.calendar\.google\.com\b +# Google DataStudio +\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|) +# The leading `/` here is as opposed to the `\b` above +# ... a short way to match `https://` or `http://` since most urls have one of those prefixes +# Google Docs +/docs\.google\.com/[a-z]+/d/(?:e/|)[0-9a-zA-Z_-]+/? +# Google Groups +https://groups\.google\.com/d/topic/[^/]+/[a-zA-Z0-9]+/discussion +https://groups\.google\.com/d/msg/[^/]+/[a-zA-Z0-9]+/[a-zA-Z0-9]+ +# Google themes +themes\.googleusercontent\.com/static/fonts/[^/]+/v\d+/[^.]+. +# Google CDN +\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]* +# Goo.gl +/goo\.gl/[a-zA-Z0-9]+ +# Google Chrome Store +\bchrome\.google\.com/webstore/detail/\w*(?:/\w*|) +# google_site_verification: +google_site_verification: [-a-zA-Z=;:/0-9+]* + +# Contributors +alphabetical order.*:.* +twitter_handle: .* + +# apiKey +apiKey: '[a-f0-9]+' + +# FontAwesome +/(?:(?i)FontAwesome\.\w+\?\w+) + +# Lorem +(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus|ultrices)\b(?:\w|\s|[,.])* + +# URL escaped characters +\%[0-9A-F]{2} +# c99 hex digits (not the full format, just one I've seen) + +# hex digits including css/html color classes: +(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b + +# ignore long runs of a single character: +\b([A-Za-z])\g{-1}{3,}\b diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt new file mode 100644 index 00000000..a5ba6f63 --- /dev/null +++ b/.github/actions/spelling/reject.txt @@ -0,0 +1,7 @@ +^attache$ +benefitting +occurence +Sorce +^[Ss]pae +^untill +^wether diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 00000000..cbc72ae2 --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,19 @@ +name: Spell checking +on: + pull_request_target: + push: + +jobs: + build: + name: Spell checking + runs-on: ubuntu-latest + steps: + - name: checkout-merge + if: "contains(github.event_name, 'pull_request')" + uses: actions/checkout@v2.0.0 + with: + ref: refs/pull/${{github.event.pull_request.number}}/merge + - name: checkout + if: "!contains(github.event_name, 'pull_request')" + uses: actions/checkout@v2.0.0 + - uses: check-spelling/check-spelling@v0.0.18 diff --git a/docs/_docs/continuous-integration/razorops.md b/docs/_docs/continuous-integration/razorops.md index f34ad082..fc92d339 100644 --- a/docs/_docs/continuous-integration/razorops.md +++ b/docs/_docs/continuous-integration/razorops.md @@ -25,7 +25,7 @@ With [Razorops][razorops-homepage] you can set up your Jekyll websites project's 1. Log in at [https://razorops.com/][razorops-homepage] with your GitHub/Bitbucket or Gitlab account 2. Create a pipeline, choose your Git provider and select your Jekyll Project 3. Add .razorops.yaml file in your root directory of your project -4. Add envirommant var and your deployment is ready +4. Add environment var and your deployment is ready 5. Add build and deployment steps as shown in this post [How to Deploy a Static Website to AWS S3 with Razorops CI/CD][deploy-s3] ## 2. How it works