From 22e77296d18f7a3400939745531084ec94fe6a84 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 20 Nov 2022 04:24:16 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20cleanup=20warnings=20from=20clan?= =?UTF-8?q?g-format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/checks.yml | 1 + src/initcpio.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6750a5d..ffbc18f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -49,4 +49,5 @@ jobs: with: clang-format-version: '14' check-path: 'src' + exclude-regex: 'src/subprocess.h' diff --git a/src/initcpio.cpp b/src/initcpio.cpp index 5a6bc80..faa2822 100644 --- a/src/initcpio.cpp +++ b/src/initcpio.cpp @@ -37,6 +37,7 @@ bool Initcpio::write() const noexcept { } std::string&& result = file_content | ranges::views::split('\n') | ranges::views::transform([&](auto&& rng) { + /* clang-format off */ auto&& line = std::string_view(&*rng.begin(), static_cast(ranges::distance(rng))); if (line.starts_with("MODULES")) { auto&& formatted_modules = modules | ranges::views::join(' ') @@ -51,6 +52,7 @@ bool Initcpio::write() const noexcept { | ranges::to(); return fmt::format("HOOKS=({})", std::move(formatted_hooks)); } + /* clang-format on */ return std::string{line.data(), line.size()}; }) | ranges::views::join('\n')