This splits out the .clang-format settings from the .clang-tidy file.
Right now, the .clang-tidy file has a bit of a mix: it contains both
clang-tidy checks and clang-format style options.
This actually works fine in some tools (like CLion which doesn't
completely fail), but newer versions of clangd-based tools (VSCode,
Neovim, etc.) are stricter and will outright reject the config because
they expect .clang-tidy to only contain tidy-related stuff.
So here's what I did:
- Moved all the formatting-related options into a brand new
.clang-format file
- Kept .clang-tidy focused only on checks, warnings-as-errors, and any
check-specific options
No changes to the actual style rules or tidy checks. Everything should
behave exactly the same as before.
This should now play nicely with clangd, VSCode/VSCodium, Neovim, and
other modern clang-based tools, while still working perfectly in CLion.
I did this because some/*my* PRs had some formatting errors that could
be prevented in the future, thus lessing the work while
reviewing/merging.
Test the old .clang-tidy with
```
clang-tidy --dump-config
./.clang-tidy:13:1: error: unknown key 'SpaceBeforeCaseColon'
... more errors
```
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* threaded test_suite_runner.c3
- Added a simple threadpool
- Fixed the status line updates
- Implemented the #skip for tests
- Added ansi color to the final status line
It works as one expects reducing the total runner time by the allocated
number of threads.
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* fix thread_number and a test
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* added choice of "--thread [N]" or defaults to os::num_cpu()
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* added unique explicit --build-dir to the compiler
and also print the c3c command line for debugging
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* disable "run compiler tests" for msvc-debug build
it takes like 1:30hs
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* buffer printouts and correct ordering of tests
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* added progress bar
- removed some \r carrier return stuff
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* Fix bug in fixed pool. Improve progress bar
* Add color to bar.
* Some renaming.
* fix some leaky leaks
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* each test output is printed immediately
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* Formatting, remove comment. Re-enable MSVC debug test.
---------
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
* Linux: implement signal stacktrace using SA_SIGINFO + sigaltstack
Adds proper signal handlers for SIGSEGV/SIGBUS/SIGILL on Linux,
enables backtraces from signal context, and exits with correct POSIX
signal codes (128+signal). Fixes missing "signal stacktrace" support
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* defer libc::dlclose(handle);
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* fix double backtrace on panic
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* add guards for Linux X86_64
- remove comments
- uncomment MContext_t for Linux AARCH64
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
* fix guards, missed in two places
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
---------
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com>
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
* Add NetBSD Support
Includes:
- Hints to find non-compatibility libc functions
- Struct and constant definitions for sockets, polling, etc.
- Changes to the linker code to work around some quirks in the NetBSD dynamic linker
- A target triple for netbsd aarch64 so llvm builds/links the compiler properly on this platform
* Updated releasenotes and some compacting
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
* ChaCha20 implementation, first pass
* fix bug with clone_slice when length is 0
* final ChaCha20 crypto tidying
* final adjustments; add benchmark
* add guards everywhere else or w/e
* stdlib 'i++' conformity
* release notes & security warning updates
* update tests; cleanup; default counter should be 0 not 1
* remove prints in test file
* add extra unit tests for unaligned buffers
Co-authored-by: Manu Linares <mbarriolinares@gmail.com>
* one final alignment test
* nice contraction of tests w/ some paranoia sprinkled in
* nearly double the efficiency of chacha20's transform
Co-authored-by: Manu Linares <mbarriolinares@gmail.com>
* fix memory leak in test case
* improve one of the unit tests to cover more cases
* greatly simplify chacha20 'transform'
Co-authored-by: Manu Linares <mbarriolinares@gmail.com>
---------
Co-authored-by: Manu Linares <mbarriolinares@gmail.com>
* fix memory leak in string_escape.c3
* add unescape_lenient and tunescape_lenient
* Optimize for the use of the temp allocator.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
* added `--linux-libc=host` and set default to `default_linux` from `src/build/builder.c`
* updated `resources/project_schema.json` for `linux-libc` host build option
* Update how libc is set.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This feature adds an option from project.json and build options to disable libc unreachable statements in order to be able to implement one for yourself. Useful feature for bare metal developing.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com>