Skip to content

Commit f849192

Browse files
authored
Merge pull request #581 from CosmWasm/co/add-typo-check
Add typo check
2 parents bb5b8c1 + bdbeadc commit f849192

File tree

18 files changed

+45
-24
lines changed

18 files changed

+45
-24
lines changed

.github/workflows/typo-check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check for typos
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
check-typos:
13+
name: "Spell-check repository source"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run spell-check
19+
uses: crate-ci/typos@master

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[default]
2+
extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"]

builders/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ See those DockerHub repos for all available versions of the builder images.
149149

150150
## Usage
151151

152-
Create the Docker images, capable of cross-compling Linux and MacOS dynamic
152+
Create the Docker images, capable of cross-compiling Linux and MacOS dynamic
153153
libs. As the builder images are all x86_64, it can be slow and memory intense to
154154
do this on a different architecture:
155155

docs/COMPILER_VERSIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ supported by cosmwasm-std/cosmwasm-vm.
5454

5555
## Tooling Rust compiler
5656

57-
This Rust version is not related to our codebase directy. It's sufficiently
57+
This Rust version is not related to our codebase directly. It's sufficiently
5858
modern to install and execute tools like `cargo-audit`.
5959

6060
## Versions in use

docs/MIGRATING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ where the old name was deprecated.
6464
| `SubcallResponse` | `SubMsgResponse` | Contracts do not "call" each other but send messages around |
6565
| `HumanizeAddress` | `HumanizeAddressFunc` | Follow [best practice for naming function types][ft] |
6666
| `CanonicalizeAddress` | `CanonicalizeAddressFunc` | Follow [best practice for naming function types][ft] |
67-
| `GoAPI.HumanAddress` | `GoAPI.HumanizeAddress` | Perfer verbs for converters |
68-
| `GoAPI.CanonicalAddress` | `GoAPI.CanonicalizeAddress` | Perfer verbs for converters |
67+
| `GoAPI.HumanAddress` | `GoAPI.HumanizeAddress` | Prefer verbs for converters |
68+
| `GoAPI.CanonicalAddress` | `GoAPI.CanonicalizeAddress` | Prefer verbs for converters |
6969
| `CosmosMsg.Stargate` | `CosmosMsg.Any` | The message has nothing to do with Stargate |
7070
| `StargateMsg` | `AnyMsg` | The message has nothing to do with Stargate |
7171
| `QueryResponse` | `QueryResult` | Brings consistency with the naming of the other results |

internal/api/bindings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ typedef struct ByteSliceView {
163163
* ```
164164
*
165165
*
166-
* If you want to mutate data, you need to comsume the vector and create a new one:
166+
* If you want to mutate data, you need to consume the vector and create a new one:
167167
*
168168
* ```rust
169169
* # use wasmvm::{UnmanagedVector};
@@ -308,7 +308,7 @@ typedef struct GoIter {
308308
struct gas_meter_t *gas_meter;
309309
/**
310310
* A reference which identifies the iterator and allows finding and accessing the
311-
* actual iterator instance in Go. Once fully initalized, this is immutable.
311+
* actual iterator instance in Go. Once fully initialized, this is immutable.
312312
*/
313313
struct IteratorReference reference;
314314
struct IteratorVtable vtable;

internal/api/memory_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestCreateAndDestroyUnmanagedVector(t *testing.T) {
5050
var original []byte
5151
unmanaged := newUnmanagedVector(original)
5252
require.Equal(t, cbool(true), unmanaged.is_none)
53-
// We must not make assumtions on the other fields in this case
53+
// We must not make assumptions on the other fields in this case
5454
copy := copyAndDestroyUnmanagedVector(unmanaged)
5555
require.Nil(t, copy)
5656
}

internal/api/mocks.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (l *Lookup) WithGasMeter(meter MockGasMeter) *Lookup {
277277
}
278278
}
279279

280-
// Get wraps the underlying DB's Get method panicing on error.
280+
// Get wraps the underlying DB's Get method panicking on error.
281281
func (l Lookup) Get(key []byte) []byte {
282282
l.meter.ConsumeGas(GetPrice, "get")
283283
v, err := l.db.Get(key)
@@ -288,23 +288,23 @@ func (l Lookup) Get(key []byte) []byte {
288288
return v
289289
}
290290

291-
// Set wraps the underlying DB's Set method panicing on error.
291+
// Set wraps the underlying DB's Set method panicking on error.
292292
func (l Lookup) Set(key, value []byte) {
293293
l.meter.ConsumeGas(SetPrice, "set")
294294
if err := l.db.Set(key, value); err != nil {
295295
panic(err)
296296
}
297297
}
298298

299-
// Delete wraps the underlying DB's Delete method panicing on error.
299+
// Delete wraps the underlying DB's Delete method panicking on error.
300300
func (l Lookup) Delete(key []byte) {
301301
l.meter.ConsumeGas(RemovePrice, "remove")
302302
if err := l.db.Delete(key); err != nil {
303303
panic(err)
304304
}
305305
}
306306

307-
// Iterator wraps the underlying DB's Iterator method panicing on error.
307+
// Iterator wraps the underlying DB's Iterator method panicking on error.
308308
func (l Lookup) Iterator(start, end []byte) types.Iterator {
309309
l.meter.ConsumeGas(RangePrice, "range")
310310
iter, err := l.db.Iterator(start, end)
@@ -315,7 +315,7 @@ func (l Lookup) Iterator(start, end []byte) types.Iterator {
315315
return iter
316316
}
317317

318-
// ReverseIterator wraps the underlying DB's ReverseIterator method panicing on error.
318+
// ReverseIterator wraps the underlying DB's ReverseIterator method panicking on error.
319319
func (l Lookup) ReverseIterator(start, end []byte) types.Iterator {
320320
l.meter.ConsumeGas(RangePrice, "range")
321321
iter, err := l.db.ReverseIterator(start, end)

lib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func LibwasmvmVersion() (string, error) {
4040

4141
// CreateChecksum performs the hashing of Wasm bytes to obtain the CosmWasm checksum.
4242
//
43-
// Ony Wasm blobs are allowed as inputs and a magic byte check will be performed
43+
// Only Wasm blobs are allowed as inputs and a magic byte check will be performed
4444
// to avoid accidental misusage.
4545
func CreateChecksum(wasm []byte) (Checksum, error) {
4646
if len(wasm) == 0 {

libwasmvm/bindings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ typedef struct ByteSliceView {
163163
* ```
164164
*
165165
*
166-
* If you want to mutate data, you need to comsume the vector and create a new one:
166+
* If you want to mutate data, you need to consume the vector and create a new one:
167167
*
168168
* ```rust
169169
* # use wasmvm::{UnmanagedVector};
@@ -308,7 +308,7 @@ typedef struct GoIter {
308308
struct gas_meter_t *gas_meter;
309309
/**
310310
* A reference which identifies the iterator and allows finding and accessing the
311-
* actual iterator instance in Go. Once fully initalized, this is immutable.
311+
* actual iterator instance in Go. Once fully initialized, this is immutable.
312312
*/
313313
struct IteratorReference reference;
314314
struct IteratorVtable vtable;

0 commit comments

Comments
 (0)