Commit graph

43 commits

Author SHA1 Message Date
Yuri Sizov 3ae282b452 Create an "Editor-only" section in the online class reference
This helps to find such classes without digging
through the rest of the class reference.
Editor-only classes can still be found under
your normal "Node" and "Resource" types.

This also fixes a typo and a missed case from the recent platform docs PR.
2023-04-24 21:06:55 +02:00
John Veness 4505049ba6 Corrected capitalisation of macOS
In documentation and comments, ignoring thirdparty code
2023-03-12 16:48:52 +00:00
bruvzg 9ab6fd592e
[Git hooks] Add AppleScript dialog script for macOS. 2023-01-16 14:23:06 +02:00
Rémi Verschelde 5408af1407 Style: Ensure consistent formatting with clang-format 15
When going from version 14 to 15 it would introduce a tiny change in
`websocket_macros.h` just before the comment re-enabling clang-format,
but this can be solved by just letting it do its work.

Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't
used, and bump recommended versions for pre-commit hook to [13; 15].
2022-09-21 12:48:58 +02:00
Rémi Verschelde 08eafbd52b
Merge pull request #65078 from RandomShaper/git_hooks_extend 2022-08-30 16:18:31 +02:00
Pedro J. Estébanez 8e2d0e1bb1 Add ability to extend the set of Git pre-commit hooks 2022-08-30 13:34:10 +02:00
Pedro J. Estébanez 4bf03afe8b Make Git hooks work on worktrees on Windows 2022-08-30 11:18:11 +02:00
Hugo Locurcio d45351f413
makerst: Print colored output for easier visual grepping
This is automatically enabled on all platforms including
Windows 10 and later, whenever a TTY environment is detected.

In non-TTY environments such as CI, this can be forced using the
`--color` command line argument.
2022-06-11 00:19:36 +02:00
Rémi Verschelde 9e66a947e4 Relax version warning in clang-format precommit hook
Closes #60778.
2022-05-05 13:39:28 +02:00
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
David Sichma 3fe10c7e9d
Fixed pre-commit-black file extensions
Now hook can find .py files.
2021-11-18 19:29:17 +01:00
Rémi Verschelde 098e3cf8f7
Fix style issue after #54148 2021-11-16 14:27:44 +01:00
Rémi Verschelde 2ecab0491c
Merge pull request #54179 from aaronfranke/make-rst 2021-10-26 08:43:07 +02:00
Rémi Verschelde 55d05565d0
clang-format: Enable --Wno-error=unknown for compat with older versions
This prevents errors when encountering options which have been defined in newer
versions of clang-format, and are invalid in the YAML for the old version.

Bump minimum supported clang-format version to 12 (where `--Wno-error=unknown`
was added).

Use clang-format 12 on CI (13 is not available yet on the Ubuntu 20.04 images).
2021-10-25 00:19:22 +02:00
Aaron Franke 8f05e26198
Rename "makerst.py" to "make_rst.py" 2021-10-24 01:58:59 -05:00
Rémi Verschelde 63544c3a9d
clang-format: Sync config with LLVM 13
Disable minimum amount of spaces in comment prefix for now, as it otherwise
modifies the whole codebase. That's something we probably want to use as it
matches our convention, but we should look into fully converting these
comments to our style guide at the same time.
2021-10-22 21:51:02 +02:00
Aaron Franke ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
Hugo Locurcio d74413ebd0
Allow clang-format 12 in the pre-commit hook
clang-format 12's formatting is identical to clang-format 11's.
2021-06-07 16:59:52 +02:00
Rémi Verschelde c1c76850cb
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
2021-06-07 11:03:08 +02:00
Hugo Locurcio 61aa09097f
Fix Ubuntu clang-format version detection in the pre-commit hook 2021-05-10 17:05:46 +02:00
Rémi Verschelde f4d46f6290
clang-format: Fix version number in hook warning 2021-03-14 01:07:14 +01:00
Rémi Verschelde a10c259c1d
Dynamically load libudev.so.1 on Linux if udev=yes
This makes it possibly to run Linux binaries compiled with udev support on
Linux systems which do not provide udev (typically systemd-less distros).

