mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 22:42:31 +08:00
🧹 cleanup warnings from clang-format
This commit is contained in:
parent
cf7b519395
commit
22e77296d1
1
.github/workflows/checks.yml
vendored
1
.github/workflows/checks.yml
vendored
@ -49,4 +49,5 @@ jobs:
|
||||
with:
|
||||
clang-format-version: '14'
|
||||
check-path: 'src'
|
||||
exclude-regex: 'src/subprocess.h'
|
||||
|
||||
|
@ -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<size_t>(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<std::string>();
|
||||
return fmt::format("HOOKS=({})", std::move(formatted_hooks));
|
||||
}
|
||||
/* clang-format on */
|
||||
return std::string{line.data(), line.size()};
|
||||
})
|
||||
| ranges::views::join('\n')
|
||||
|
Loading…
Reference in New Issue
Block a user