Skip to content

Commit 5c3808c

Browse files
Add spell check
This patch adds spell check to the project based on https://github.com/crate-ci/typos. It's also used within the annotations and integrated into CI. Adding this check required to apply some of the minor fixes to the EmmyLua annotations.
1 parent 01e9210 commit 5c3808c

File tree

14 files changed

+43
-19
lines changed

14 files changed

+43
-19
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,27 @@ on:
99
pull_request:
1010

1111
jobs:
12-
build:
12+
lint:
13+
name: Lint
1314
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Spell Check Repo
19+
uses: crate-ci/typos@master
20+
- name: Setup node 20.x
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 20.x
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Lint
27+
run: npm run lint
1428

29+
build:
30+
name: Build
31+
runs-on: ubuntu-latest
32+
needs: [lint]
1533
steps:
1634
- uses: actions/checkout@v4
1735
with:
@@ -21,10 +39,8 @@ jobs:
2139
uses: actions/setup-node@v3
2240
with:
2341
node-version: 20.x
24-
- name: Build
25-
run: npm i
26-
- name: Lint
27-
run: npm run lint
42+
- name: Install dependencies
43+
run: npm ci
2844
- name: Package
2945
run: npx vsce package -o tarantool-vscode.vsix
3046
- name: Upload
@@ -34,6 +50,7 @@ jobs:
3450
path: ${{ github.workspace }}/tarantool-vscode.vsix
3551

3652
publish:
53+
name: Publish
3754
runs-on: ubuntu-latest
3855
needs: [build]
3956
if: success() && startsWith(github.ref, 'refs/tags/')

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
### Fixed
12+
13+
- Fixed a few typos in various Tarantool builtin modules caught up by automatic
14+
spell checking.
15+
1116
## [0.1.2] - 08.04.2025
1217

1318
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This extension offers the following features.
1616

