Commit graph

13 commits

Author SHA1 Message Date
dobrykafe e46f16ed91 check for newline at the end of source files 2024-03-23 16:01:00 +01:00
Corantin H 2e1d44dc23 Use realpath when comparing paths 2024-01-07 17:47:42 +01:00
heinrich5991 dcd76fd3e1 Add support for Rust code in DDNet
The glue is done using the [cxx crate](https://cxx.rs/) on the Rust
side.

As a proof-of-concept, only a small console command (`rust_version`)
printing the currently used Rust version was added.

You can generate and open the Rust documentation using
`DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target
run_rust_tests`, they're automatically included in the `run_tests`
target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust
cannot currently link with the debug version of the C stdlib on Windows:
https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```
2022-10-19 23:46:06 +02:00
def 7379a64004 [WIP] Require Python 3.6 (f-strings) and fix pylints
So far only done scripts directory, will do the rest if this is
considered good
2022-07-27 09:37:24 +02:00
def f867d9c2ac Only use correct clang-format version 2021-04-17 20:24:57 +02:00
def 13a8dfa307 Add pylint
and fix occurences
2020-12-09 10:40:28 +01:00
heinrich5991 8427e99672 Don't run the style fixer for generated files
Fixes #2962.
2020-10-02 19:30:05 +02:00
def 2e8e19290e fix_style.py: Ignore generated key headers 2020-09-26 21:50:13 +02:00
heinrich5991 678b2b15c3 Change fix_style.py script to unconditionally format everything 2020-09-26 21:41:24 +02:00
def 2d8a1ee2b7 Make fix_style.py look at files, not lines 2020-09-26 21:41:20 +02:00
heinrich5991 b235637713 Find the common ancestor for the style checking
This allows the style checker to only look at the changes done in the
current branch, and not the other commits that were done in the base
branch.
2020-09-11 00:57:03 +02:00
def ecdf648930 Make fix_style executable 2020-09-10 22:58:30 +02:00
heinrich5991 df46ff8557 Add a tools to fix the style of new pull requests 2020-09-10 04:11:58 +02:00