diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 817582e..8f10ac0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,14 +17,14 @@ repos: args: ['--py312-plus'] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v22.1.8 + rev: v23.1.0 hooks: - id: clang-format args: [--style=file] exclude_types: [javascript,json] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.2 + rev: v0.16.5 hooks: - id: ruff-check args: [--fix] diff --git a/src/utils/common.cpp b/src/utils/common.cpp index a9aeb77..3c155e0 100644 --- a/src/utils/common.cpp +++ b/src/utils/common.cpp @@ -51,7 +51,7 @@ const std::map& get_status_msg_map() {GIT_STATUS_WT_UNREADABLE, {"", ""}}, {GIT_STATUS_IGNORED, {"!! ", ""}}, {GIT_STATUS_CONFLICTED, {"AA ", "\tboth added: "}}, - }; + }; return status_msg_map; } diff --git a/src/utils/common.hpp b/src/utils/common.hpp index 86fc1b4..e7b832c 100644 --- a/src/utils/common.hpp +++ b/src/utils/common.hpp @@ -38,7 +38,7 @@ struct status_messages status_messages get_status_msg(git_status_t); -using stream_colour_fn = std::ostream& (*) (std::ostream&); +using stream_colour_fn = std::ostream& (*)(std::ostream&); std::string read_file(const std::string& path); diff --git a/src/wasm/stream.cpp b/src/wasm/stream.cpp index 8716209..2c3f68a 100644 --- a/src/wasm/stream.cpp +++ b/src/wasm/stream.cpp @@ -106,8 +106,8 @@ EM_JS( } catch (err) { - // Store error for later retrieval - // clang-format off + // Store error for later retrieval + // clang-format off Module["git2cpp_js_error"] = { name: err.name ?? "", message : err.message ?? "" }; // clang-format on (err.name == "TimeoutError" ? console.warn : console.error)(err); @@ -193,8 +193,8 @@ EM_JS( if (first_read) { - // Caller must delete the returned status_text and response_headers. - // clang-format off + // Caller must delete the returned status_text and response_headers. + // clang-format off setValue(status, xhr.status, 'i32*'); setValue(status_text, stringToNewUTF8(xhr.statusText ?? ""), 'i8**'); setValue(total_bytes, byte_length, 'i64*'); @@ -212,8 +212,8 @@ EM_JS( } catch (err) { - // Store error for later retrieval - // clang-format off + // Store error for later retrieval + // clang-format off Module["git2cpp_js_error"] = { name: err.name ?? "", message : err.message ?? "" }; // clang-format on (err.name == "TimeoutError" ? console.warn : console.error)(err);