1717
* Static type checks and documentation for the most popular Lua and Tarantool builtin modules.
1818
* Cluster configuration schema validation for Tarantool 3.0+.
19-
* [tt cluster management utility](https://github.com/tarantool/tt) inside the command pallete.
19+
* [tt cluster management utility](https://github.com/tarantool/tt) inside the command palette.
2020
* Other auxiliary commands, e.g. install Tarantool of a specific version right from VS Code.
2121

2222
---

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[default.extend-words]
2+
fpr = "fpr"

examples/basic-types.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ local b_new = b
8686
local b_name = b[1] -- Inferred as `string`.
8787
local b_age = b[2] -- Inferred as `number`.
8888

89-
-- Aliases might be mutiline. E.g. they can be used for enumerations.
89+
-- Aliases might be multiline. E.g. they can be used for enumerations.
9090

9191
---@alias crud_operation
9292
---| 'create' # Create an element. Note that `#` is required for a comment.

tarantool-annotations/Library/box/cfg.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
---@field replication_skip_conflict? boolean (Default: false) By default, if a replica adds a unique key that another replica has added, replication stops with error = ER_TUPLE_FOUND
101101
---@field replication_sync_lag? number (Default: 10) The maximum lag allowed for a replica
102102
---@field replication_sync_timeout? number (Default: 300) The number of seconds that a replica will wait when trying to sync with a master in a cluster, or a quorum of masters, after connecting or during configuration update
103-
---@field replication_timeout? number (Defailt: 1) If the master has no updates to send to the replicas, it sends heartbeat messages every replication_timeout seconds, and each replica sends an ACK packet back. Both master and replicas are programmed to drop the connection if they get no response in four replication_timeout periods. If the connection is dropped, a replica tries to reconnect to the master
103+
---@field replication_timeout? number (Default: 1) If the master has no updates to send to the replicas, it sends heartbeat messages every replication_timeout seconds, and each replica sends an ACK packet back. Both master and replicas are programmed to drop the connection if they get no response in four replication_timeout periods. If the connection is dropped, a replica tries to reconnect to the master
104104
---@field slab_alloc_factor? number (Default: 1.05) The multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes. Allowed values range from 1 to 2
105105
---@field snap_io_rate_limit? number (Default: nil) Reduce the throttling effect of box.snapshot() on INSERT/UPDATE/DELETE performance by setting a limit on how many megabytes per second it can write to disk. The same can be achieved by splitting wal_dir and memtx_dir locations and moving snapshots to a separate disk
106106
---@field sql_cache_size? number (Default: 5242880) The maximum number of bytes in the cache for SQL prepared statements

tarantool-annotations/Library/box/schema.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ function box.schema.downgrade(version) end
126126
---To learn how to downgrade a database to the specified Tarantool version, see [`box.schema.downgrade()`](lua://box.schema.downgrade).
127127
---
128128
---@see box.schema.downgrade
129-
function box.schmea.downgrade_versions() end
129+
function box.schema.downgrade_versions() end
130130

131131
---Return a list of downgrade issues for the specified Tarantool version.
132132
---
133133
---To learn how to downgrade a database to the specified Tarantool version, see [`box.schema.downgrade()`](lua://box.schema.downgrade).
134134
---
135135
---@param version string
136-
function box.schmea.downgrade_issues(version) end
136+
function box.schema.downgrade_issues(version) end
137137

138138
---User privileges management.
139139
---

tarantool-annotations/Library/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,6 @@ function config:info(version) end
190190
---@param uri_type 'peer' | 'sharding'
191191
---@param opts { instance?: string }
192192
---@return uri
193-
function config:instace_uri(uri_type, opts) end
193+
function config:instance_uri(uri_type, opts) end
194194

195195
return config

tarantool-annotations/Library/datetime.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ function datetime_obj:add(input) end
402402

403403
---Modify an existing datetime object by subtracting values of the input argument.
404404
---
405-
---See also: `interval_arithm`. The substraction is performed taking `tzdata` into account, when `tzoffset` or `tz` fields are set, see the `timezone`.
405+
---See also: `interval_arithm`. The subtraction is performed taking `tzdata` into account, when `tzoffset` or `tz` fields are set, see the `timezone`.
406406
---
407407
---**Example:**
408408
---

tarantool-annotations/Library/fiber.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function fiber.yield() end
144144
--- ```
145145
---
146146
---@param fiber_object? fiber
147-
---@return "running" | "dead" | "supspected"
147+
---@return "running" | "dead" | "suspected"
148148
function fiber.status(fiber_object) end
149149

150150
---@class fiber.info

tarantool-annotations/Library/json.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local json = {}
55
---@class json.cfg
66
---@field encode_max_depth? number (default: 128) Max recursion depth for encoding
77
---@field encode_deep_as_nil? boolean (default: false) A flag saying whether to crop tables with nesting level deeper than cfg.encode_max_depth. Not-encoded fields are replaced with one null. If not set, too deep nesting is considered an error.
8-
---@field encode_invalid_numbers? boolean (deafult: true) A flag saying whether to enable encoding of NaN and Inf numbers
8+
---@field encode_invalid_numbers? boolean (default: true) A flag saying whether to enable encoding of NaN and Inf numbers
99
---@field encode_number_precision? number (default: 14) Precision of floating point numbers
1010
---@field encode_load_metatables? boolean (default: true) A flag saying whether the serializer will follow __serialize metatable field
1111
---@field encode_use_tostring? boolean (default: false) A flag saying whether to use tostring() for unknown types

tarantool-annotations/Library/uuid.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ function uuid.bin(byte_order) end
6565
---@return string uuid 16-byte string
6666
function uuid_obj:bin(byte_order) end
6767

68-
---Get UUID as 36-byte hexademical string.
68+
---Get UUID as 36-byte hexadecimal string.
6969
---
7070
---@return string uuid 36-byte binary string
7171
function uuid.str() end
7272

73-
---Convert UUID to a 36-byte hexademical string.
73+
---Convert UUID to a 36-byte hexadecimal string.
7474
---
7575
---@return string uuid 36-byte binary string
7676
function uuid_obj:str() end
7777

78-
---Convert hexademical 36-byte string to an UUID object.
78+
---Convert hexadecimal 36-byte string to an UUID object.
7979
---
8080
---@param uuid_str string UUID in 36-byte hexadecimal string
8181
---@return uuid uuid converted UUID

tarantool-annotations/Library/yaml.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ local yaml = {}
4848
---@class yaml.cfg
4949
---@field encode_max_depth? number (default: 128) Max recursion depth for encoding
5050
---@field encode_deep_as_nil? boolean (default: false) A flag saying whether to crop tables with nesting level deeper than cfg.encode_max_depth. Not-encoded fields are replaced with one null. If not set, too deep nesting is considered an error.
51-
---@field encode_invalid_numbers? boolean (deafult: true) A flag saying whether to enable encoding of NaN and Inf numbers
51+
---@field encode_invalid_numbers? boolean (default: true) A flag saying whether to enable encoding of NaN and Inf numbers
5252
---@field encode_number_precision? number (default: 14) Precision of floating point numbers
5353
---@field encode_load_metatables? boolean (default: true) A flag saying whether the serializer will follow __serialize metatable field
5454
---@field encode_use_tostring? boolean (default: false) A flag saying whether to use tostring() for unknown types

tarantool-annotations/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ local function process_tuple(t)
192192
return {t[1], t[2], t[3] + 1000}
193193
end
194194
195-
-- Warning: wrong arument type.
195+
-- Warning: wrong argument type.
196196
local tuple_1 = process_tuple({1, 2, 3})
197197
-- Ok.
198198
local tuple_2 = process_tuple({1, 'Stan', 1000})

0 commit comments

Comments
 (0)