add end-of-file-fixer

This commit is contained in:
2025-09-12 11:21:00 -04:00
parent 0561d951d4
commit 9d48caca76
14 changed files with 16 additions and 14 deletions

View File

@@ -3,11 +3,13 @@ repos:
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: ".*third_party/.*"
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 182152eb8c5ce1cf5299b956b04392c86bd8a126 # frozen: v20.1.8
rev: 86fdcc9bd34d6afbbd29358b97436c8ffe3aa3b2 # frozen: v21.1.0
hooks:
- id: clang-format
exclude: ".*third_party/.*"

View File

@@ -140,4 +140,4 @@ std::string generate_large_json(int num_operations) {
return json;
}
} // namespace weaseldb::test_data
} // namespace weaseldb::test_data

View File

@@ -55,4 +55,4 @@ extern const std::string COMPLEX_JSON;
*/
std::string generate_large_json(int num_operations);
} // namespace weaseldb::test_data
} // namespace weaseldb::test_data

View File

@@ -1,2 +1,2 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
#include <doctest/doctest.h>

View File

@@ -1,2 +1,2 @@
#define ANKERL_NANOBENCH_IMPLEMENT
#include <nanobench.h>
#include <nanobench.h>

View File

@@ -247,4 +247,4 @@ ParseResult ApiUrlParser::parse(std::string_view method, char *url_data,
result.route = HttpRoute::NotFound;
return ParseResult::Success;
}
}

View File

@@ -58,4 +58,4 @@ asm(".text\n"
".size spend_cpu_cycles, spend_cpu_cycles\n");
#endif
#endif
#endif

View File

@@ -43,4 +43,4 @@ public:
* @return Pointer to JsonToken if found, nullptr if not a known token
*/
static const struct JsonToken *lookup_json_token(const char *str, size_t len);
};
};

View File

@@ -58,4 +58,4 @@ struct ShutdownEntry {
* Each stage pattern-matches on the variant type to handle appropriately.
*/
using PipelineEntry =
std::variant<CommitEntry, StatusEntry, HealthCheckEntry, ShutdownEntry>;
std::variant<CommitEntry, StatusEntry, HealthCheckEntry, ShutdownEntry>;

View File

@@ -44,4 +44,4 @@ private:
unsigned long long last_voluntary_context_switches_ = 0;
unsigned long long last_nonvoluntary_context_switches_ = 0;
bool start_time_set_ = false;
};
};

View File

@@ -40,4 +40,4 @@ private:
std::string decode_base64(const std::string &base64_str);
Precondition::Type parse_precondition_type(const std::string &type_str);
Operation::Type parse_operation_type(const std::string &type_str);
};
};

View File

@@ -144,4 +144,4 @@ bool ParserComparison::operations_equal(const Operation &op1,
const Operation &op2) {
return op1.type == op2.type && op1.param1 == op2.param1 &&
op1.param2 == op2.param2;
}
}

View File

@@ -71,4 +71,4 @@ private:
* @return true if equal, false otherwise
*/
static bool operations_equal(const Operation &op1, const Operation &op2);
};
};

View File

@@ -551,4 +551,4 @@ TEST_CASE("ApiUrlParser specific bug reproduction") {
.empty());
}
}
}
}