Skip to content

Commit

Permalink
docs: configure spell check (#539)
Browse files Browse the repository at this point in the history
This PR configures the spell-check added to the docs workflow in the
github-actions repo: FuelLabs/github-actions#23

The files checked are configured in `.spellcheck.yml`. This is also
where you can configure what types of elements are ignored.

Right now it ignores:
- All code blocks that have a language (and will check code blocks that
do not have a language)
- Anything in between backticks
- Words in `spell-check-custom-words.txt` (case sensitive, only exact
match)
- Numbers, even if they are attached to a word
- Links in markdown link format

#### Handling errors:

If the test fails:
- look up the word in the question to verify it is a real word and is
correctly spelled
- If it is a file name or is code, use backticks to ignore the word.
- If it is a real word that is spelled correctly, or an acronym that is
either common or is defined already, add it to
`spell-check-custom-words.txt`.
- If needed, rewrite the sentence. Ex: DON'T use "`lock`ing" and add
"ing" to the custom words list. Instead, rewrite the sentence as
"locking with the `lock` method".
- If it otherwise should be ignored, you can configure the pipeline in
`.spellcheck.yml`.
  • Loading branch information
sarahschwartz authored Dec 12, 2023
1 parent d7e18fc commit a44cacd
Show file tree
Hide file tree
Showing 16 changed files with 637 additions and 338 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ on:
branches:
- master
pull_request:
release:
types: [published]

jobs:
test:
uses: FuelLabs/github-actions/.github/workflows/mdbook-docs.yml@master
with:
docs-src-path: 'src'
spellcheck-config-path: '.spellcheck.yml'
29 changes: 29 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
matrix:
- name: SPCheck
aspell:
lang: en
dictionary:
encoding: utf-8
wordlists:
- spell-check-custom-words.txt
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: \\[\\`~]
delimiters:
# Ignore all code blocks
- open: '(?s)^(?P<open> *`{3,}\s*(\w+\s*,?\s*)+.*?)$'
close: '^( *`{3,})$'
- pyspelling.filters.markdown:
markdown_extensions:
- pymdownx.superfences:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
sources:
- 'src/*.md'
- 'src/**/*.md'
default_encoding: utf-8

270 changes: 270 additions & 0 deletions spell-check-custom-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
ABI
ABIs
ASM
IDE
IDEs
LSP
namespace
ALU
APIs
JSON
BrowserStack
CLI
Deserialization
deserializing
DApp
subcurrency
Subcurrency
intrinsics
Intrinsics
workspace
workspaces
Workspaces
neovim
EVM
EVM's
EOA
ERC
Ethereum
Ethereum's
FVM
FuelVM
Fuelup
Github
GraphQL
Infura
JSON
LSP
Merkle
PoA
PoS
PoW
RPC
SDK
SDK's
SDKs
SauceLabs
Sepolia
Structs
Sway
TAI
TODO
TypeScript
UTF
UTXO
UTXOs
Utils
VM
VSCode
abigen
args
async
backend
backtraces
blockchain
blockchain's
bytecode
codespace
codespaces
config
cryptographic
customizable
customizations
dapp
dev
dropdown
enum
enums
env
forc
frontend
fuelup
fullstack
graphQL
graphql
http
https
js
localhost
mainnet
mempool
merkle
monorepo
monorepos
natively
npm
nvm
onboarding
params
pnpm
prerelease
queryable
quickstart
relayer
relayers
repo
repos
runnable
stateful
struct
structs
struct's
testnet
testnets
toolchain
toolchains
urql
validator
validators
superABI
superABIs
SuperABIs
supertraits
compositional
typeclass
turbofish
DSL
TOML
IPFS
Bitwise
Bitwise
runtime
runtimes
formatter
deployable
Utils
ETH
initializer
initializers
destructuring
instantiation
VMs
superset
CEI
pre
entrancy
interoperable
blockchains
keccak
SHA
UI
backtrace
Collateralized
collateralized
submodule
DEX
TypeChain
inlines
inlining
MiB
FuelVM's
deterministically
CLI
VS
GraphViz
DOT
DCA
AST
GitHub
decrypt
subcommand
subcommands
Subcommands
supertrait
supertraits
Supertraits
incrementor
monomorphization
Booleans
boolean
Orchestrator
orchestrator
growable
arity
tuple's
unary
SRC
DEX
FuelLabs
PRs
codebase
PostgreSQL
Postgres
MacOS
macOS
backends
hoc
semver
SQLx
Homebrew
Changelog
lookups
namespaces
YAML
WASM
WebAssembly
dApp
dApps
JWT
Schemas
schemas
AssemblyScript
indexable
Macbook
Dockerized
TLDR
IaaS
Updatable
coinbase
Coinbase
postcondition
Postcondition
Cryptocurrency
cryptocurrency
ECDSA
EcDSA
secp
Secp
Bitfield
SMT
SMTs
subtrees
subtree
prepended
unhashed
preimage
FIPS
EdDSA
curve25519
blazingly
pseudocode
Pseudocode
endian
KiB
SUT
Celestia
encodings
callee
inlined
parsable
underflows
bitmask
XORs
XOR
ORs
ANDs
rhs
lhs
scalable
Scalable
Exponentiate
exponentiate
Executablity
executablity
Unwritable
unwritable
untrusted
intra
OOB
unspendable
priori
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [Input](./tx-format/input.md)
- [Output](./tx-format/output.md)
- [Witness](./tx-format/witness.md)
- [TXPointer](./tx-format/tx-pointer.md)
- [Transaction Pointer](./tx-format/tx-pointer.md)
- [Computing Identifiers](./identifiers/index.md)
- [Asset ID](./identifiers/asset.md)
- [Contract ID](./identifiers/contract-id.md)
Expand Down
8 changes: 4 additions & 4 deletions src/abi/argument-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ These types are encoded in-place. Here's how to encode them. We define `enc(X)`
**Example:**

Encoding `42` yields: `0x000000000000002a`, which is the hexadecimal representation of the decimal number `42`, right-aligned to 8 bytes.
Encoding `u128::MAX - 1` yields: `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE`, it's right-alined to 16 bytes
Encoding `u128::MAX - 1` yields: `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE`, it's right-aligned to 16 bytes

## Boolean
## `Boolean`

`enc(X)` is `0` if `X` is false or `1` if `X` is true, left-padded with zero-bytes. Total length must be 8 bytes. Similar to the `u8` encoding.

Expand All @@ -54,7 +54,7 @@ Encoding `true` yields:
0x0000000000000001
```

## B256
## `B256`

`b256` is a fixed size bit array of length 256. Used for 256-bit hash digests and other 256-bit types. It is encoded as-is.

Expand All @@ -66,7 +66,7 @@ Encoding `0xc7fd1d987ada439fc085cfa3c49416cf2b504ac50151e3c2335d60595cb90745` yi
0xc7fd1d987ada439fc085cfa3c49416cf2b504ac50151e3c2335d60595cb90745
```

## Address
## `Address`

A 256-bit (32-byte) address, encoded in the same way as a `b256` argument: encoded as-is.

Expand Down
Loading

0 comments on commit a44cacd

Please sign in to comment.