Update clang-format config.
This commit is contained in:
parent
fac9c60eb6
commit
37ddff8c00
|
@ -25,7 +25,7 @@ AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterReturnType: None
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
AlwaysBreakTemplateDeclarations: MultiLine
|
AlwaysBreakTemplateDeclarations: MultiLine
|
||||||
BinPackArguments: false # TODO: Not sure what I prefer.
|
BinPackArguments: true # TODO: Not sure what I prefer.
|
||||||
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
BraceWrapping: # If BreakBeforeBraces is set to Custom.
|
BraceWrapping: # If BreakBeforeBraces is set to Custom.
|
||||||
AfterCaseLabel: true
|
AfterCaseLabel: true
|
||||||
|
|
|
@ -26,12 +26,14 @@ namespace FediBlock::json
|
||||||
string to_json(const entry_type &entry)
|
string to_json(const entry_type &entry)
|
||||||
{
|
{
|
||||||
const string filename{fs::path(entry.screenshot_filepath).filename()};
|
const string filename{fs::path(entry.screenshot_filepath).filename()};
|
||||||
|
// clang-format off
|
||||||
const nlohmann::json json{{"instance", entry.instance},
|
const nlohmann::json json{{"instance", entry.instance},
|
||||||
{"tags", entry.tags},
|
{"tags", entry.tags},
|
||||||
{"receipts", entry.receipts},
|
{"receipts", entry.receipts},
|
||||||
{"description", entry.description},
|
{"description", entry.description},
|
||||||
{"screenshot", filename},
|
{"screenshot", filename},
|
||||||
{"report_time", entry.report_time}};
|
{"report_time", entry.report_time}};
|
||||||
|
// clang-format on
|
||||||
return json.dump(4);
|
return json.dump(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue