Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit c2180fb

Browse files
authored
fix: typos + add spellchecking to CI (#248)
* fix: typos + add spellchecking to CI * require Node.js 18 because the current cSpell requires at least it * ignore the ./out/ directory
1 parent f52cc5a commit c2180fb

19 files changed

+886
-28
lines changed

.github/workflows/nextjs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Setup Node
3737
uses: actions/setup-node@v3
3838
with:
39-
node-version: "16"
39+
node-version: "18"
4040
cache: yarn
4141

4242
- name: Setup Pages

.github/workflows/test-build-nextjs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Node
3434
uses: actions/setup-node@v3
3535
with:
36-
node-version: "16"
36+
node-version: "18"
3737
cache: yarn
3838

3939
- name: Setup Pages
@@ -60,4 +60,7 @@ jobs:
6060
run: yarn install --frozen-lockfile
6161

6262
- name: Build documentation
63-
run: yarn build-pages
63+
run: yarn build-pages
64+
65+
- name: Spell check documentation
66+
run: yarn spell

cspell.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
3+
"version": "0.2",
4+
"language": "en",
5+
"words": [
6+
"basechain",
7+
"bounceable",
8+
"cheatsheet",
9+
"Cheatsheet",
10+
"cheatsheets",
11+
"Cheatsheets",
12+
"comptime",
13+
"Comptime",
14+
"decompiling",
15+
"dnsresolve",
16+
"Epva", // part of a base64 string
17+
"Fift",
18+
"ipfs",
19+
"IPFS",
20+
"jetton",
21+
"Jetton",
22+
"Jettons",
23+
"jettons",
24+
"masterchain",
25+
"Masterchain",
26+
"mathrm",
27+
"nanotons",
28+
"nextra",
29+
"Offchain",
30+
"RAWRESERVE",
31+
"respecifying",
32+
"Satoshi",
33+
"seamus",
34+
"Seamus",
35+
"seqno",
36+
"stdlibs",
37+
"STON.fi",
38+
"TIMELOCK",
39+
"timeouted",
40+
"Timeouted",
41+
"Toncoin",
42+
"Toncoins",
43+
"Uninit",
44+
"vogons", // 42 vogons
45+
"workchain",
46+
"xtwitter"
47+
],
48+
"ignoreRegExpList": [
49+
"\\(#.*\\)",
50+
"^\\[.+\\]: .+", // link declarations like [foo]: /ref/stdlib-ownable#bar
51+
"\\[.+\\]\\[.+\\]", // links like [`Resumable{:tact}`][res]
52+
"\\[.+\\]\\(.+\\)", // links like [`self.toCell().asSlice(){:tact}`](/ref/core-cells#cellasslice)
53+
"address\\(\".+\"\\)", // Ton addresses
54+
"mathrm\\{.+\\}", // LaTeX subset
55+
"\\[#.+\\]", // [#nativereserve-combining-modes-with-flags]
56+
"href=\".+\"", // href="/cookbook/dexes/stonfi"
57+
"\".+\": \".+\"", // "from": "kQBrSAP2y7QIUw4_1q0qciHfqdFmOYR9CC1oinn7kyWWRuoV",
58+
"Urls"
59+
],
60+
"flagWords": [],
61+
"ignorePaths": [
62+
"components/icons",
63+
"grammars/grammar-ohm.json",
64+
"dist",
65+
"grammars/grammar-tact.json",
66+
"next.config.js",
67+
"node_modules",
68+
"out",
69+
"package.json",
70+
"pages/cookbook/dexes/_meta.js",
71+
"pages/ref/spec.mdx"
72+
]
73+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
"build": "yarn deps && yarn clean && next build",
1616
"post-build": "echo 'spell checking, link checking, formatting'",
1717
"build-pages": "yarn build && node ./scripts/redirects-generate.js",
18-
"next": "next"
18+
"next": "next",
19+
"spell": "cspell \"**\""
1920
},
2021
"devDependencies": {
2122
"@svgr/webpack": "^8.1.0",
2223
"@types/node": "^18.11.19",
2324
"@types/react": "18.2.61",
25+
"cspell": "^8.8.4",
2426
"typescript": "^4.9.5"
2527
},
2628
"license": "CC-BY-4.0",

pages/book/_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
title: 'Communication',
2727
},
2828
// <- NOTE
29-
// potential place for a rather short overview page describing asyncronous & actor-model nature
29+
// potential place for a rather short overview page describing asynchronous & actor-model nature
3030
// of TON Blockchain with respect to Tact and exchanging messages with it
3131
receive: 'Receive messages',
3232
bounced: 'Bounced messages',