If udev is missing, we fall back to parsing `/dev/input` like when compiled
without udev support (`udev=no`).

Also adding some verbose debug statements to know which method we're using
when debugging Linux joypad issues.

The libudev so wrappers were generated on Mageia 8 with libudev 246.9 using
https://github.com/hpvb/dynload-wrapper:
```
./generate-wrapper.py --include /usr/include/libudev.h --sys-include '<libudev.h>' \
  --soname libudev.so.1 --init-name libudev --omit-prefix gnu_ \
  --output-header libudev-so_wrap.h --output-implementation libudev-so_wrap.c
```
2021-02-17 13:14:59 +01:00
Rémi Verschelde 6525662f27
Merge pull request #45141 from Calinou/clang-format-hook-check-version
Check for clang-format version in the pre-commit hook
2021-01-26 15:26:46 +01:00
Rémi Verschelde 76c6007aa6
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.
2021-01-19 23:36:42 +01:00
Hugo Locurcio 3333b58a7f
Check for clang-format version in the pre-commit hook
Different clang-format versions may result in different formatting.
Therefore, it's recommended to use the same version as used in CI.
2021-01-12 21:40:46 +01:00
bruvzg 05f041127d
Git Hooks: Suppress "which" error messages. 2020-04-24 20:11:53 +03:00
bruvzg fdad0e3bd1
Git Hooks: Add support for GUI git clients.
[ci skip]
2020-04-21 16:24:33 +03:00
Rémi Verschelde dfed5efea3
Merge pull request #37445 from nekomatata/hook-makerst-fix
Fixed errors in makerst pre-commit hook
2020-03-31 00:17:51 +02:00
PouleyKetchoupp 619354fb2c Fixed errors in makerst pre-commit hook 2020-03-31 00:02:11 +02:00
PouleyKetchoupp 7b6e664178 Pre-commit hook instructions on Windows 2020-03-30 22:59:06 +02:00
Rémi Verschelde 4d52761da6 Hooks: Use pygmentize if available to visualize diff 2020-03-30 09:05:59 +02:00
Rémi Verschelde 164826a39b Hooks: Add pre-commit hook for psf/black formatting 2020-03-30 09:05:59 +02:00
Hugo Locurcio 17add2dc86
Add a pre-commit hook to check the class reference syntax
This also makes documentation helper scripts executable.
2019-12-06 23:40:19 +01:00
fhuya 7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Rémi Verschelde bd9f6c23cb Style: Don't apply clang-format to platform/android/java/src/com 2019-08-27 14:33:41 +02:00
Rémi Verschelde 3c62aa778d Style: Fix clang-format pre-commit hook for java and glsl 2018-10-02 16:10:50 +02:00
Rémi Verschelde 4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
robfram 52abf4ba84 Change shebang of pre-commit-clang-format hook to make it portable
The default one is "#!/bin/bash", but BSD systems doesn't have bash
in that path. For portability reasons, it should be changed to
"#!/usr/bin/env bash".

More info: https://en.wikipedia.org/wiki/Shebang_%28Unix%29#Portability
2018-03-06 19:53:37 +01:00
Rémi Verschelde 7cb6e6b723 Style: Apply clang-format to Java files
Only those from org/godotengine/godot though, not the thirdparty ones.
2017-12-10 01:16:07 +01:00
Poommetee Ketson 459f526119 Fix typos 'a' and 'an' 2017-09-02 21:19:06 +07:00
Rémi Verschelde fa2d5b91dc squish: Update to upstream version 1.15
Also fix clang-format pre-commit hook to ignore thirdparty files.
2017-04-09 15:03:39 +02:00
Rémi Verschelde 3fd10ff6f0 Style: Apply clang-format (3.9.1) to Obj-C++ files 2017-04-09 14:44:52 +02:00
Rémi Verschelde 0e4ee5935a clang-format: Add pre-commit hook
Derived from https://github.com/githubbrowser/Pre-commit-hooks
and https://gitlab.cern.ch/GeantV/geant/blob/master/hooks/pre-commit-clang-format
2017-02-12 00:51:31 +01:00