Skip to content

Commit b246d24

Browse files
authored
Spellchecker action (#1980)
1 parent 8328683 commit b246d24

36 files changed

+756
-268
lines changed

.github/workflows/spellcheck.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Spellcheck
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
spellcheck:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Spellcheck
13+
uses: redis-stack/github-actions/spellcheck@main
14+
env:
15+
DICTIONARY: wordlist
16+
DOCS_DIRECTORY: .
17+
CONFIGURATION_FILE: .spellcheck.yml
18+
COMMANDS_FILES: commands.json

.spellcheck.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
files:
2+
- '**/*.md'
3+
- '!docs/clients/index.md'
4+
- '!docs/libraries/index.md'
5+
- '!docs/modules/index.md'
6+
- '!docs/tools/index.md'
7+
dictionaries:
8+
- wordlist
9+
no-suggestions: true
10+
quiet: true

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Clients
44

5-
All clients are listed under language specific subfolders of [clients](./clients)
5+
All clients are listed under language specific sub-folders of [clients](./clients)
66

77
The path follows the pattern: ``clients/{language}/github.com/{owner}/{repository}.json``.
88
The ``{language}`` component of the path is the path-safe representation
@@ -65,23 +65,16 @@ Please use the following formatting rules (aiming for smaller diffs that are eas
6565

6666
## Checking your work
6767

68-
You should check your changes using Make:
68+
After making changes to the documentation, you can use the [spellchecker-cli package](https://www.npmjs.com/package/spellchecker-cli) to validate your spelling as well as some minor grammatical errors. You can install the spellchecker locally by running:
6969

70+
```bash
71+
npm install --global spellchecker-cli
7072
```
71-
$ make
72-
```
73-
74-
This will make sure that JSON and Markdown files compile and that all
75-
text files have no typos.
7673

77-
You need to install a few Ruby gems and [Aspell][aspell] to run these checks.
78-
The gems are listed in the `.gems` file. Install them with the
79-
following command:
74+
You can than validate your spelling by running the following
8075

8176
```
82-
$ gem install $(sed -e 's/ -v /:/' .gems)
77+
spellchecker --no-suggestions -f '**/*.md' -l en-US -q -d wordlist
8378
```
8479

85-
The spell checking exceptions should be added to `./wordlist`.
86-
87-
[aspell]: http://aspell.net/
80+
Any exceptions you need for spelling can be added to the `wordlist` file.

commands/acl-genpass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ create more random bytes as needed. This means that the application developer
1717
should be feel free to abuse `ACL GENPASS` to create as many secure
1818
pseudorandom strings as needed.
1919

20-
The command output is an hexadecimal representation of a binary string.
20+
The command output is a hexadecimal representation of a binary string.
2121
By default it emits 256 bits (so 64 hex characters). The user can provide
2222
an argument in form of number of bits to emit from 1 to 1024 to change
2323
the output length. Note that the number of bits provided is always

commands/acl-setuser.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ The root user permissions only allows executing the get command, but can be exec
2929
The selector then grants a secondary set of permissions: access to the `SET` command to be executed on any key that starts with "app1".
3030
Using multiple selectors allows you to grant permissions that are different depending on what keys are being accessed.
3131

32-
When we want to be sure to define an user from scratch, without caring if
32+
When we want to be sure to define a user from scratch, without caring if
3333
it had previously defined rules associated, we can use the special rule
3434
`reset` as first rule, in order to flush all the other existing rules:
3535

3636
ACL SETUSER antirez reset [... other rules ...]
3737

38-
After resetting an user, it returns back to the status it has when it
38+
After resetting a user, it returns back to the status it has when it
3939
was just created: non active (off rule), can't execute any command, can't
4040
access any key:
4141

@@ -79,7 +79,7 @@ This is a list of all the supported Redis ACL rules:
7979
* `on`: set the user as active, it will be possible to authenticate as this user using `AUTH <username> <password>`.
8080
* `off`: set user as not active, it will be impossible to log as this user. Please note that if a user gets disabled (set to off) after there are connections already authenticated with such a user, the connections will continue to work as expected. To also kill the old connections you can use `CLIENT KILL` with the user option. An alternative is to delete the user with `ACL DELUSER`, that will result in all the connections authenticated as the deleted user to be disconnected.
8181
* `nopass`: the user is set as a "no password" user. It means that it will be possible to authenticate as such user with any password. By default, the `default` special user is set as "nopass". The `nopass` rule will also reset all the configured passwords for the user.
82-
* `>password`: Add the specified clear text password as an hashed password in the list of the users passwords. Every user can have many active passwords, so that password rotation will be simpler. The specified password is not stored as clear text inside the server. Example: `>mypassword`.
82+
* `>password`: Add the specified clear text password as a hashed password in the list of the users passwords. Every user can have many active passwords, so that password rotation will be simpler. The specified password is not stored as clear text inside the server. Example: `>mypassword`.
8383
* `#<hashedpassword>`: Add the specified hashed password to the list of user passwords. A Redis hashed password is hashed with SHA256 and translated into a hexadecimal string. Example: `#c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2`.
8484
* `<password`: Like `>password` but removes the password instead of adding it.
8585
* `!<hashedpassword>`: Like `#<hashedpassword>` but removes the password instead of adding it.

commands/bgrewriteaof.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ process doing persistence.
1111

1212
Specifically:
1313

14-
* If a Redis child is creating a snapshot on disk, the AOF rewrite is _scheduled_ but not started until the saving child producing the RDB file terminates. In this case the `BGREWRITEAOF` will still return an positive status reply, but with an appropriate message. You can check if an AOF rewrite is scheduled looking at the `INFO` command as of Redis 2.6 or successive versions.
14+
* If a Redis child is creating a snapshot on disk, the AOF rewrite is _scheduled_ but not started until the saving child producing the RDB file terminates. In this case the `BGREWRITEAOF` will still return a positive status reply, but with an appropriate message. You can check if an AOF rewrite is scheduled looking at the `INFO` command as of Redis 2.6 or successive versions.
1515
* If an AOF rewrite is already in progress the command returns an error and no
1616
AOF rewrite will be scheduled for a later time.
1717
* If the AOF rewrite could start, but the attempt at starting it fails (for instance because of an error in creating the child process), an error is returned to the caller.

commands/bitfield.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
The command treats a Redis string as a array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset. In practical terms using this command you can set, for example, a signed 5 bits integer at bit offset 1234 to a specific value, retrieve a 31 bit unsigned integer from offset 4567. Similarly the command handles increments and decrements of the specified integers, providing guaranteed and well specified overflow and underflow behavior that the user can configure.
1+
The command treats a Redis string as an array of bits, and is capable of addressing specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset. In practical terms using this command you can set, for example, a signed 5 bits integer at bit offset 1234 to a specific value, retrieve a 31 bit unsigned integer from offset 4567. Similarly the command handles increments and decrements of the specified integers, providing guaranteed and well specified overflow and underflow behavior that the user can configure.
22

33
`BITFIELD` is able to operate with multiple bit fields in the same command call. It takes a list of operations to perform, and returns an array of replies, where each array matches the corresponding operation in the list of arguments.
44

5-
For example the following command increments an 5 bit signed integer at bit offset 100, and gets the value of the 4 bit unsigned integer at bit offset 0:
5+
For example the following command increments a 5 bit signed integer at bit offset 100, and gets the value of the 4 bit unsigned integer at bit offset 0:
66

77
> BITFIELD mykey INCRBY i5 100 1 GET u4 0
88
1) (integer) 1

commands/bitop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and **NOT**, thus the valid forms to call the command are:
1111
* `BITOP NOT destkey srckey`
1212

1313
As you can see **NOT** is special as it only takes an input key, because it
14-
performs inversion of bits so it only makes sense as an unary operator.
14+
performs inversion of bits so it only makes sense as a unary operator.
1515

1616
The result of the operation is always stored at `destkey`.
1717

@@ -48,7 +48,7 @@ Different bitmaps can be combined in order to obtain a target bitmap where
4848
the population counting operation is performed.
4949

5050
See the article called "[Fast easy realtime metrics using Redis
51-
bitmaps][hbgc212fermurb]" for a interesting use cases.
51+
bitmaps][hbgc212fermurb]" for an interesting use cases.
5252

5353
[hbgc212fermurb]: http://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps
5454

commands/bzpopmin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members to pop from any of the given sorted sets.
55
A member with the lowest score is popped from first sorted set that is
66
non-empty, with the given keys being checked in the order that they are given.
77

8-
The `timeout` argument is interpreted as an double value specifying the maximum
8+
The `timeout` argument is interpreted as a double value specifying the maximum
99
number of seconds to block. A timeout of zero can be used to block indefinitely.
1010

1111
See the [BLPOP documentation][cl] for the exact semantics, since `BZPOPMIN` is

commands/cluster-forget.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end with just a three nodes cluster A, B, C we may follow these steps:
2727
2. D is now empty, but still listed in the nodes table of A, B and C.
2828
3. We contact A, and send `CLUSTER FORGET D`.
2929
4. B sends node A a heartbeat packet, where node D is listed.
30-
5. A does no longer known node D (see step 3), so it starts an handshake with D.
30+
5. A does no longer known node D (see step 3), so it starts a handshake with D.
3131
6. D ends re-added in the nodes table of A.
3232

3333
As you can see in this way removing a node is fragile, we need to send

0 commit comments

Comments
 (0)