mirror of
https://github.com/Mudlet/Mudlet
synced 2026-08-13 18:26:27 -04:00
infrastructure: apply clang-format style to tests too (#9201)
#### Brief overview of PR changes/additions Move `.clang-format` from `src/` to the repo root so it applies to `test/` as well. #### Motivation for adding to Mudlet Test files were not being formatted with the project's clang-format style, leading to inconsistent style drift when editors auto-format them. #### Other info (issues closed, discussion etc) None. **Test case:** Run `clang-format --dry-run test/functional_tests/TelnetTextDisplayedTest.cpp` from the repo root and confirm it reports Mudlet-style violations (i.e. config is discovered).
This commit is contained in:
parent
f962598d83
commit
ea57a6dc1c
4 changed files with 3 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ file(GLOB_RECURSE OTHER_FILES_LIST CONFIGURE_DEPENDS
|
|||
CI/**
|
||||
docker/**
|
||||
docs/**
|
||||
src/.clang-format
|
||||
.clang-format
|
||||
src/.gitignore
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ signals:
|
|||
void profileChanged(const QString& name);
|
||||
```
|
||||
* in general: write modern C++20 code, but avoid C++ exceptions, templates, and concepts as those have performance/complexity considerations, avoiding which has made Mudlet the success it is today.
|
||||
* use clang-format for formatting your code with [src/.clang-format](https://github.com/Mudlet/Mudlet/blob/development/src/.clang-format) settings. To get started, check out Clang Format in the [Setting up IDE's](https://wiki.mudlet.org/w/Compiling_Mudlet) section.
|
||||
* use clang-format for formatting your code with [.clang-format](https://github.com/Mudlet/Mudlet/blob/development/.clang-format) settings. To get started, check out Clang Format in the [Setting up IDE's](https://wiki.mudlet.org/w/Compiling_Mudlet) section.
|
||||
* use clang-tidy linting with [.clang-tidy](https://github.com/Mudlet/Mudlet/blob/development/.clang-tidy) settings. To get started, check out Clang Tidy in the [Setting up IDE's](https://wiki.mudlet.org/w/Compiling_Mudlet) section
|
||||
* additionally, use [clazy]([url](https://github.com/KDE/clazy)) for linting as well
|
||||
* use braces {} around all statements (ie, `if`'s and so on), even if they are one line
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ On macOS, use the Homebrew-installed LLVM version to ensure compatibility:
|
|||
$(brew --prefix llvm)/bin/clang-format -i path/to/edited/file.cpp path/to/edited/file.h
|
||||
```
|
||||
|
||||
The project uses the `.clang-format` configuration in `src/`. This ensures consistent code style across the codebase.
|
||||
The project uses the `.clang-format` configuration in the repo root. This ensures consistent code style across the codebase.
|
||||
|
||||
### Static analysis
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue