Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codespell: add config + workflow and make it fix some typos it finds #3602

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,package-lock.json,*.css,.codespellrc
check-hidden = true
# Ignore super long lines -- must be minimized etc, acronyms
# and some near hit variables
ignore-regex = ^.{120,}|\b(currentY|FOM)\b
# ignore-words-list =
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion css/theme/template/exposer.scss
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion js/controllers/jumptoslide.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down
2 changes: 1 addition & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion plugin/highlight/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,"&lt;").replace(/>/g, '&gt;' );
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/notes/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion plugin/zoom/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down