From 1cc02565b063d3efe247b557ee9f26576247eeae Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Mar 2024 14:44:08 -0400 Subject: [PATCH 1/5] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..eeaceadf --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From f9cf4f5cfe110055e5c92e8f2751fe1f9b9f3d08 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Mar 2024 14:44:08 -0400 Subject: [PATCH 2/5] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..e21582ec --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,package-lock.json,*.css,.codespellrc +check-hidden = true +# ignore-regex = +# ignore-words-list = From e8ddb101de7a20d58e698aee1c491e086cbaf2aa Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Mar 2024 14:48:02 -0400 Subject: [PATCH 3/5] Adjust codespell config to minimize false positives etc --- .codespellrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index e21582ec..bbdb2cee 100644 --- a/.codespellrc +++ b/.codespellrc @@ -2,5 +2,7 @@ # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = .git*,package-lock.json,*.css,.codespellrc check-hidden = true -# ignore-regex = +# Ignore super long lines -- must be minimized etc, acronyms +# and some near hit variables +ignore-regex = ^.{120,}|\b(currentY|FOM)\b # ignore-words-list = From 091fede288b32d4ec8b675b931a7136cd5dcacfe Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Mar 2024 14:49:40 -0400 Subject: [PATCH 4/5] [DATALAD RUNCMD] Do interactive fixing of leftover ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2 ./plugin/zoom/plugin.js plugin/notes/plugin.js", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- plugin/notes/plugin.js | 2 +- plugin/zoom/plugin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/notes/plugin.js b/plugin/notes/plugin.js index 62649c2f..93446833 100644 --- a/plugin/notes/plugin.js +++ b/plugin/notes/plugin.js @@ -229,7 +229,7 @@ const Plugin = () => { openSpeakerWindow(); } else { - // Keep listening for speaker view hearbeats. If we receive a + // Keep listening for speaker view heartbeats. If we receive a // heartbeat from an orphaned window, reconnect it. This ensures // that we remain connected to the notes even if the presentation // is reloaded. diff --git a/plugin/zoom/plugin.js b/plugin/zoom/plugin.js index 960fb810..bf4f371a 100644 --- a/plugin/zoom/plugin.js +++ b/plugin/zoom/plugin.js @@ -147,7 +147,7 @@ var zoom = (function(){ } /** - * Pan the document when the mosue cursor approaches the edges + * Pan the document when the mouse cursor approaches the edges * of the window. */ function pan() { From e0bc3f764d75ae243f2f72aaa26be2545aca07ba Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 29 Mar 2024 14:49:42 -0400 Subject: [PATCH 5/5] [DATALAD RUNCMD] run codespell throughout fixing typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- css/theme/template/exposer.scss | 2 +- js/controllers/jumptoslide.js | 2 +- js/reveal.js | 2 +- plugin/highlight/plugin.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/css/theme/template/exposer.scss b/css/theme/template/exposer.scss index 2e9288d3..611c855f 100644 --- a/css/theme/template/exposer.scss +++ b/css/theme/template/exposer.scss @@ -1,4 +1,4 @@ -// Exposes theme's variables for easy re-use in CSS for plugin authors +// Exposes theme's variables for easy reuse in CSS for plugin authors :root { --r-background-color: #{$backgroundColor}; diff --git a/js/controllers/jumptoslide.js b/js/controllers/jumptoslide.js index 5a632605..0aaa2b1a 100644 --- a/js/controllers/jumptoslide.js +++ b/js/controllers/jumptoslide.js @@ -74,7 +74,7 @@ export default class JumpToSlide { let query = this.jumpInput.value.trim( '' ); let indices; - // When slide numbers are formatted to be a single linear mumber + // When slide numbers are formatted to be a single linear number // (instead of showing a separate horizontal/vertical index) we // use the same format for slide jumps if( /^\d+$/.test( query ) ) { diff --git a/js/reveal.js b/js/reveal.js index adb5a874..f064c78d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1252,7 +1252,7 @@ export default function( revealElement, options ) { /** * Returns true if we're currently on the last slide in - * the presenation. If the last slide is a stack, we only + * the presentation. If the last slide is a stack, we only * consider this the last slide if it's at the end of the * stack. */ diff --git a/plugin/highlight/plugin.js b/plugin/highlight/plugin.js index 26a7f93b..df4294a7 100644 --- a/plugin/highlight/plugin.js +++ b/plugin/highlight/plugin.js @@ -52,7 +52,7 @@ const Plugin = { block.innerHTML = betterTrim( block ); } - // Escape HTML tags unless the "data-noescape" attrbute is present + // Escape HTML tags unless the "data-noescape" attribute is present if( config.escapeHTML && !block.hasAttribute( 'data-noescape' )) { block.innerHTML = block.innerHTML.replace( //g, '>' ); }