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

commands/cluster-meet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ So in order for a given node to accept another one into the list of nodes
1010
composing a Redis Cluster, there are only two ways:
1111

1212
1. The system administrator sends a `CLUSTER MEET` command to force a node to meet another one.
13-
2. An already known node sends a list of nodes in the gossip section that we are not aware of. If the receiving node trusts the sending node as a known node, it will process the gossip section and send an handshake to the nodes that are still not known.
13+
2. An already known node sends a list of nodes in the gossip section that we are not aware of. If the receiving node trusts the sending node as a known node, it will process the gossip section and send a handshake to the nodes that are still not known.
1414

1515
Note that Redis Cluster needs to form a full mesh (each node is connected with each other node), but in order to create a cluster, there is no need to send all the `CLUSTER MEET` commands needed to form the full mesh. What matter is to send enough `CLUSTER MEET` messages so that each node can reach each other node through a *chain of known nodes*. Thanks to the exchange of gossip information in heartbeat packets, the missing links will be created.
1616

commands/msetnx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Sets the given keys to their respective values.
33
exists.
44

55
Because of this semantic `MSETNX` can be used in order to set different keys
6-
representing different fields of an unique logic object in a way that ensures
6+
representing different fields of a unique logic object in a way that ensures
77
that either all the fields or none at all are set.
88

99
`MSETNX` is atomic, so all given keys are set at once.

commands/pfmerge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Merge multiple HyperLogLog values into an unique value that will approximate
1+
Merge multiple HyperLogLog values into a unique value that will approximate
22
the cardinality of the union of the observed Sets of the source HyperLogLog
33
structures.
44

commands/scan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ This is easy to see intuitively: if the collection grows there is more and more
188188

189189
## Why SCAN may return all the items of an aggregate data type in a single call?
190190

191-
In the `COUNT` option documentation, we state that sometimes this family of commands may return all the elements of a Set, Hash or Sorted Set at once in a single call, regardless of the `COUNT` option value. The reason why this happens is that the cursor-based iterator can be implemented, and is useful, only when the aggregate data type that we are scanning is represented as an hash table. However Redis uses a [memory optimization](/topics/memory-optimization) where small aggregate data types, until they reach a given amount of items or a given max size of single elements, are represented using a compact single-allocation packed encoding. When this is the case, `SCAN` has no meaningful cursor to return, and must iterate the whole data structure at once, so the only sane behavior it has is to return everything in a call.
191+
In the `COUNT` option documentation, we state that sometimes this family of commands may return all the elements of a Set, Hash or Sorted Set at once in a single call, regardless of the `COUNT` option value. The reason why this happens is that the cursor-based iterator can be implemented, and is useful, only when the aggregate data type that we are scanning is represented as a hash table. However Redis uses a [memory optimization](/topics/memory-optimization) where small aggregate data types, until they reach a given amount of items or a given max size of single elements, are represented using a compact single-allocation packed encoding. When this is the case, `SCAN` has no meaningful cursor to return, and must iterate the whole data structure at once, so the only sane behavior it has is to return everything in a call.
192192

193193
However once the data structures are bigger and are promoted to use real hash tables, the `SCAN` family of commands will resort to the normal behavior. Note that since this special behavior of returning all the elements is true only for small aggregates, it has no effects on the command complexity or latency. However the exact limits to get converted into real hash tables are [user configurable](/topics/memory-optimization), so the maximum number of elements you can see returned in a single call depends on how big an aggregate data type could be and still use the packed representation.
194194

