Respecting the format of the tooltips of the other panels, include
a short name in bold on the first line of the tooltip to facilitate
a quick understanding of the action, and below, in normal font, a
description with relevant details.
The description of the patrol action is rewritten to make it more
understandable.
Fixes#7016
- Silence a MSVC warning in vulkan.cpp, refs #6987
- Document the patching of gl.h for macOS, from r26094
- Fix shellcheck warnings in the generation script
Currently all files adhere to the same formatting, let's codify it so it
stays like this in the future.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The new script merges existing scripts for downloading translations and
SPIR-V shaders, and also exports game binaries from the latest nightly
build into the git repo.
This allows contributors, especially artists, to obtain a working build
of the game without learning how to build the game for Windows, refs #1814.
The fontbuilder2 README file was already partially formatted with
Markdown, but didn't indicate that via its file extension. This commit
changes that and improves the formatting of the README itself.
This removes the remaining bashisms and changes the shebang.
Also remove command chaining in subshells as this allows for comments
to go where they belong and shellcheck directives to be more specific.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This entirely reverts ee3318309b and removes the [CLEANBUILD] feature,
which needed to be used without omission to be efficient.
Instead, in case of build failure, the CI automatically starts a
non-incremental second build by running `make clean` (or the MSBuild
equivalent) before retrying the build.
This enables some ruff rules for docstrings and comments. The idea is to
not enforce the presence of docstrings, but to ensure they are properly
formatted if they're present.
For comments this adds checks that they don't contain code and verify
the formatting of comments with "TODO" tags.
As part of this, some commented out code which hasn't been touch in the
past 10 years gets removed as well.
The rules enabled enabled by this are:
- check formatting of existing docstrings (D200-)
- check comments for code (ERA)
- check formatting of TODO tags (TD001, TD004-)
Change all non posix constructs except for stacked pushd/popd for the
sake of reviewability.
The reminder will be done in a separate commit.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This explicitly uses UTF-8 encoding when reading or writing files with
Python. This is necessary as the default locale varies between
operating systems.
This enables ruff rules which check for code which can be simplified to
improve readability.
The additionally rules getting enabled by this are:
- remove unnecessary nesting of if-statements (SIM102)
- use contextlib.suppress() for no-op exception handling (SIM105)
- use enumerate() for counting in loops (SIM113)
- use context managers for opening files (SIM115)
This should speed up installation of pre-commit as part of the Gitea
Action a bit, as it caches the Python packages required for it.
The cache functionality of actions/setup-python is unsuitable for this
use case, as we don't have a file with requirements we want to use as
key. Instead, we just want to cache whatever is downloaded via pip from
PyPI and keep it for further invocations. This commit achieves that by
using the same cache key for every workflow run. The cache is being
updated even if pre-commit fails so we always keep the the Python
packages used for installing pre-commit cached.
The Windows autobuilder contains two built versions of wxWidgets. One
corresponds to the oldest supported version of the library, and is used
for CI. However, the nightly build should use a recent version of the
library, compiled with the same toolset as the main game.
This commit adapts the nightly-build pipeline to use the rebuilt recent
copy of wxWidgets.
This enables some ruff rules to check for ambiguous and dead Python
code, which might cause unintended side-effects.
The enabled rules are:
- a bunch of rules related to shadowing of builtin structures (A)
- a bunch of rules checking for unused arguments (ARG)
- a rule checking for useless expressions (B018)
- a rule checking for unbound loop variables (B023)
- a rule checking redefined function parameters (PLR1704)
In all the builds using precompiled headers, an update to libraries will
crash the CI, as those headers will become outdated. It is then
necessary to force a full rebuild of the game by cleaning up the
workspaces.
This commit allows this CI behavior to be triggered by specifying
[CLEANBUILD] in the first line of the commit message.
This will constitute an opportunity to inform users that they need to
clean their workspaces when pulling the update.
This sets some reasonable defaults for all files.
Adds settings for *.sh files, doubles as configuration for shfmt.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.
As for choosing tabs over spaces, some arguments are:
- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This removes the executable bits from files which aren't supposed to
have them.
Also removes shebangs for files which aren't supposed to be executable.