Skip to content

Releases: check-spelling/check-spelling

Release 0.0.19

12 Jul 19:48
436362f
Compare
Choose a tag to compare

Security release

GHSA-g86g-chm8-7r2p

Outdated

Note
You should upgrade to v0.0.20.

Release 0.0.18

02 May 23:33
Compare
Choose a tag to compare
Pre-release

⛓️ @dependabot

⚠️ If you're seeing this because dependabot is showing you the changelog, please note that you almost certainly want to create your own push of the commit in a repository, because @dependabot does not appear to be able to publish a comment, which means you won't see a note about changes you need to make. Todo: Tolerate engine upgrades.

📰 News

I'm removing the Alpha moniker with this release. check-spelling has a number of happy consumers.

Changed defaults

  • 🔍 Words are only considered if they have at least 3 characters. Previously two letter words were flagged as well.
      with:
        shortest_word: 2
    
  • 🌴 Default branch is now main.

New features

  • 📚 Wiki has been updated significantly and is now the official source for documentation
  • 🌐 Website www.check-spelling.dev
  • 🐦 Twitter @_check_spelling
  • 👟 Quick Start -- clone the template repository and drop its .github directory into your repository to get started
  • 💬 You can now ask @check-spelling-bot to apply changes for you
      with:
        experimental_apply_changes_via_bot: 1
    
    ❗ This feature is not ready for repositories with bots or non-members. (In either case, the bot will end up commenting in response to things that aren't directed to it saying it's confused.)
  • 🐎 Files are checked in parallel (by default using two processes; if your system has more than 2 cores, you can tune this)
      with:
        experimental_parallel_jobs: 3
    
  • 🧙 Files are automatically recognized as not containing words and suggestions are offered for skipping them
  • 📕 Word length is automatically determined based on the dictionary
      with:
        shortest_word: 5
        longest_word: 10
    
  • 🐎 The GitHub Action has been switched to composite, this skips using a node.js trampoline.
    • ⚠️ node.js has access to certain features that composite doesn't, so this may be reverted if those features are needed in the future
  • 🔆 All unrecognized tokens are reported in the action log -- with one instance per token listed before additional instances of a token to ensure that the first 10 items shown in the review view have as much variety as possible
    • You no longer need to specify a fetch-depth for actions/checkout
  • 🔆 Tokens are wrapped with backticks instead of ' in the action log -- this should be helpful as ' is a character that appears in tokens
  • ⁉️ ' and ' are treated as '
  • 📗 advice.md is now supported in addition to advice.txt as the content is GitHub flavored markdown -- this should enable file extension based tools to render the content with a markdown renderer
  • 📝 Blank lines in patterns.txt / excludes.txt / only.txt are skipped
  • 🤫 Experimental support for suppressing comments and sending output to other GitHub action steps
  • ☑️ The action.yml file passes validation
  • ☑️ The Dockerfile has been updated (it isn't used and may be removed in the near future)
  • 🔒 Hosted GitHub instances might work -- If you have access to one, please send feedback

Alpha release 17

31 Dec 19:16
Compare
Choose a tag to compare
Pre-release

Upgrade notes

When upgrading your repository, (as always,) you'll want to apply this upgrade to a branch and review and consider the output -- review the GitHub Action Log details and address any warnings before merging to your default branch.

  • Please see Breaking changes for a note about stemming.
  • You may want to switch from schedule/pull_request to pull_request_target (see New features).
    I recommend that you try this in a fork, or an unrelated fork of your GitHub repository before switching.
    If you choose to adopt this feature, please wait until after you upgrade instead of doing so in the upgrade commit.
  • This release (and previous releases) should be perfectly happy with ubuntu-latest becoming ubuntu-20.04, so you can ignore this message.

Breaking changes

I try to minimize breaks as much as possible.

You might not even consider this a breaking change.

It's indeed a necessary bug-fix, but from my perspective it changes a core element of how the system works, and will probably result in a couple of additional lines in each project's expect file. This really isn't a big deal in the scheme of things, but I feel it's important to call out.

Stemming is performed after dictionary checking instead of before

Previously words were grouped into families before being checked against the dictionary, and if the core word was in the dictionary, its related words would be dropped as well. Now only words that are in the dictionary are dropped.

This fixes:

  • 🥔 potatos ❌ -- which was previously only reported as a typo if potato was not in the corpus.

When upgrading, you may see complaints about:

  • evals (eval is in the dictionary)
  • maxed (max is in the dictionary)
  • playlists (playlist is in the dictionary)
  • XXs (XX is in the dictionary)

... or similar items. In each case, the root of the word is in the dictionary, and unfortunately the conjugation is not. In order to correct against 🥔 🥔 potatoes misspellings, the folding order had to be reversed. It's a small price to pay for correctness (🍠 ).

If you'd like these words to be treated as words, you can add them to an allow file instead of an expect file. There isn't a huge difference between the two. The main distinction is that the action tries to minimize the expect file, whereas the dictionary is just the sum of all its items (unless of course you remove items using reject).

New features

  • 🏋️ pull_request_target can be used instead of schedule
  • 📕 Specify dictionary_url / dictionary_version to replace the default dictionary
  • 📍 run locally using nektos/act
  • ✪ Improved out of the box experience: .github/actions/spelling/ can be used without any yaml configuration
  • 🏃 improved comment command for updating expect
  • 📝 improved instructions and documentation

🐜Bug fixes

  • reject should work
  • 🚪Windows/DOS line ending compatibility updating expect
  • 🤯 Avoid losing headers in comment output

Alpha release 16

15 May 04:22
Compare
Choose a tag to compare
Pre-release

New features

Feature Description
🎯 only limit checks to certain file paths
📚 allow supplement dictionary without completely replacing
reject remove items from dictionary without completely replacing
expect expect replaces whitelist (supported, but will warn)
⬢Node.js switch from Docker to Node.js to start ~30s faster
🐪 portable the command to update the expect list can now be run in more shells
exclude warnings if there are compile errors in exclude patterns
📑 highlight adds markup for sub word misspellings (they were found and reported but not tagged)
📝 wiki wiki with examples, wishlist
📽 examples more samples in readme and wiki
🥾 bootstrap documentation for getting started
🐳Docker Docker build optimizations
license updated license files for GitHub
👩‍🔧 refactor refactor event handling

Alpha release 15

20 Apr 18:17
Compare
Choose a tag to compare
Pre-release

✨New features

  • 🚪Windows/DOS line ending compatibility

🐜Bug fixes

  • 📜 Instructions for strictly removing stale whitelist entries no longer includes a broken command for adding new whitelist items.

Alpha release 14

07 Apr 01:28
Compare
Choose a tag to compare
Pre-release

New features

Feature Description
patterns warnings if your regular expressions are invalid
files warnings if your files don't end with a newline
📜 logging if your commit(s) only reduce misspellings, the action log will include the command to remove the whitelist entries

🐜Bug fixes

  • Handles very large numbers of misspellings 🐝🐝🐝🐝 (initial repository imports).

Alpha release 13

31 Mar 15:41
Compare
Choose a tag to compare
Pre-release

New features

Feature Description
💬 advice custom message to be included when posting a comment
schedule reporting on foreign PRs

🐜Bug fixes

  • 🔀Default workflow will work for branches with /s in their names.
  • Handles very large numbers of misspellings 🐝🐝🐝🐝 (initial repository imports).
  • Better handling of apostrophes in whitelisting message.

Schedule

If your .github/workflows/spelling.yml file (on your default branch) has:

on:
  # ...
  schedule:
    - cron: '5 * * * *' # You control the schedule...

The spell checker will check open PRs and make comments (it will try to only comment on a PR once after each time it has been updated).

In the short run, this can even spell check branches which don't yet have the spell checker (it will use the default branch's spell checking settings).

