Commit graph

29 commits

Author SHA1 Message Date
Vadim Zeitlin
6a41d8a486 Relax code style check for NULL
This is fine tuned to allow the string in the last commit to pass this
check, but still generally makes sense too.
2023-10-01 17:05:28 +02:00
Vadim Zeitlin
2e22666db8 Compile Cocoa control example in Unix "widgets" sample makefile
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
2023-07-11 13:40:21 +02:00
Vadim Zeitlin
c9c213553a Exclude some bakefiles from Whitespace code check too
Add a couple of .bkl files containing TABs in the embedded make
fragments to the list of files skipped by the whitespace check.
2023-07-11 13:39:13 +02:00
Vadim Zeitlin
fe66c0e38c Exclude a couple of makefile-like files from whitespace checks
It's require to use TAB for indentation in these files.
2023-06-20 15:12:34 +02:00
Vadim Zeitlin
6bba7055aa Exclude descrip.mms files everywhere from the whitespace check
Previously only the top-level one was excluded, but others use TABs too.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
438da9c99a Avoid mis-detecting NULL as part of other identifiers
Tighten the search for NULL in the code style check to avoid flagging
the use of MONITOR_DEFAULTTONULL (Win32 API constant) as violation.
2023-05-08 23:40:51 +01:00
Vadim Zeitlin
a0ea27cccf Restrict check for obsolete macros to C++ code
Only check for the use of NULL in C++ code, not C, for example, where
it still can, and should, be used.

Also allow using "NULL" as part of a larger macro name (where it would
be followed by "_") or at the beginning/end of a string.
2023-04-17 18:33:16 +02:00
Maarten Bent
1e3c148b5f
Fix missing submodule in CI after Scintilla update
Remove scintilla from 'git diff' checks, since it doesn't recurse into submodules by default.
2023-02-15 00:20:20 +01:00
Vadim Zeitlin
17ac31844d Allow using @NULL in interface/wx docs
This was previously disallowed by the code style check, but it's fine to
use this, as it expands to `nullptr` and it's not worth changing all the
existing occurrences of @NULL to @nullptr.
2022-11-23 02:44:50 +01:00
Maarten Bent
619071cb71
Fix NULL usage
Ignore scintilla files in NULL check.
Allow to use nullptr as an alias.
2022-10-22 21:30:37 +02:00
Maarten Bent
289cd2e58e
Exclude Scintilla from whitespace check 2022-10-22 20:06:05 +02:00
Vadim Zeitlin
3699dcf6b3 Check for adding NULL macro too
This might be too coarse, e.g. NULL is still needed in C code, so this
might need to be restricted to C++ files only later.
2022-10-18 18:36:30 +02:00
Vadim Zeitlin
2ebd4a6f8d Add check for obsolete macros to automatic code style checks
Avoid checking in code using wxOVERRIDE or wxNOEXCEPT again, now that
we've got rid of them.
2022-10-18 02:23:01 +02:00
Vadim Zeitlin
9ed1a4ea59 Use v3 of checkout action in GitHub CI builds
The previously used v2 uses node12 which is being deprecated by GitHub
and won't be any longer available soon, so switch to the currently
supported version.
2022-10-10 23:55:12 +02:00
Vadim Zeitlin
1a53e80bf7 Use Doxygen Awesome CSS theme
Import the theme files into a subdirectory without any changes, even not
removing the trailing whitespace, to facilitate updating them in the
future. Do not add the theme as a submodule as it's surprisingly big
(~12MB) and we don't want to spend extra time on cloning it in each of
our CI builds.

Using this theme gives a nicer appearance and supports the often
requested dark mode.

Remove all colour-related options from the existing custom CSS file as
they don't work well in dark mode.

Also switch to using SVGs with transparent background, rather than PNGs,
for the class diagrams, to avoid background colour mismatch in dark
mode.
2022-07-02 16:57:57 +02:00
naveen
64add326f6 Restrict job permissions in GitHub actions workflows
Restrict the GitHub token permissions only to the required ones, i.e.
just read-only access to the code.

This is done in order to reduce the potential harm in case of a
malicious pull request, see GitHub blog post at
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>

Closes #22574.
2022-06-28 14:00:44 +02:00
Vadim Zeitlin
1fbda84306 Exclude Info.plist files from whitespace checks
These files use TABs for indentation, so the standard check doesn't work
for them (and it doesn't seem worth having a special check just for
them neither, so simply don't check them at all).
2021-08-15 18:39:34 +02:00
Vadim Zeitlin
d81d7b1563 Exclude .gitmodules from whitespace code style checks
This file uses TABs and can keep using them.
2021-07-17 20:41:18 +02:00
Vadim Zeitlin
4ec8f8a221 Exclude Xcode project files from whitespace style checks
These files contain TABs and didn't pass the check and, of course, we're
not interested in the style in which they're written anyhow.
2021-03-15 11:36:46 +01:00
Maarten Bent
36ab71301c Add CI check for mixed line endings
Trigger workflow on all file changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2224
2021-02-09 22:17:13 +01:00
Vadim Zeitlin
96eb09a383 Really ignore TABs in makefiles etc in the whitespace check
Add missing ":" in the beginning of Git pathspecs to make the exclusions
really work.

Also add entries for Makefile.in, which is not caught by **/*akefile*,
and other files in the root directory containing hard TABs.
2020-10-06 02:14:46 +02:00
Vadim Zeitlin
5358dd7007 Add a check for trailing whitespace and TABs
Just use Git itself to check for it in the new files.
2020-09-28 03:24:44 +02:00
Vadim Zeitlin
90ac5eeb6a Let shell expands $HOME in GitHub workflow
Apparently $HOME doesn't get expanded otherwise, resulting in "codespell
not found" error.
2020-07-18 19:49:21 +02:00
Vadim Zeitlin
e875b11f74 Run codespell from a separate script in GitHub workflow
This allows to give a more detailed error message in case of a problem
and also makes it simpler to run the spell check locally.
2020-07-18 19:42:48 +02:00
Vadim Zeitlin
0744cd14a1 Try using Python 3 for codespell
Running it using Python 2 seems to result in a problem with not matching
an exclusion line with non-ASCII character, which works fine with Python
3 locally.
2020-07-13 17:38:01 +02:00
Vadim Zeitlin
77e1e6330b Run codespell from where it is installed by pip
And disable the (useful) warning about this directory not being in PATH.
2020-07-13 17:35:30 +02:00
Vadim Zeitlin
d432b1a685 Try installing codespell 1.17.1 via pip
The 1.16 version available in Ubuntu 20.04 doesn't work nearly as well
as the latest one.
2020-07-13 17:30:47 +02:00
Vadim Zeitlin
1fcdaa7f22 Combine all values of codespell --skip option into one
codespell 1.17.1 from Debian Sid accepts multiple -S options, but 1.16
in Ubuntu 20.04 doesn't seem to like them.
2020-07-13 17:25:18 +02:00
Vadim Zeitlin
e4a826d250 Add GitHub workflow checking spelling for headers and docs
Run codespell using GitHub Actions to flag any new spelling errors.
2020-07-13 17:19:26 +02:00