Skip to content

Commit

Permalink
Fix spellcheck (#95)
Browse files Browse the repository at this point in the history
The wordlist is modified to accept all words in UPPERCASE, since those
are the ones causing the most trouble and are often command arguments or
acronyms not known by the spellchecker. Some more regexes are added to
the wordlist.

The CI job is modified to use another action.

A bunch of actual spelling errors are fixed.

Fixes #93

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
  • Loading branch information
zuiderkwast authored May 27, 2024
1 parent 5f279b9 commit f4ce160
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 273 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Spellcheck
on:
push:
branches: [master]
pull_request:
branches: [master]
on: [push, pull_request]
permissions:
contents: read
jobs:
spellcheck:
runs-on: ubuntu-latest
name: Spellcheck
steps:
- uses: actions/checkout@v2
- name: Spellcheck
uses: redis-stack/github-actions/spellcheck@main
env:
DICTIONARY: wordlist
DOCS_DIRECTORY: .
CONFIGURATION_FILE: .spellcheck.yml
COMMANDS_FILES: commands.json
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: tbroadley/spellchecker-cli-action@v1
with:
files: "commands/*.md topics/*.md !topics/modules-api-ref.md"
config: .spellcheckerrc.yml
11 changes: 0 additions & 11 deletions .spellcheck.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .spellcheckerrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
files:
- 'topics/*.md'
- 'commands/*.md'
- '!topics/modules-api-ref.md'
dictionaries:
- wordlist
noSuggestions: true
quiet: true
plugins:
- spell
- frontmatter
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ npm install --global spellchecker-cli
You can than validate your spelling by running the following

```
spellchecker --no-suggestions -f '**/*.md' -l en-US -q -d wordlist
spellchecker
```

Any exceptions you need for spelling can be added to the `wordlist` file.
Text within backticks is not checked, so using backticks for command names,
parameter values and similar is a good idea to avoid getting spelling errors for
things like that.
2 changes: 1 addition & 1 deletion commands/cluster-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ Note that:
1. Migration and importing slots are only added to the node flagged as `myself`. This information is local to a node, for its own slots.
2. Importing and migrating slots are provided as **additional info**. If the node has a given hash slot assigned, it will be also a plain number in the list of hash slots, so clients that don't have a clue about hash slots migrations can just skip this special fields.

**A note about the word slave used in this man page and command name**: If not for Redis OSS compatibility, the Valkey project dones not use the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated.
**A note about the word slave used in this man page and command name**: If not for Redis OSS compatibility, the Valkey project does not use the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated.
2 changes: 1 addition & 1 deletion commands/georadiusbymember.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The position of the specified member is used as the center of the query.

Please check the example below and the `GEORADIUS` documentation for more information about the command and its options.

Note that `GEORADIUSBYMEMBER_RO` is addeded in order to provide a read-only command that can be used in replicas. See the `GEORADIUS` page for more information.
Note that `GEORADIUSBYMEMBER_RO` was added to provide a read-only command that can be used in replicas. See the `GEORADIUS` page for more information.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion commands/object-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Valkey objects can be encoded in different ways:

- `linkedlist`, simple list encoding. No longer used, an old list encoding.
- `listpack`, a space-efficient encoding used for small lists.
- `quicklist`, encoded as linkedlist of ziplists or listpacks.
- `quicklist`, encoded as linked list of ziplists or listpacks.

* Sets can be encoded as:

Expand Down
2 changes: 1 addition & 1 deletion commands/ttl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Returns the remaining time to live of a key that has a timeout.
This introspection capability allows a Valkey client to check how many seconds a
given key will continue to be part of the dataset.

The command returns the following valueis in case of errors:
The command returns the following values in case of errors:

* The command returns `-2` if the key does not exist.
* The command returns `-1` if the key exists but has no associated expire.
Expand Down
8 changes: 4 additions & 4 deletions topics/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Early contributions and sponsorships
During 2009, Engine Yard contributed blocking POP (BLPOP) and part of the
Virtual Memory implementation (later deleted), Hitmeister contributed part of
the Cluster implementation and Citrusbyte contributed part of Virtual Memory
implementation. In 2010, Slicehost (aquired by Rackspace) provided Virtual
implementation. In 2010, Slicehost (acquired by Rackspace) provided Virtual
Machines for testing in a virtualized environment and Linode provided virtual
machines for testing in a virtualized environment. Also thanks to the following
people or organizations that donated to the Project: Emil Vladev, [Brad
Expand Down Expand Up @@ -79,7 +79,7 @@ database services based on Redis. In 2013, Garantia Data was changing its name
to RedisDB, but [decided to withdraw the change][redisdb] after complaints by
Sanfilippo:

[redisdb]: https://techcrunch.com/2014/01/29/database-provider-garantia-data-makes-another-name-change-this-time-to-redis-labs/
[redisdb]: https://www.forbes.com/sites/benkepes/2013/11/04/was-garantia-is-now-redisdb-either-way-nosql-is-hot/

> If this is true, it is not a good thing as the current informal rule was: use
> "Redis" in company names that are selling Redis services, but in a way that
Expand All @@ -93,7 +93,7 @@ Sanfilippo:
The following year, 2014, Garantia Data [changed its name to Redis Labs][redislabs].

[redislabs]: https://techcrunch.com/2014/01/29/database-provider-garantia-data-makes-another-name-change-this-time-to-redis-labs/)
[redislabs]: https://techcrunch.com/2014/01/29/database-provider-garantia-data-makes-another-name-change-this-time-to-redis-labs/

In 2015, Salvatore left Pivotal for Redis Labs. He writes in his blog post
[Thanks Pivotal, Hello Redis Labs](http://antirez.com/news/91):
Expand Down Expand Up @@ -145,7 +145,7 @@ The end of open source Redis
In 2024, Redis Ltd. changed the license of Redis from the open source BSD
license to dual source-available licenses. This was announced in a blog post
[Redis Adopts Dual Source-Available Licensing][redis-source-avail] and the
license change was [commited to the repository][change-license-pr] the same day.
license change was [committed to the repository][change-license-pr] the same day.

[redis-source-avail]: https://redis.io/blog/redis-adopts-dual-source-available-licensing/
[change-license-pr]: https://github.com/redis/redis/pull/13157
Expand Down
6 changes: 3 additions & 3 deletions topics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Programming with Valkey
Server-side scripting in Valkey
---

* [Programability overview](programmability.md): An overview of programmability in Valkey.
* [Valkey Lua API](lua-api.md): The embedded [Lua 5.1](https://lua.org) interepreter runtime environment and APIs.
* [Programmability overview](programmability.md): An overview of programmability in Valkey.
* [Valkey Lua API](lua-api.md): The embedded [Lua 5.1](https://lua.org) interpreter runtime environment and APIs.
* [Introduction to Eval Scripts](eval-intro.md): An introduction about using cached scripts.
* [Introduction to Valkey Functions](functions-intro.md): An introduction about using functions.
* [Debugging Lua scripts](ldb.md): An overveiw of the native Valkey Lua debugger for cached scripts.
* [Debugging Lua scripts](ldb.md): An overview of the native Valkey Lua debugger for cached scripts.

Administration
---
Expand Down
2 changes: 1 addition & 1 deletion topics/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ POSSIBILITY OF SUCH DAMAGE.

Files in the Valkey distribution that were originally created for Redis when
Redis was still under the three-clause BSD license contain the following license
(which differes from the above text only in one occurrence of "Redis" in the 3rd
(which differs from the above text only in one occurrence of "Redis" in the 3rd
clause):

```
Expand Down
2 changes: 1 addition & 1 deletion topics/pubsub.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases:
- /docs/manual/pubsub
---

`SUBSCRIBE`, `UNSUBSCRIBE` and `PUBLISH` implement the [Publish/Subscribe messaging paradigm](https://en.wikipedia.org/wiki/Publish/subscribe) where publishers send their messages to channels, without knowlege of what receivers (subscribers) there may be.
`SUBSCRIBE`, `UNSUBSCRIBE` and `PUBLISH` implement the [Publish/Subscribe messaging paradigm](https://en.wikipedia.org/wiki/Publish/subscribe) where publishers send their messages to channels, without knowledge of what receivers (subscribers) there may be.
Subscribers express interest in one or more channels and only receive messages that are of interest, without knowledge of what (if any) publishers there are.
This decoupling of publishers and subscribers allows for greater scalability and a more dynamic network topology.

Expand Down
Loading

0 comments on commit f4ce160

Please sign in to comment.