Skip to content

Commit 21d0860

Browse files
authored
Merge pull request #2181 from o1-labs/boray/ci-typo-check
Add typo check workflow
2 parents 932189d + 78c3965 commit 21d0860

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

.github/workflows/checks.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Build
2828
uses: ./.github/actions/build
2929

30-
Lint-and-format:
30+
Lint-Format-and-TypoCheck:
3131
strategy:
3232
matrix:
3333
node: [20]
@@ -68,6 +68,16 @@ jobs:
6868
- name: Run Oxlint
6969
if: steps.get_changed_files.outputs.files_changed == 'true'
7070
run: xargs npm run lint:strict < changed_files.txt
71+
72+
- name: Run codespell
73+
if: steps.get_changed_files.outputs.files_changed == 'true' && github.event.pull_request.labels.*.name != 'no-typo-check'
74+
uses: codespell-project/actions-codespell@master
75+
with:
76+
check_filenames: true
77+
path: ${{ steps.get_changed_files.outputs.files }}
78+
skip: "*.json,./node_modules,./dist,./.husky,./.git,./src/mina/**/*,./src/bindings/compiled/**/*"
79+
check_hidden: false
80+
ignore_words_list: "tHi,modul,optin,deriver,PRing,toWords,iSelf"
7181

7282
Upload-bindings:
7383
name: upload bindings artifact

README-dev.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ These files only have to be regenerated if there are changes to the OCaml or Rus
4141

4242
### External contributors
4343

44-
Unfortunatel you generally won't be able to run `npm run build:bindings-download` on your own commits
44+
Unfortunately you generally won't be able to run `npm run build:bindings-download` on your own commits
4545
because the artifacts won't have been built for them, so make sure to run it on main before you start making changes.
4646
In a fresh git repo `npm run build` also works.
4747

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
buildCommand = ''
316316
cp -R $src/* .
317317
rm env-vars
318-
#restore write permisions removed by nix store
318+
#restore write permissions removed by nix store
319319
chmod +w -R .
320320
tar czf $out .
321321
'';

src/bindings/crypto/bindings/bigint256.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function caml_bytes_unsafe_set(s: MlBytes, i: number, c: number) {
102102
if (s.t != 4 /* ARRAY */) {
103103
if (i == s.c.length) {
104104
s.c += String.fromCharCode(c);
105-
if (i + 1 == s.l) s.t = 0; /*BYTES | UNKOWN*/
105+
if (i + 1 == s.l) s.t = 0; /*BYTES | UNKNOWN*/
106106
return 0;
107107
}
108108
caml_convert_bytes_to_array(s);

src/bindings/crypto/elliptic-curve-endomorphism.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ function endomorphismProjective(
140140
}
141141

142142
/**
143-
* Faster scalar muliplication leveraging the GLV decomposition (see {@link decompose}).
143+
* Faster scalar multiplication leveraging the GLV decomposition (see {@link decompose}).
144144
*
145145
* This method to speed up plain, non-provable scalar multiplication was the original application of GLV
146146
*
147-
* Instead of scaling a single point, we apply the decomposition to scale two points, with two scalars of half the orginal length:
147+
* Instead of scaling a single point, we apply the decomposition to scale two points, with two scalars of half the original length:
148148
*
149149
* `s*G = s0*G + s1*lambda*G = s0*G + s1*endo(G)`, where endo(G) is cheap to compute
150150
*
@@ -251,7 +251,7 @@ function computeGlvData(q: bigint, lambda: bigint) {
251251
type GlvData = ReturnType<typeof computeGlvData>;
252252

253253
/**
254-
* Extended Euclidian algorithm which stops when r1 < sqrt(p)
254+
* Extended Euclidean algorithm which stops when r1 < sqrt(p)
255255
*
256256
* Input: positive integers l, p
257257
*

0 commit comments

Comments
 (0)