`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>
Using 2.2.7.dev115+g0eb441d6.
Had to add `cancelled` to the ignore list, as it's a Wayland signal which
we're handling in our code, so we don't want codespell to fix that "typo".
Also includes the typo fix from #87927.
Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
This makes it much faster to get started with Direct3D 12 builds,
as you only need to run `python .\misc\scripts\install_d3d12_sdk_windows.py`
then run `scons d3d12=yes`.
This installs DirectX Shader Compiler, Mesa NIR, WinPixEventRuntime
and DirectX 12 Agility SDK.
- Define a default path that uses the locations from the script.
- Now the default path is in "%LOCALAPPDATA%\Godot\build_deps\"
- Updated CI to use this new python script.
Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
- Add compatibility methods for `RenderingDevice::shader_create_from_bytecode`
and `CodeEdit::get_text_for_symbol_loopup`.
- Silence errors which now have compatibility methods.
- Acknowledge GraphEdit/GraphNode compat breakage, intended and WIP.
- file_format, header_guards and clang-format benefit from this short list.
- dotnet-format, Python and JS checks don't, but they're only relevant for
PRs changing a specific set of files, so we skip them when those files
aren't modified.
The logic to get changed files only works reliably for:
- Pull request events
- Non-force pushed push events
So when force pushing a branch in your fork, or creating a new branch,
it will still scan all files as fallback.
Upgraded CI runner to Ubuntu 22.04 so we get clang-format 14 out of the box,
so we don't need to install a custom version (saves ~15 s). We also cache
the APT dependencies to speed up the build and avoid flaky Ubuntu/Microsoft
repos.
GitHub Actions seems to be hiding colored whitespace, and after lots of
attempts I couldn't find a way to work it around.
So instead I'm using a perl expression to replace trailing spaces with
`·` and tabs with `<TAB>` in the ANSI colored diff output. This ensure
that they're visible, and they are properly colored as expected too.
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
Follow-up to https://github.com/godotengine/godot-cpp/pull/960.
Fix exit code for --dump-extension-api and --dump-gdextension-interface.
Removed the planned API validation step as we still didn't implement
anything, and maintaining a stub isn't useful.
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
It was failing due to generated files being referenced in
.NET projects but the files are missing because they are
generated by `godot --generate-mono-glue` or
`build_assemblies.py`.
We want to replace libnethost as it gives us issues with some compilers.
Our implementation tries to mimic libnethost's hostfxr_resolver search
logic. We try to use the same function names for easier comparing in
case we need to update this in the future.
Use isutf8 instead of recode to detect invalid UTF-8 sequences.
Also add the necessary dependencies to run the static checks locally
using act (https://github.com/nektos/act) with the Medium size image.
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.
For performance this is done directly in `String::parse_utf8`.
Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.
Supersedes #63717.
This script can be used to make Godot easier to compile on a fresh
macOS installation, including on CI platforms and containers where
the Vulkan SDK isn't preinstalled.