From d21d5993b9452bdb7813e8c6b897241bbc72b758 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 17 Dec 2020 16:22:31 +1000 Subject: feat(CI): add a GitHub Action to check spelling - Fix spelling - Run only on pull request - Using https://github.com/client9/misspell --- .github/workflows/spell-checker.yml | 17 +++++++++++++++++ mrbgems/mruby-compiler/core/codegen.c | 2 +- mrbgems/mruby-compiler/core/parse.y | 2 +- mrbgems/mruby-compiler/core/y.tab.c | 2 +- mrbgems/mruby-io/src/file.c | 4 ++-- 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/spell-checker.yml diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml new file mode 100644 index 000000000..307617c4a --- /dev/null +++ b/.github/workflows/spell-checker.yml @@ -0,0 +1,17 @@ +name: ๐Ÿ’Ž Spellchecker + +on: [pull_request] + +jobs: + misspell: + name: ๐Ÿงน Check Spelling + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ’ Check Out + uses: actions/checkout@v2 + - name: ๐Ÿ… Install + run: | + wget -O - -q https://git.io/misspell | sh -s -- -b . + - name: ๐ŸŒถ๏ธ Misspell + run: | + find . -type f | xargs ./misspell -error diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 66763b953..4ac092176 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -856,7 +856,7 @@ lambda_body(codegen_scope *s, node *tree, int blk) oa = node_len(tree->car->cdr->car); /* rest argument? */ ra = tree->car->cdr->cdr->car ? 1 : 0; - /* mandatory arugments after rest argument */ + /* mandatory arguments after rest argument */ pa = node_len(tree->car->cdr->cdr->cdr->car); pargs = tree->car->cdr->cdr->cdr->car; /* keyword arguments */ diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 62fff304e..16e1cef32 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -6826,7 +6826,7 @@ str_dump(mrb_state *mrb, const char *str, int len) int ai = mrb_gc_arena_save(mrb); mrb_value s; # if INT_MAX > MRB_INT_MAX / 4 - /* check maximum length with "\xNN" charactor */ + /* check maximum length with "\xNN" character */ if (len > MRB_INT_MAX / 4) { len = MRB_INT_MAX / 4; } diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index cb645c505..a1852b831 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -12827,7 +12827,7 @@ str_dump(mrb_state *mrb, const char *str, int len) int ai = mrb_gc_arena_save(mrb); mrb_value s; # if INT_MAX > MRB_INT_MAX / 4 - /* check maximum length with "\xNN" charactor */ + /* check maximum length with "\xNN" character */ if (len > MRB_INT_MAX / 4) { len = MRB_INT_MAX / 4; } diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 1704579cf..58f4bcc6f 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -298,7 +298,7 @@ is_absolute_traditional_path(const char *path, size_t len) } static int -is_aboslute_unc_path(const char *path, size_t len) { +is_absolute_unc_path(const char *path, size_t len) { if (len < 2) return 0; return (CHECK_UNCDEV_PATH && !IS_DEVICEID(path[2])); } @@ -317,7 +317,7 @@ mrb_file_is_absolute_path(const char *path) if (len > 0) return ( is_absolute_traditional_path(path, len) || - is_aboslute_unc_path(path, len) || + is_absolute_unc_path(path, len) || is_absolute_device_path(path, len) ); else -- cgit v1.2.3