This feature is important if your project receives PRs from forks and the forks haven't enabled Actions. Enabling Actions is a decision of the owner of the forked repository and there's no guarantee that the spell checker will have run on the fork.

Ideally if a fork has the action enabled, before someone creates a PR, the spell checker will have already complained and they'll have addressed any items it identifies.

Thus, this extra pass should only really report in the case where a fork isn't using actions.

📰 News

This action has its first major consumer: microsoft/terminal.

Many thanks to them for helping this tool develop.

Alpha release 12

22 Mar 21:34
Compare
Choose a tag to compare
Pre-release

Improvements

  • 🧵Parallel - 🚀⚡ speed improvement
  • 📑documentation for 📕 and 🧩
  • 📄files are sorted consistently by name before being merged

🐜Bug fixes

  • Word splitter won't ignore your corpus if you have a blank line in 🧩

Alpha release 11

17 Mar 07:43
Compare
Choose a tag to compare
Pre-release

This release should be usable by medium sized projects.

New features

Feature Description
📁 directories for files instead of a single file 📄
#️⃣ comments for some files
🧩 patterns to exclude content within files
📕 dictionaries this lets you replace the default US English dictionary and then supplement it with additional custom dictionaries

Warnings

  • Do not leave an empty line in any patterns files. (Fixed in the next release)

Alpha Release 10

04 Mar 02:35
Compare
Choose a tag to compare
Pre-release

Forks

Actions on forked repositories

Normally, forks don't run actions, which means that users who create commits on forks don't automatically see the results of the spell checker. -- You can ask people to turn on Actions in forks of your repository, but you can't rely on that (and as w/ the other direction, you should understand why users may be reluctant).

PRs from forks

When one creates a PR from a fork back into the main repository, actions run w/ a readonly token (otherwise you'd be running the PR's arbitrary code w/ your write token which is just dangerous). Unfortunately, readonly tokens can't make comments, which means that the PR won't get easily recognized spell checking there either. -- The action run should still have the general information, but unless someone looks at the logs, they won't see much beyond a ❌.

Addressing the problem

The solution is for the default branch to schedule checks against all open

This adds support for:

on:
  schedule:
    - cron: '5 * * * *'

This triggers an extra script which goes through, checks for PRs from forks and then runs the normal checking process on each PR.

Note: GitHub Actions have limits that you should consider.
By default, this script assumes that it's running every hour (you can set timeframe to the number of minutes between run, the default is thus 60). If your repository gets minimal traffic, you could switch to running this task daily and thus set it to 1440. If your repository gets lots of traffic, you might want to increase the frequency (to e.g. every 15mins and thus set the value to 15).

More documentation and examples to follow. -- I'm hoping to test this feature w/ a couple of projects of varying size shortly which should help me tune this.