From d4c79830753a07c912bb264602dfda013ed8e0aa Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:14:06 -0400 Subject: [PATCH] Configure spelling --- .github/workflows/ci.yml | 16 ++++++++ cspell.jsonc | 36 ++++++++++++++++ dev.yml | 1 + project-words | 88 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+) create mode 100644 cspell.jsonc create mode 100644 project-words diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5899ad616..c18d460cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,22 @@ name: CI on: [push, pull_request] jobs: + spelling: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + env: + DISABLE_V8_COMPILE_CACHE: "1" + uses: actions/setup-node@v4 + with: + node-version: "20.9" + cache: "yarn" + cache-dependency-path: "vscode" + + - name: Run cspell + run: yarn global add cspell && cspell lint_ruby: runs-on: ubuntu-latest steps: diff --git a/cspell.jsonc b/cspell.jsonc new file mode 100644 index 000000000..9c48d0102 --- /dev/null +++ b/cspell.jsonc @@ -0,0 +1,36 @@ +{ + "version": "0.2", + "dictionaryDefinitions": [ + { + "name": "project-words", + "path": "./project-words", + "addWords": true + } + ], + // cspell recognizes 'addon' as valid but we want to enforce 'add-on', but not within code + "words": [ + "!addon" + ], + "ignoreRegExpList": [ + "\\.addon", + "addon\\.", + "\\(addon\\)", + "@addon", + "_addon", + "addon\\w+", + "addon_", + "addon\"", + "addon =", + "$\\s+addon^", + "\\|addon\\|", + "addon$" // could have false positives but unlikely + ], + "language": "en", + "files": ["**/*.rb", "**/*.md", "**/*.markdown"], + "ignorePaths": [ + "**/node_modules/**", + "vendor/**", + "test/fixtures/", + ], + "dictionaries": ["ruby", "en_US", "shell", "file-types", "project-words"] + } diff --git a/dev.yml b/dev.yml index 09543eedc..a459bfc85 100644 --- a/dev.yml +++ b/dev.yml @@ -5,6 +5,7 @@ type: ruby up: - ruby - bundler + - cspell - node: yarn: true version: 20.9.0 diff --git a/project-words b/project-words new file mode 100644 index 000000000..2ea3f1255 --- /dev/null +++ b/project-words @@ -0,0 +1,88 @@ +activestorage +autocorrect +autoloaded +autorun +bigdecimal +bindir +binread +Bizt +Bizw +bufnr +byteslice +codepoint +codepoints +concats +copen +Corge +dont +eglot +Eglot +eruby +EXTGLOB +FIXEDENCODING +Floo +fnmatch +fooo +hostedtoolcache +importmap +indexables +Indexables +ipairs +Itest +ivar +Jaro +jekyll/editors.markdown +Kaigi +klass +kwargs +linearization +Linearizes +linearizing +lockfiles +lspconfig +Lstart +metaprogramming +mkpath +nargs +nodoc +noreturn +nvim +qtlzwssomeking +quickfixes +quux +quxx +rdbg +realpath +reparsing +requireds +rhtml +rindex +rjson +rmtree +rubyfmt +rubylibdir +rubylibprefix +setfqlist +setqflist +shadowenv +shellwords +snode +somethi +spoom +streerc +stringio +strscan +subexpression +supertypes +Supertypes +suppo +unaliased +unindexed +unparser +unresolve +Vinicius +Winkler +XQRK +yarp +YARP +YJIT