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

Make CI reject spelling errors using codespell + fix three typos #121

Merged
merged 4 commits into from
Nov 27, 2023
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org>
# Licensed under Apache License Version 2.0

name: Enforce codespell-clean spelling

on:
pull_request:
push:
schedule:
- cron: '0 3 * * 5' # Every Friday at 3am
edgar-bonet marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

# Minimum permissions for security
permissions:
contents: read

jobs:
codespell:
name: Enforce codespell-clean spelling
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461 # v2.0
with:
# "nd" (with lowercase "n") is from ".Nd" (with uppercase "n") in ttyplot.1
# https://github.com/codespell-project/codespell/issues/3233#issuecomment-1828026522
ignore_words_list: nd
2 changes: 1 addition & 1 deletion recordings/get_back_in_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cd "${self_dir}"

if ! git diff --exit-code >/dev/null \
|| ! git diff --cached --exit-code >/dev/null ; then
echo 'ERROR: Please commit/stash your uncommited work first, aborting.' >&2
echo 'ERROR: Please commit/stash your uncommitted work first, aborting.' >&2
exit 1
fi

Expand Down
4 changes: 2 additions & 2 deletions ttyplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ int main(int argc, char *argv[]) {
}

setlocale(LC_ALL, "");
if (MB_CUR_MAX > 1) // if non-ASCII characters are supprted:
if (MB_CUR_MAX > 1) // if non-ASCII characters are supported:
plotchar.chars[0]=0x2502; // U+2502 box drawings light vertical
else
plotchar.chars[0]='|'; // U+007C vertical line
Expand Down Expand Up @@ -470,7 +470,7 @@ int main(int argc, char *argv[]) {
}

// Block until (a) we receive a signal or (b) stdin can be read without blocking
// or (c) timeout expires, in oder to reduce use of CPU and power while idle
// or (c) timeout expires, in order to reduce use of CPU and power while idle
fd_set read_fds;
FD_ZERO(&read_fds);
int select_nfds = 0;
Expand Down