mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Enable clang-tidy modernize checks (#6975)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com> Co-authored-by: Bart <bthomee@users.noreply.github.com>
This commit is contained in:
@@ -265,9 +265,7 @@ public:
|
||||
return absolute(file()).string();
|
||||
}
|
||||
|
||||
~ValidatorsTxtGuard()
|
||||
{
|
||||
}
|
||||
~ValidatorsTxtGuard() = default;
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
@@ -1278,20 +1276,41 @@ r.ripple.com:51235
|
||||
};
|
||||
|
||||
std::array<TestCommentData, 13> const tests = {
|
||||
{{"password = aaaa\\#bbbb", "password", "aaaa#bbbb", false},
|
||||
{"password = aaaa#bbbb", "password", "aaaa", true},
|
||||
{"password = aaaa #bbbb", "password", "aaaa", true},
|
||||
{{.line = "password = aaaa\\#bbbb",
|
||||
.field = "password",
|
||||
.expect = "aaaa#bbbb",
|
||||
.had_comment = false},
|
||||
{.line = "password = aaaa#bbbb",
|
||||
.field = "password",
|
||||
.expect = "aaaa",
|
||||
.had_comment = true},
|
||||
{.line = "password = aaaa #bbbb",
|
||||
.field = "password",
|
||||
.expect = "aaaa",
|
||||
.had_comment = true},
|
||||
// since the value is all comment, this doesn't parse as k=v :
|
||||
{"password = #aaaa #bbbb", "", "password =", true},
|
||||
{"password = aaaa\\# #bbbb", "password", "aaaa#", true},
|
||||
{"password = aaaa\\##bbbb", "password", "aaaa#", true},
|
||||
{"aaaa#bbbb", "", "aaaa", true},
|
||||
{"aaaa\\#bbbb", "", "aaaa#bbbb", false},
|
||||
{"aaaa\\##bbbb", "", "aaaa#", true},
|
||||
{"aaaa #bbbb", "", "aaaa", true},
|
||||
{"1 #comment", "", "1", true},
|
||||
{"#whole thing is comment", "", "", false},
|
||||
{" #whole comment with space", "", "", false}}};
|
||||
{.line = "password = #aaaa #bbbb",
|
||||
.field = "",
|
||||
.expect = "password =",
|
||||
.had_comment = true},
|
||||
{.line = "password = aaaa\\# #bbbb",
|
||||
.field = "password",
|
||||
.expect = "aaaa#",
|
||||
.had_comment = true},
|
||||
{.line = "password = aaaa\\##bbbb",
|
||||
.field = "password",
|
||||
.expect = "aaaa#",
|
||||
.had_comment = true},
|
||||
{.line = "aaaa#bbbb", .field = "", .expect = "aaaa", .had_comment = true},
|
||||
{.line = "aaaa\\#bbbb", .field = "", .expect = "aaaa#bbbb", .had_comment = false},
|
||||
{.line = "aaaa\\##bbbb", .field = "", .expect = "aaaa#", .had_comment = true},
|
||||
{.line = "aaaa #bbbb", .field = "", .expect = "aaaa", .had_comment = true},
|
||||
{.line = "1 #comment", .field = "", .expect = "1", .had_comment = true},
|
||||
{.line = "#whole thing is comment", .field = "", .expect = "", .had_comment = false},
|
||||
{.line = " #whole comment with space",
|
||||
.field = "",
|
||||
.expect = "",
|
||||
.had_comment = false}}};
|
||||
|
||||
for (auto const& t : tests)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user