diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1680c53..9514949 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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/.*" diff --git a/benchmarks/test_data.cpp b/benchmarks/test_data.cpp index 3ab03b0..d6f8446 100644 --- a/benchmarks/test_data.cpp +++ b/benchmarks/test_data.cpp @@ -140,4 +140,4 @@ std::string generate_large_json(int num_operations) { return json; } -} // namespace weaseldb::test_data \ No newline at end of file +} // namespace weaseldb::test_data diff --git a/benchmarks/test_data.hpp b/benchmarks/test_data.hpp index 63ba324..b008e09 100644 --- a/benchmarks/test_data.hpp +++ b/benchmarks/test_data.hpp @@ -55,4 +55,4 @@ extern const std::string COMPLEX_JSON; */ std::string generate_large_json(int num_operations); -} // namespace weaseldb::test_data \ No newline at end of file +} // namespace weaseldb::test_data diff --git a/doctest_impl.cpp b/doctest_impl.cpp index bb266f3..0a3f254 100644 --- a/doctest_impl.cpp +++ b/doctest_impl.cpp @@ -1,2 +1,2 @@ #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -#include \ No newline at end of file +#include diff --git a/nanobench_impl.cpp b/nanobench_impl.cpp index e46ae8c..941780a 100644 --- a/nanobench_impl.cpp +++ b/nanobench_impl.cpp @@ -1,2 +1,2 @@ #define ANKERL_NANOBENCH_IMPLEMENT -#include \ No newline at end of file +#include diff --git a/src/api_url_parser.cpp b/src/api_url_parser.cpp index 2baad9e..33f5028 100644 --- a/src/api_url_parser.cpp +++ b/src/api_url_parser.cpp @@ -247,4 +247,4 @@ ParseResult ApiUrlParser::parse(std::string_view method, char *url_data, result.route = HttpRoute::NotFound; return ParseResult::Success; -} \ No newline at end of file +} diff --git a/src/cpu_work.cpp b/src/cpu_work.cpp index 9e100aa..70a8cc2 100644 --- a/src/cpu_work.cpp +++ b/src/cpu_work.cpp @@ -58,4 +58,4 @@ asm(".text\n" ".size spend_cpu_cycles, spend_cpu_cycles\n"); #endif -#endif \ No newline at end of file +#endif diff --git a/src/json_tokens.hpp b/src/json_tokens.hpp index a1fdb33..2f07a63 100644 --- a/src/json_tokens.hpp +++ b/src/json_tokens.hpp @@ -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); -}; \ No newline at end of file +}; diff --git a/src/pipeline_entry.hpp b/src/pipeline_entry.hpp index f79b082..dc35654 100644 --- a/src/pipeline_entry.hpp +++ b/src/pipeline_entry.hpp @@ -58,4 +58,4 @@ struct ShutdownEntry { * Each stage pattern-matches on the variant type to handle appropriately. */ using PipelineEntry = - std::variant; \ No newline at end of file + std::variant; diff --git a/src/process_collector.hpp b/src/process_collector.hpp index 54c6586..ce1d1b7 100644 --- a/src/process_collector.hpp +++ b/src/process_collector.hpp @@ -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; -}; \ No newline at end of file +}; diff --git a/tests/nlohmann_reference_parser.hpp b/tests/nlohmann_reference_parser.hpp index f2fa908..5669581 100644 --- a/tests/nlohmann_reference_parser.hpp +++ b/tests/nlohmann_reference_parser.hpp @@ -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); -}; \ No newline at end of file +}; diff --git a/tests/parser_comparison.cpp b/tests/parser_comparison.cpp index 8e88eb8..e786d47 100644 --- a/tests/parser_comparison.cpp +++ b/tests/parser_comparison.cpp @@ -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; -} \ No newline at end of file +} diff --git a/tests/parser_comparison.hpp b/tests/parser_comparison.hpp index fe9c32a..06aad15 100644 --- a/tests/parser_comparison.hpp +++ b/tests/parser_comparison.hpp @@ -71,4 +71,4 @@ private: * @return true if equal, false otherwise */ static bool operations_equal(const Operation &op1, const Operation &op2); -}; \ No newline at end of file +}; diff --git a/tests/test_api_url_parser.cpp b/tests/test_api_url_parser.cpp index b72e185..dbe9f27 100644 --- a/tests/test_api_url_parser.cpp +++ b/tests/test_api_url_parser.cpp @@ -551,4 +551,4 @@ TEST_CASE("ApiUrlParser specific bug reproduction") { .empty()); } } -} \ No newline at end of file +}