summaryrefslogtreecommitdiffstats
path: root/misc/hooks/pre-commit-clang-format
Commit message (Collapse)AuthorAgeFilesLines
* Replace hand-written pre-commit hooks with `pre-commit` Python toolAarni Koskela2024-02-261-262/+0
| | | | | | | | | | | `pre-commit` can be installed with pip, and configured in the Godot repo with `pre-commit install`. It can then easily be run both locally with `pre-commit run`, and on CI, in a cross-platform way. This makes it much easier for contributors to set up pre-commit hooks, without having to manually copy files to their git folder. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Add tests/python_build to clang-format pre-commit hook ignore listAarni Koskela2024-01-091-0/+3
| | | | It had been ignored by misc/scripts/clang_format.sh since 388d35b74d8919b251faae9e24af50476f12b1a2 but not the hook.
* Style: Mark clang-format 16 as supported for pre-commit hookRémi Verschelde2023-12-061-1/+1
| | | | | | | | | It only introduced a difference in a .glsl file, which I've worked around by removing an empty line. This keeps formatting consistent between clang-format 15 and 16. Also added a change in the 3-to-4 project converter to fix bogus formatting in clang-format < 17.
* [Git hooks] Add AppleScript dialog script for macOS.bruvzg2023-01-161-1/+18
|
* Style: Ensure consistent formatting with clang-format 15Rémi Verschelde2022-09-211-2/+2
| | | | | | | | | 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].
* Make Git hooks work on worktrees on WindowsPedro J. Estébanez2022-08-301-2/+2
|
* Relax version warning in clang-format precommit hookRémi Verschelde2022-05-051-1/+1
| | | | Closes #60778.
* Fix typos with codespellRémi Verschelde2022-02-101-8/+8
| | | | | | | 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.
* clang-format: Enable `--Wno-error=unknown` for compat with older versionsRémi Verschelde2021-10-251-2/+2
| | | | | | | | | | 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).
* clang-format: Sync config with LLVM 13Rémi Verschelde2021-10-221-3/+3
| | | | | | | 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.
* Allow clang-format 12 in the pre-commit hookHugo Locurcio2021-06-071-3/+4
| | | | clang-format 12's formatting is identical to clang-format 11's.
* Fix Ubuntu clang-format version detection in the pre-commit hookHugo Locurcio2021-05-101-2/+6
|
* clang-format: Fix version number in hook warningRémi Verschelde2021-03-141-1/+1
|
* Dynamically load libudev.so.1 on Linux if `udev=yes`Rémi Verschelde2021-02-171-0/+3
| | | | | | | | | | | | | | | | | | | 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 ```
* Check for clang-format version in the pre-commit hookHugo Locurcio2021-01-121-4/+18
| | | | | Different clang-format versions may result in different formatting. Therefore, it's recommended to use the same version as used in CI.
* Git Hooks: Suppress "which" error messages.bruvzg2020-04-241-5/+5
|
* Git Hooks: Add support for GUI git clients.bruvzg2020-04-211-5/+75
| | | | [ci skip]
* Hooks: Use pygmentize if available to visualize diffRémi Verschelde2020-03-301-2/+6
|
* Hooks: Add pre-commit hook for psf/black formattingRémi Verschelde2020-03-301-5/+1
|
* Split the Android platform java logic into an Android library module (`lib`) ↵fhuya2019-09-041-1/+1
| | | | | | 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').
* Style: Don't apply clang-format to platform/android/java/src/comRémi Verschelde2019-08-271-0/+3
|
* Style: Fix clang-format pre-commit hook for java and glslRémi Verschelde2018-10-021-1/+1
|
* Style: Enable clang-format on GLSL shadersRémi Verschelde2018-08-271-1/+1
| | | | | | | 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.
* Change shebang of pre-commit-clang-format hook to make it portablerobfram2018-03-061-1/+1
| | | | | | | | 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
* Style: Apply clang-format to Java filesRémi Verschelde2017-12-101-1/+1
| | | | Only those from org/godotengine/godot though, not the thirdparty ones.
* Fix typos 'a' and 'an'Poommetee Ketson2017-09-021-2/+2
|
* squish: Update to upstream version 1.15Rémi Verschelde2017-04-091-0/+5
| | | | Also fix clang-format pre-commit hook to ignore thirdparty files.
* Style: Apply clang-format (3.9.1) to Obj-C++ filesRémi Verschelde2017-04-091-1/+1
|
* clang-format: Add pre-commit hookRémi Verschelde2017-02-121-0/+142
Derived from https://github.com/githubbrowser/Pre-commit-hooks and https://gitlab.cern.ch/GeantV/geant/blob/master/hooks/pre-commit-clang-format