diff options
| author | Amlal <amlal@nekernel.org> | 2025-08-11 23:31:39 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-08-11 23:31:39 +0200 |
| commit | d987d62459d59a6d95ffb815d5e6eccd8dbde1dd (patch) | |
| tree | d91d1351193a9f758daa9dad964e40f5a84ece7f /dev | |
| parent | 4c462511485168cfc831a1447267fd76145d5183 (diff) | |
meta: ran format command.v0.0.3-release
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/BuildKit/IManifestBuilder.h | 6 | ||||
| -rw-r--r-- | dev/BuildKit/Imports.h | 4 | ||||
| -rw-r--r-- | dev/BuildKit/JSONManifestBuilder.h | 4 | ||||
| -rw-r--r-- | dev/BuildKit/TOMLManifestBuilder.h | 4 | ||||
| -rw-r--r-- | dev/cli/Tool.cc | 4 | ||||
| -rw-r--r-- | dev/src/JSONManifestBuilder.cc | 15 |
6 files changed, 20 insertions, 17 deletions
diff --git a/dev/BuildKit/IManifestBuilder.h b/dev/BuildKit/IManifestBuilder.h index 1dd8bce..c1d45d0 100644 --- a/dev/BuildKit/IManifestBuilder.h +++ b/dev/BuildKit/IManifestBuilder.h @@ -14,7 +14,7 @@ namespace NeBuild { /// @note This class is meant to be used as an interface. class IManifestBuilder { public: - IManifestBuilder() = default; + IManifestBuilder() = default; virtual ~IManifestBuilder() = default; IManifestBuilder& operator=(const IManifestBuilder&) = default; @@ -25,7 +25,7 @@ class IManifestBuilder { /// @param arg_val filename path. /// @retval true succeeded. /// @retval false failed. - virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0; - virtual const char* BuildSystem() = 0; + virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0; + virtual const char* BuildSystem() = 0; }; } // namespace NeBuild
\ No newline at end of file diff --git a/dev/BuildKit/Imports.h b/dev/BuildKit/Imports.h index 9260c1e..c542737 100644 --- a/dev/BuildKit/Imports.h +++ b/dev/BuildKit/Imports.h @@ -6,6 +6,8 @@ #ifndef NEBUILD_INCLUDES_H #define NEBUILD_INCLUDES_H +#include <rang/rang.h> +#include <cassert> #include <cstddef> #include <cstdio> #include <fstream> @@ -13,7 +15,5 @@ #include <sstream> #include <string> #include <thread> -#include <cassert> -#include <rang/rang.h> #endif // NEBUILD_INCLUDES_H diff --git a/dev/BuildKit/JSONManifestBuilder.h b/dev/BuildKit/JSONManifestBuilder.h index b853ccf..63a67b7 100644 --- a/dev/BuildKit/JSONManifestBuilder.h +++ b/dev/BuildKit/JSONManifestBuilder.h @@ -15,7 +15,7 @@ namespace NeBuild { /// @brief JSON builder class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER { public: - JSONManifestBuilder() = default; + JSONManifestBuilder() = default; ~JSONManifestBuilder() override = default; JSONManifestBuilder& operator=(const JSONManifestBuilder&) = default; @@ -27,7 +27,7 @@ class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER { /// @param arg_val filename path. /// @retval true build succeeded. /// @retval false failed to build. - bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; + bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; const char* BuildSystem() override; }; } // namespace NeBuild
\ No newline at end of file diff --git a/dev/BuildKit/TOMLManifestBuilder.h b/dev/BuildKit/TOMLManifestBuilder.h index e300ba6..10a8200 100644 --- a/dev/BuildKit/TOMLManifestBuilder.h +++ b/dev/BuildKit/TOMLManifestBuilder.h @@ -15,7 +15,7 @@ namespace NeBuild { /// @brief TOML builder class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER { public: - TOMLManifestBuilder() = default; + TOMLManifestBuilder() = default; ~TOMLManifestBuilder() override = default; TOMLManifestBuilder& operator=(const TOMLManifestBuilder&) = default; @@ -27,7 +27,7 @@ class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER { /// @param arg_val filename path. /// @retval true build succeeded. /// @retval false failed to build. - bool BuildTarget(int arg_sz, const char* arg_val, const bool dry_run = false) override; + bool BuildTarget(int arg_sz, const char* arg_val, const bool dry_run = false) override; const char* BuildSystem() override; }; } // namespace NeBuild
\ No newline at end of file diff --git a/dev/cli/Tool.cc b/dev/cli/Tool.cc index 315f197..1d49c9f 100644 --- a/dev/cli/Tool.cc +++ b/dev/cli/Tool.cc @@ -52,8 +52,8 @@ int main(int argc, char** argv) { return; } } else { - NeBuild::Logger::info() << "error: file '" << index_path << "' is not a JSON file!" - << std::endl; + NeBuild::Logger::info() + << "error: file '" << index_path << "' is not a JSON file!" << std::endl; kFailed = true; return; } diff --git a/dev/src/JSONManifestBuilder.cc b/dev/src/JSONManifestBuilder.cc index 3b03bf8..33d7f62 100644 --- a/dev/src/JSONManifestBuilder.cc +++ b/dev/src/JSONManifestBuilder.cc @@ -5,7 +5,7 @@ #include <BuildKit/JSONManifestBuilder.h> -using JSON = nlohmann::json; +using JSON = nlohmann::json; namespace FS = std::filesystem; @@ -26,7 +26,8 @@ bool JSONManifestBuilder::BuildTarget(const std::string& argv_val, const bool dr path = argv_val; if (!FS::exists(path)) { - NeBuild::Logger::info() << "nebuild: error: file '" << path << "' does not exist" << std::endl; + NeBuild::Logger::info() << "nebuild: error: file '" << path << "' does not exist" + << std::endl; return false; } } @@ -35,7 +36,8 @@ bool JSONManifestBuilder::BuildTarget(const std::string& argv_val, const bool dr std::ifstream json(path); if (!json.good()) { - NeBuild::Logger::info() << "nebuild: error: file '" << path << "' is not a valid JSON" << std::endl; + NeBuild::Logger::info() << "nebuild: error: file '" << path << "' is not a valid JSON" + << std::endl; return false; } @@ -90,15 +92,16 @@ bool JSONManifestBuilder::BuildTarget(const std::string& argv_val, const bool dr auto ret_exec = std::system(command.c_str()); if (ret_exec > 0) { - NeBuild::Logger::info() << "error: exit with message: " << std::strerror(ret_exec) << "" << std::endl; + NeBuild::Logger::info() << "error: exit with message: " << std::strerror(ret_exec) << "" + << std::endl; return false; } try { if (json_obj["run_after_build"].get<bool>()) { if (target.ends_with(".so")) { - NeBuild::Logger::info() << "error: can't open dynamic library, it mayn't have an entrypoint" - << std::endl; + NeBuild::Logger::info() + << "error: can't open dynamic library, it mayn't have an entrypoint" << std::endl; return true; } else if (target.ends_with(".dylib") || target.ends_with(".dll")) { |
