Update clang-format config.

This commit is contained in:
tastytea 2020-07-05 11:38:37 +02:00
parent fac9c60eb6
commit 37ddff8c00
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false # TODO: Not sure what I prefer.
BinPackArguments: true # TODO: Not sure what I prefer.
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BraceWrapping: # If BreakBeforeBraces is set to Custom.
AfterCaseLabel: true

View File

@ -26,12 +26,14 @@ namespace FediBlock::json
string to_json(const entry_type &entry)
{
const string filename{fs::path(entry.screenshot_filepath).filename()};
// clang-format off
const nlohmann::json json{{"instance", entry.instance},
{"tags", entry.tags},
{"receipts", entry.receipts},
{"description", entry.description},
{"screenshot", filename},
{"report_time", entry.report_time}};
// clang-format on
return json.dump(4);
}