Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BasedOnStyle: LLVM
DerivePointerAlignment: false
PointerAlignment: Left

SpacesBeforeTrailingComments: 1
19 changes: 19 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: clang-format check
on: [push, pull_request]
jobs:
formatting-check:
name: formatting check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'examples'
- 'include'
steps:
- uses: actions/checkout@v4
- name: runs clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: ${{ matrix.path }}
12 changes: 6 additions & 6 deletions src/test_lib_json/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3632,12 +3632,12 @@ JSONTEST_FIXTURE_LOCAL(CharReaderAllowSpecialFloatsTest, issue209) {
for (const auto& td : test_data) {
bool ok = reader->parse(&*td.in.begin(), &*td.in.begin() + td.in.size(),
&root, &errs);
JSONTEST_ASSERT(td.ok == ok) << "line:" << td.line << "\n"
<< " expected: {"
<< "ok:" << td.ok << ", in:\'" << td.in << "\'"
<< "}\n"
<< " actual: {"
<< "ok:" << ok << "}\n";
// clang-format off
JSONTEST_ASSERT(td.ok == ok) <<
"line:" << td.line << "\n " <<
"expected: {ok:" << td.ok << ", in:\'" << td.in << "\'}\n " <<
"actual: {ok:" << ok << "}\n";
// clang-format on
}

{
Expand Down