commands/script-exists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ For more information about `EVAL` scripts please refer to [Introduction to Eval
1515
@array-reply The command returns an array of integers that correspond to
1616
the specified SHA1 digest arguments.
1717
For every corresponding SHA1 digest of a script that actually exists in the
18-
script cache, an 1 is returned, otherwise 0 is returned.
18+
script cache, a 1 is returned, otherwise 0 is returned.

commands/xreadgroup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ one supports consumer groups.
1414

1515
Without consumer groups, just using `XREAD`, all the clients are served with all the entries arriving in a stream. Instead using consumer groups with `XREADGROUP`, it is possible to create groups of clients that consume different parts of the messages arriving in a given stream. If, for instance, the stream gets the new entries A, B, and C and there are two consumers reading via a consumer group, one client will get, for instance, the messages A and C, and the other the message B, and so forth.
1616

17-
Within a consumer group, a given consumer (that is, just a client consuming messages from the stream), has to identify with an unique *consumer name*. Which is just a string.
17+
Within a consumer group, a given consumer (that is, just a client consuming messages from the stream), has to identify with a unique *consumer name*. Which is just a string.
1818

1919
One of the guarantees of consumer groups is that a given consumer can only see the history of messages that were delivered to it, so a message has just a single owner. However there is a special feature called *message claiming* that allows other consumers to claim messages in case there is a non recoverable failure of some consumer. In order to implement such semantics, consumer groups require explicit acknowledgment of the messages successfully processed by the consumer, via the `XACK` command. This is needed because the stream will track, for each consumer group, who is processing what message.
2020

docs/manual/client-side-caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ order to limit the amount of memory used server-side and the CPU cost of
116116
handling the data structures implementing the feature:
117117

118118
* The server remembers the list of clients that may have cached a given key in a single global table. This table is called the **Invalidation Table**. The invalidation table can contain a maximum number of entries. If a new key is inserted, the server may evict an older entry by pretending that such key was modified (even if it was not), and sending an invalidation message to the clients. Doing so, it can reclaim the memory used for this key, even if this will force the clients having a local copy of the key to evict it.
119-
* Inside the invalidation table we don't really need to store pointers to clients' structures, that would force a garbage collection procedure when the client disconnects: instead what we do is just store client IDs (each Redis client has an unique numerical ID). If a client disconnects, the information will be incrementally garbage collected as caching slots are invalidated.
119+
* Inside the invalidation table we don't really need to store pointers to clients' structures, that would force a garbage collection procedure when the client disconnects: instead what we do is just store client IDs (each Redis client has a unique numerical ID). If a client disconnects, the information will be incrementally garbage collected as caching slots are invalidated.
120120
* There is a single keys namespace, not divided by database numbers. So if a client is caching the key `foo` in database 2, and some other client changes the value of the key `foo` in database 3, an invalidation message will still be sent. This way we can ignore database numbers reducing both the memory usage and the implementation complexity.
121121

122122
## Two connections mode

docs/manual/data-types/data-types-tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,8 @@ Moreover, elements in a sorted sets are *taken in order* (so they are not
694694
ordered on request, order is a peculiarity of the data structure used to
695695
represent sorted sets). They are ordered according to the following rule:
696696

697-
* If A and B are two elements with a different score, then A > B if A.score is > B.score.
698-
* If A and B have exactly the same score, then A > B if the A string is lexicographically greater than the B string. A and B strings can't be equal since sorted sets only have unique elements.
697+
* If B and A are two elements with a different score, then A > B if A.score is > B.score.
698+
* If B and A have exactly the same score, then A > B if the A string is lexicographically greater than the B string. B and A strings can't be equal since sorted sets only have unique elements.
699699

700700
Let's start with a simple example, adding a few selected hackers names as
701701
sorted set elements, with their year of birth as "score".
@@ -865,7 +865,7 @@ the `+` and `-` strings. See the documentation for more information.
865865
This feature is important because it allows us to use sorted sets as a generic
866866
index. For example, if you want to index elements by a 128-bit unsigned
867867
integer argument, all you need to do is to add elements into a sorted
868-
set with the same score (for example 0) but with an 16 byte prefix
868+
set with the same score (for example 0) but with a 16 byte prefix
869869
consisting of **the 128 bit number in big endian**. Since numbers in big
870870
endian, when ordered lexicographically (in raw bytes order) are actually
871871
ordered numerically as well, you can ask for ranges in the 128 bit space,

0 commit comments

Comments
 (0)