Commit Graph

24082 Commits

Author SHA1 Message Date
f8ac0e4f68 Run checkrefs.py as Gitea Actions workflow 2024-08-27 13:33:21 +02:00
183a0b13f3 Add .already-built for premake to .gitignore
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-27 12:55:17 +02:00
13da3457bc
Delete wrongly committed file from abdda50892 2024-08-27 12:46:33 +02:00
ae3fad73ce
Add a markdownlint pre-commit hook
This adds a pre-commit hook to link Markdown files and fixes all
reported findings.
2024-08-27 10:06:31 +02:00
af6cda9073 Add shfmt to .pre-commit-config
Run shfmt as part of the ci workflow.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
a04a5f70c7 Add global .editorconfig
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>
2024-08-26 09:03:00 +02:00
abdda50892 Format shell scripts using shfmt
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>
2024-08-26 09:03:00 +02:00
c763c010b8
Add a bunch of additional pre-commit hooks 2024-08-26 07:46:41 +02:00
1800b5f1c0
Add executable bits for files with shebangs 2024-08-26 07:46:38 +02:00
f58dc9b485
Remove unnecessary executable bits
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.
2024-08-26 07:46:34 +02:00
05e708f987
Refactor check_* functions for better readability 2024-08-25 21:24:00 +02:00
75949e1f5a
Replace use of os.path with pathlib 2024-08-25 21:24:00 +02:00
4b77d7bb74
Compile regex pattern once
This should slightly increase the performance as the pattern has to be
only compiled once, instead of so during every loop iteration.
2024-08-25 21:24:00 +02:00
87029f2a91
Replace uses of re.split() with str.split() 2024-08-25 21:23:59 +02:00
24e67746f9
Log a warning when a specified mod can't be found 2024-08-25 21:23:59 +02:00
92d92fac1b
Remove unnecessary default value for dict.get() 2024-08-25 21:23:59 +02:00
0dea22285e
Fix the exit codes of checkrefs.py 2024-08-25 21:23:59 +02:00
39f2889cf7
Support calling checkrefs.py from other dirs 2024-08-25 21:23:59 +02:00
f22d0d899e Add final to classes introduced in f9114a87f2
A class which can not be derived from should tell that in the
declaration.
2024-08-25 13:38:09 +02:00
62c0080e1b Don't use std::shared_ptr in CStrIntern
Now there is less allocation and reference counting.
2024-08-25 11:58:22 +02:00
45984c905b Fix get-nightly scripts on Unix
A wrong syntax was used in for loops.
2024-08-25 10:12:21 +02:00
e36c6a31fe
Enable additional ruff rules
In the ruff config file added in #6954 explicitly selecting the ruff
rules to check was missed, resulting in ruff only checking a very small
subset of its available rules. That hasn't been desired, so this is the
first of a series of commits enabling more rules. In this PR all rules
whose violations can be either automatically fixed by ruff or are
trivial to fix manually get enabled. For the follow up PRs it's intended
to focus on one area of rules per PR to gradually improve the Python
code quality.
2024-08-25 06:29:39 +02:00
0ba8ea3429
Update CODEOWNERS
This updates CODEOWNERS to remove owners for the lobby bot code, which
isn't included in this repository anymore. It also adds me for some
areas where I can help with PR reviews.
2024-08-24 13:48:43 +02:00
1f51fcb87f
Add hook for non-breaking space in 0 A.D.
This replaces the existing arclint linter to ensure the project name
does only include a non-breaking space with a pre-commit hook. The regex
to check is slightly different to account for escaped non-breaking
spaces in JavaScript files and to avoid some false-positives.
2024-08-24 13:08:42 +02:00
a44dd59a0c Add some missing headers
When running clang-format which reorders headers, those are the ones
that came up as missing.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-24 12:19:52 +02:00
d055090dd2
Add ruff pre-commit hook
Add configuration for pre-commit, ruff as a hook and configuration to
run ruff whenever a pull request is opened or code is pushed.
2024-08-24 10:54:26 +02:00
c49d4eedd0
Lint and format Python files using ruff
To improve quality und uniformity of the included Python code this
lints and formats the included Python files with ruff.
2024-08-24 10:54:26 +02:00
8519eb9b86
Reduce time needed for STUN
In my tests this reduced the time necessary for starting to host a game
or joining a hosted game by ~180ms.
2024-08-23 21:00:15 +02:00
0efaf5ac4b Add common IDE temporary files to gitignore 2024-08-23 19:29:28 +02:00
eeb0f1cce6
Make checkrefs and called scripts return an error 2024-08-23 17:54:56 +02:00
2a06eea08a
Fix checkrefs.py for python 3.12
Fixes #6898
Reported by: @Itms
2024-08-23 15:59:36 +02:00
393ad6c8a6
Improve windows pipeline 2024-08-23 13:08:04 +02:00
a2e0749c01
Fix regression introduced in 5c1195f66a 2024-08-21 19:17:50 +02:00
7786ef8def
Add Free BSD pipeline. 2024-08-21 19:17:35 +02:00
0b7da91992 Adapt libraries scripts to the new SVN repo. 2024-08-20 20:58:09 +02:00
c7702cefb0 Issue templates (for tickets and release process). 2024-08-20 19:35:56 +02:00
a4ca047535 Add code owners, adapted from Phabricator. 2024-08-20 19:35:42 +02:00
270a48b37d Adapt Jenkins Pipelines to the new build system. 2024-08-20 19:34:28 +02:00
0dd48ec57e Convert README to Markdown and update contents. 2024-08-20 19:19:50 +02:00
e9d1cb6cc7 Generate nightly SVN builds for end users, fixes #1819. 2024-08-20 19:15:56 +02:00
b698558102 Get rid of svnversion. 2024-08-20 19:10:54 +02:00
459ffa18cf Get rid of the Phabricator workflow. 2024-08-20 19:10:39 +02:00
0aeaa8f70a Adapt macOS libraries to the new build flow. 2024-08-20 19:10:25 +02:00
5c1195f66a New Linux/BSD build flow.
Getting and building libraries is now clearly separated from preparing
workspaces.
Some disk space is automatically reclaimed and cleanup is streamlined.
2024-08-20 19:09:23 +02:00
17ae3b224d Retrieve Windows binaries for the build, fixes #1814. 2024-08-20 18:54:00 +02:00
195c858f33 Add .gitignore file, fixes #1816.
Includes contribution by Stan.
2024-08-20 18:52:41 +02:00
fcbef32f67 [Maps] Revert c839bf2ae5 's accidental deletion and rebalance deer.
This was SVN commit r28199.
2024-08-14 00:04:48 +00:00
49af9a9dc1 Fix clean-workspaces.sh no longer causing the rebuild of FCollada.
Noticed by: @Dunedan
This was SVN commit r28198.
2024-08-13 13:56:19 +00:00
ef623af2f8 Check for source of XMPP stanzas
Up to now Pyrogenesis didn't check if lobby related XMPP stanzas were
sent by the lobby bots. This meant that every user could send forged
data, like the list of games, to be displayed by another user. This
change fixes that by checking such stanzas come from the expected lobby
bots.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5216
This was SVN commit r28197.
2024-08-13 04:59:38 +00:00
d6bfa7dedc Fix deferred sending of game updates via XMPP
72f0fdb41b broke the deferred sending of XMPP stanzas for changes to the
game settings during game setup. This change fixes it and decreases the
interval to send game setting updates from 2000ms to 500ms to have
updates faster visible in the multiplayer lobby.

One reason why this bug might have been gone unnoticed so far is that
the traffic shaping employed by ejabberd results in a similar behavior
when just looking at the multiplayer lobby through Pyrogenesis:
After exhausting a certain amount of traffic, clients are only allowed
to send a defined amount of bytes per second. This results in game
setting changes taking a moment before they show up in the multiplayer
lobby. Contrary to the desired behavior, this however leads to all
updates being received and processed by XpartaMuPP resulting in
unnecessary load on the server. With this fix Pyrogenesis doesn't
trigger the traffic shaping on ejabberd side anymore, as there is now
much less traffic being sent by Pyrogenesis.


Patch by: @Dunedan
Accepted by: @Stan
Fixes: #6740

Differential Revision: https://code.wildfiregames.com/D5217
This was SVN commit r28196.
2024-08-12 17:48:56 +00:00