diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml
new file mode 100644
index 0000000000..381f88eb1f
--- /dev/null
+++ b/.github/workflows/code_checks.yml
@@ -0,0 +1,45 @@
+# This workflow does some quick checks.
+name: Code Checks
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - '.github/workflows/code_checks.yml'
+ - 'docs/**'
+ - 'include/**'
+ - 'interface/**'
+ - 'misc/suppressions/**'
+ - '**/*.md'
+ - '!docs/changes*txt'
+ pull_request:
+ branches:
+ - master
+ paths:
+ - '.github/workflows/code_checks.yml'
+ - 'docs/**'
+ - 'include/**'
+ - 'interface/**'
+ - 'misc/suppressions/**'
+ - '**/*.md'
+ - '!docs/changes*txt'
+
+jobs:
+ check-unix:
+ runs-on: ubuntu-20.04
+ name: Check Spelling
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install codespell
+ run: |
+ pip3 install --no-warn-script-location codespell==1.17.1
+
+ - name: Run codespell
+ env:
+ CODESPELL: $HOME/.local/bin/codespell
+ run: |
+ ./misc/scripts/spellcheck
diff --git a/docs/index.htm b/docs/index.htm
index 5d1c28d77e..43a6fbc0c0 100644
--- a/docs/index.htm
+++ b/docs/index.htm
@@ -127,7 +127,7 @@
Contributor Notes
Contributor notes contain information useful only to wxWidgets developers
- for the maintainance of the project:
+ for the maintenance of the project:
- Index of Contributor Notes
diff --git a/docs/msw/install.md b/docs/msw/install.md
index eef51a59b7..31e94bd69e 100644
--- a/docs/msw/install.md
+++ b/docs/msw/install.md
@@ -301,7 +301,7 @@ debug mode, edit makefile.bcc and change /aa to /Tpe in link commands.
Using the Debugger and IDE in BDS or Turbo Explorer
---------------------------------------------------
-Doubleclick / open \%WXWIN\%\samples\minimal\borland.bdsproj. The current version
+Double-click / open \%WXWIN\%\samples\minimal\borland.bdsproj. The current version
is to be used with a dynamic build of wxWidgets-made by running
make -f Makefile.bcc -DBUILD=debug -DSHARED=1
in wxWidgets\build\msw. You also need the `wxWidgets\lib\bcc_dll`
diff --git a/docs/wine/install.txt b/docs/wine/install.txt
index e6e3d3311b..8563f41f1c 100644
--- a/docs/wine/install.txt
+++ b/docs/wine/install.txt
@@ -367,7 +367,7 @@ configure --disable-static --enable-shared --enable-gui \
--with-libjpeg --enable-debug_cntxt
Compiling a sample won't work yet because 'winebuild' needs
-to be called, and the resuling C file compiled and linked.
+to be called, and the resulting C file compiled and linked.
Plus, Windows DLLs need to be imported.
Note that the documentation on the WINE web site on using
diff --git a/misc/scripts/codespell.ignore b/misc/scripts/codespell.ignore
deleted file mode 100644
index 913a7b6c48..0000000000
--- a/misc/scripts/codespell.ignore
+++ /dev/null
@@ -1,6 +0,0 @@
-convertor
-malcom
-ot
-othere
-seh
-ser
diff --git a/misc/scripts/spellcheck b/misc/scripts/spellcheck
new file mode 100755
index 0000000000..ea6c69dddc
--- /dev/null
+++ b/misc/scripts/spellcheck
@@ -0,0 +1,32 @@
+#!/bin/sh
+CODESPELL=${CODESPELL-codespell}
+
+# Make sure we run codespell from the top wx directory.
+cd `dirname "$0"`/../..
+
+if ! command -v $CODESPELL > /dev/null; then
+ echo "ERROR: codespell not available." >&2
+ exit 127
+fi
+
+$CODESPELL \
+ -I misc/suppressions/codespell-words \
+ -x misc/suppressions/codespell-lines \
+ -S 'docs/changes.txt,docs/changes_30.txt,*.png,*.ico,*.bmp,*.cur,docs/doxygen/images' \
+ README.md docs include interface
+
+rc=$?
+
+if [ $rc != 0 ]; then
+ cat <& 2
+ exit $rc
+fi
diff --git a/misc/suppressions/codespell-lines b/misc/suppressions/codespell-lines
new file mode 100644
index 0000000000..e80bff8717
--- /dev/null
+++ b/misc/suppressions/codespell-lines
@@ -0,0 +1,25 @@
+wxMessageBox(L"Salut \u00E0 toi!"); // U+00E0 is "Latin Small Letter a with Grave"
+wxMessageBox("Salut à toi!");
+wxMessageBox(wxString::FromUTF8("Salut \xC3\xA0 toi!"));
+(week|wee)(night|knights) matches all ten characters of "weeknights",
+expressions (BRE). EREs are roughly those of the traditional @e egrep,
+@row2col{ b , Rest of RE is a BRE. }
+ the ARE (?: or the BRE \(.
+ return wxPrivate::wxAnyAsImpl::DoAs(*this);
+ static T DoAs(const wxAny& any)
+ static wxString DoAs(const wxAny& any)
+ removeable,
+ virtual void HandleLineEvent( unsigned int n, bool doubleClick );
+ sequence of labels is A, B, ..., Z, AA, AB, ..., AZ, BA, ..., ..., ZZ,
+ wxEdge otherE,
+ void swap(wxScopedPtr& ot);
+ SEH (structured exception handling) which currently means only Microsoft
+ void Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN);
+// Copyright: (c) 2009 Marcin Malich
+ * All of the settings below require SEH support (__try/__catch) and can't work
+ the version check in `include/wx/msw/seh.h` to suppress this warning for the
+#endif /* compiler doesn't support SEH */
+// Name: wx/msw/seh.h
+// Purpose: declarations for SEH (structured exceptions handling) support
+ // 2019), i.e. SEH translator seems to work just fine without /EHa too, so
+// Purpose: helpers for the structured exception handling (SEH) under Win32
diff --git a/misc/suppressions/codespell-words b/misc/suppressions/codespell-words
new file mode 100644
index 0000000000..693a2774ec
--- /dev/null
+++ b/misc/suppressions/codespell-words
@@ -0,0 +1,3 @@
+convertor
+ot
+ser