pages/book/constants.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ trait MyTrait {
3232
}
3333
3434
trait MyAbstractTrait {
35-
abstract const MY_DEVFEE: Int;
35+
abstract const MY_DEV_FEE: Int;
3636
}
3737
```
3838

@@ -44,7 +44,7 @@ contract MyContract with
4444
MyAbstractTrait, // trailing comma is allowed
4545
{
4646
override const MY_FEE: Int = ton("0.5");
47-
override const MY_DEVFEE: Int = ton("1000");
47+
override const MY_DEV_FEE: Int = ton("1000");
4848
}
4949
```
5050

pages/book/contracts.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Each contract can contain:
3030
* [Receiver functions](#receiver-functions)
3131
* [Internal functions](#internal-functions)
3232

33-
Furthermore, contracts can inherit all the declarations and definitions from [traits](/book/types#traits) and override some of their default behaviours. If declared or defined in a trait, internal functions and constants can be marked as [virtual or abstract](/book/functions#virtual-and-abstract-functions) and overriden in contracts inheriting from the trait.
33+
Furthermore, contracts can inherit all the declarations and definitions from [traits](/book/types#traits) and override some of their default behaviours. If declared or defined in a trait, internal functions and constants can be marked as [virtual or abstract](/book/functions#virtual-and-abstract-functions) and overridden in contracts inheriting from the trait.
3434

3535
### Persistent state variables [#variables]
3636

@@ -67,7 +67,7 @@ You can read constants both in [receivers](#receiver-functions) and in [getters]
6767
Unlike [contract variables](#variables), **contract constants don't consume space in persistent state**. Their values are stored directly in the code [`Cell{:tact}`](/book/types#primitive-types) of the contract.
6868

6969
```tact
70-
// global constants are calculared in compile-time and cannot change
70+
// global constants are calculated in compile-time and cannot change
7171
const GlobalConst1: Int = 1000 + ton("42") + pow(10, 9);
7272
7373
contract Example {
@@ -113,7 +113,7 @@ If a contract doesn't have any persistent state variables, or they all have thei
113113
The following is an example of a valid empty contract:
114114

115115
```tact
116-
contract IamEmptyAndIknowIt {}
116+
contract IamEmptyAndIKnowIt {}
117117
```
118118

119119
For your convenience, parameter list of `init(){:tact}` can have a trailing comma:

pages/book/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Here are its main contents:
2020
/>
2121
</Cards>
2222

23-
### Cheetsheats
23+
### Cheatsheets
2424

2525
[Cheatsheets](/book/cs/from-func) are quick rundowns on Tact syntax and idioms with comparison to other blockchain languages, such as FunC (also on TON) and Solidity (Ethereum blockchain). Use those to transition to Tact as swiftly as possible.
2626

pages/book/operators.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Consider the following code:
8282
5 -5; // while here it would be viewed as a subtraction operator, despite formatting
8383
```
8484

85-
Even though this example may be simple, neglection of precedence rules can often lead to confusing situations with operators. The correct order of operations can be ensured by wrapping every operation in [parentheses](#parentheses), since parentheses have the highest precedence of all expressions and operators there is.
85+
Even though this example may be simple, neglecting of precedence rules can often lead to confusing situations with operators. The correct order of operations can be ensured by wrapping every operation in [parentheses](#parentheses), since parentheses have the highest precedence of all expressions and operators there is.
8686

8787
## Parentheses, `()` [#parentheses]
8888

pages/book/statements.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ fun niceCatch() {
162162
try {
163163
nativeThrow(42); // throwing with exit code 42
164164
} catch (err) {
165-
dump(err); // this will dump the exit code catched, which is 42
165+
dump(err); // this will dump the exit code caught, which is 42
166166
}
167167
}
168168
```

pages/book/structs-and-messages.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fun example() {
155155
let nicestNumber: Int = 68 + 1;
156156
157157
// You may instantiate the Struct as usual and assign variables to fields,
158-
// but that is a bit repetetive and tedious at times
158+
// but that is a bit repetitive and tedious at times
159159
PopQuiz{ vogonsCount: vogonsCount, nicestNumber: nicestNumber };
160160
161161
// Let's use field punning and type less,
@@ -187,7 +187,7 @@ struct Big {
187187
f6: Int;
188188
}
189189
190-
fun convertationFun() {
190+
fun conversionFun() {
191191
dump(Big{
192192
f1: 10000000000, f2: 10000000000, f3: 10000000000,
193193
f4: 10000000000, f5: 10000000000, f6: 10000000000,

pages/cookbook/data-structures.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ contract MapAsArray with Deployable {
135135
136136
// Internal message receiver, which responds to a String message "delete_5h"
137137
receive("delete_5th") {
138-
// Remove the 5th item if it exists and reply back with its value, or raise an erroor
138+
// Remove the 5th item if it exists and reply back with its value, or raise an error
139139
self.reply(self.array.deleteIdx(4).toCoinsString().asComment()); // index offset 0 + 4 gives the 5th item
140140
}
141141

pages/ref/core-base.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Usage example:
1616

1717
```tact
1818
contract AllYourStorageBelongsToUs {
19-
// This would change the behaviour of self.forward() function,
19+
// This would change the behavior of self.forward() function,
2020
// causing it to try reserving this amount of nanoToncoins before
2121
// forwarding a message with SendRemainingBalance mode
2222
override const storageReserve = ton("0.1");

pages/ref/core-cells.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Extension function for the [`Builder{:tact}`][p].
5353

5454
Stores an unsigned `bits`-bit `value` into the copy of the [`Builder{:tact}`][p] for $0 ≤$ `bits` $≤ 256$. Returns that copy.
5555

56-
Attempts to store a negative `value` or provide an unsufficient or out-of-bounds `bits` number throw an exception with [exit code 5](/book/exit-codes#5): `Integer out of expected range`.
56+
Attempts to store a negative `value` or provide an insufficient or out-of-bounds `bits` number throw an exception with [exit code 5](/book/exit-codes#5): `Integer out of expected range`.
5757

5858
Usage example:
5959

@@ -72,7 +72,7 @@ Extension function for the [`Builder{:tact}`][p].
7272

7373
Stores a signed `bits`-bit `value` into the copy of the [`Builder{:tact}`][p] for $0 ≤$ `bits` $≤ 257$. Returns that copy.
7474

75-
Attempts to provide an unsufficient or out-of-bounds `bits` number throw an exception with [exit code 5](/book/exit-codes#5): `Integer out of expected range`.
75+
Attempts to provide an insufficient or out-of-bounds `bits` number throw an exception with [exit code 5](/book/exit-codes#5): `Integer out of expected range`.
7676

7777
Usage example:
7878

pages/ref/core-common.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ receive() {
7272

7373
<Callout type="warning" emoji="⚠️">
7474

75-
Behaviour is undefined for [getter functions](/book/contracts#getter-functions), as they cannot have a sender nor they can send messages.
75+
Behavior is undefined for [getter functions](/book/contracts#getter-functions), as they cannot have a sender nor they can send messages.
7676

7777
</Callout>
7878

pages/ref/core-debug.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fun thisWillTerminate() {
134134
nativeThrow(42); // throwing with exit code 42
135135
}
136136
137-
fun butThisDoesnt() {
137+
fun butThisDoesNot() {
138138
try {
139139
nativeThrow(42); // throwing with exit code 42
140140
}
@@ -158,7 +158,7 @@ fun thisWillTerminate() {
158158
nativeThrowWhen(42, true); // throwing with exit code 42
159159
}
160160
161-
fun butThisDoesnt() {
161+
fun butThisDoesNot() {
162162
try {
163163
nativeThrow(42, true); // throwing with exit code 42
164164
}
@@ -181,7 +181,7 @@ fun thisWillTerminate() {
181181
nativeThrowUnless(42, false); // throwing with exit code 42
182182
}
183183
184-
fun butThisDoesnt() {
184+
fun butThisDoesNot() {
185185
try {
186186
nativeThrowUnless(42, false); // throwing with exit code 42
187187
}

pages/ref/evolution/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Cards } from 'nextra/components'
44

55
This sub-section contains all standards that are defined by the Tact Foundation and are used in the evolution process of the Tact and TON ecosystem.
6-
Additionaly, it features TEPs (TON Enhancement Proposals) and the up-to-date changelog of Tact updates.
6+
Additionally, it features TEPs (TON Enhancement Proposals) and the up-to-date changelog of Tact updates.
77

88
## Open Tact Proposals (OTPs)
99

pages/ref/stdlib-config.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import "@stdlib/config";
1616
fun getConfigAddress(): Address;
1717
```
1818

19-
Retrives config parameter $0$ as an [`Address{:tact}`][p].
19+
Retrieves config parameter $0$ as an [`Address{:tact}`][p].
2020

2121
Source code:
2222

@@ -34,7 +34,7 @@ fun getConfigAddress(): Address {
3434
fun getElectorAddress(): Address;
3535
```
3636

37-
Retrives config parameter $1$ as an [`Address{:tact}`][p].
37+
Retrieves config parameter $1$ as an [`Address{:tact}`][p].
3838

3939
Source code:
4040

0 commit comments

Comments
 (0)