Merge branch 'codespell-workflow'

Set up a GitHub workflow checking for spelling errors in the
documentation and headers.

See https://github.com/wxWidgets/wxWidgets/pull/1958
This commit is contained in:
Vadim Zeitlin
2020-07-18 19:43:06 +02:00
8 changed files with 108 additions and 9 deletions

45
.github/workflows/code_checks.yml vendored Normal file
View File

@@ -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

View File

@@ -127,7 +127,7 @@
<h1>Contributor Notes</h1> <h1>Contributor Notes</h1>
<p>Contributor notes contain information useful only to wxWidgets developers <p>Contributor notes contain information useful only to wxWidgets developers
for the maintainance of the project:</p> for the maintenance of the project:</p>
<ul> <ul>
<li><a href="contributing/">Index of Contributor Notes</a></li> <li><a href="contributing/">Index of Contributor Notes</a></li>

View File

@@ -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 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 is to be used with a dynamic build of wxWidgets-made by running
make -f Makefile.bcc -DBUILD=debug -DSHARED=1 make -f Makefile.bcc -DBUILD=debug -DSHARED=1
in wxWidgets\build\msw. You also need the `wxWidgets\lib\bcc_dll` in wxWidgets\build\msw. You also need the `wxWidgets\lib\bcc_dll`

View File

@@ -367,7 +367,7 @@ configure --disable-static --enable-shared --enable-gui \
--with-libjpeg --enable-debug_cntxt --with-libjpeg --enable-debug_cntxt
Compiling a sample won't work yet because 'winebuild' needs 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. Plus, Windows DLLs need to be imported.
Note that the documentation on the WINE web site on using Note that the documentation on the WINE web site on using

View File

@@ -1,6 +0,0 @@
convertor
malcom
ot
othere
seh
ser

32
misc/scripts/spellcheck Executable file
View File

@@ -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 <<EOF
=================================== ERROR ===================================
Spell check failed, please correct the spelling mistakes at the locations
listed above. If any of the reported mistakes are false positives, please add
the lines provoking them to misc/suppressions/codespell-lines file or, if
there are many occurrences of the same word, add this word to codespell-words
file in the same directory.
EOF
>& 2
exit $rc
fi

View File

@@ -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!"));
<tt>(week|wee)(night|knights)</tt> matches all ten characters of "weeknights",
expressions</em> (BRE). EREs are roughly those of the traditional @e egrep,
@row2col{ <tt>b</tt> , Rest of RE is a BRE. }
the ARE <tt>(?:</tt> or the BRE <tt>\(</tt>.
return wxPrivate::wxAnyAsImpl<T>::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<T>& 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 <me@malcom.pl>
* 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

View File

@@ -0,0 +1,3 @@
convertor
ot
ser