nixbot

builds

failed nix-grpc-store-clang-tidy-0.1.0-beta.1 checks.aarch64-linux.clang-tidy · build #468 · raw

1tribuchet: building on eliza
unpackPhase
2unpacking source archive /nix/store/xsb526sb5wc3nnsh18z41n2q8zs0v52z-source3source root is source
configurePhase
4mesonConfigurePhase flags: --prefix=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1 --libdir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib --libexecdir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec --bindir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin --sbindir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin --includedir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/include --mandir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man --infodir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info --localedir=/nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain -Db_pch=false5The Meson build system6Version: 1.10.27Source dir: /build/source8Build dir: /build/source/build9Build type: native build10WARNING: Project does not target a minimum version but uses feature introduced in '1.1': meson.options file. Use meson_options.txt instead11Project name: nix-grpc-store12Project version: 0.1.0-beta.113C++ compiler for the host machine: clang++ (clang 23.1.0 "clang version 23.1.0")14C++ linker for the host machine: clang++ ld.bfd 2.4615Host machine cpu family: aarch6416Host machine cpu: aarch6417Found pkg-config: YES (/nix/store/96rqsbg8z242724qy85sbld7dbf4hipr-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.218Run-time dependency grpc++ found: YES 1.83.019Run-time dependency protobuf found: YES 36.1.020Run-time dependency libzstd found: YES 1.5.721Run-time dependency threads found: YES22Run-time dependency libcrypto found: YES 3.6.423Run-time dependency prometheus-cpp-core found: YES 1.3.024Run-time dependency prometheus-cpp-pull found: YES 1.3.025Run-time dependency absl_flat_hash_map found: YES 2026010726Run-time dependency absl_hash found: YES 2026010727Run-time dependency absl_synchronization found: YES 2026010728Compiler for C++ supports arguments -Werror=thread-safety: YES 29Run-time dependency jemalloc found: YES 5.3.1_030Run-time dependency nix-store found: YES 2.36.0pre20260920_5711f8fe31Run-time dependency nix-util found: YES 2.36.0pre20260920_5711f8fe32Run-time dependency libcurl found: YES 8.22.033Run-time dependency nlohmann_json found: YES 3.12.034Check usable header "jwt-cpp/traits/nlohmann-json/defaults.h" : YES 35Program protoc found: YES (/nix/store/nxlmb8lkbnzwcj46mmsvn1gjrgzap7sw-protobuf-36.1/bin/protoc)36Program grpc_cpp_plugin found: YES (/nix/store/zsbcm1brz7v8ilrz6w8ij11yhbf8fyiv-grpc-1.83.0/bin/grpc_cpp_plugin)37Program mold found: YES (/nix/store/463q48w7fn9s93amh1y7jsyrws5sh8rm-mold-unwrapped-wrapper-2.42.1/bin/mold)38Run-time dependency dl found: YES39Program tests/farm-client-test.sh found: YES (/build/source/tests/farm-client-test.sh)40Program tests/oidc-test.sh found: YES (/build/source/tests/oidc-test.sh)41Build targets in project: 1142WARNING: Project specifies no minimum version but uses features which were added in versions:43 * 1.1: {'meson.options file'}4445nix-grpc-store 0.1.0-beta.14647 User defined options48 auto_features: enabled49 b_pch : false50 bindir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin51 buildtype : plain52 includedir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/include53 infodir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info54 libdir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib55 libexecdir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec56 localedir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/locale57 mandir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man58 prefix : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.159 sbindir : /nix/store/n2ha55zvnw4fp4g6plqi2w8wx4a5dkw6-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin60 wrap_mode : nodownload6162Found ninja-1.13.2 at /nix/store/ijbipgac9wyp1n5smvkd8fczs9jyr26g-ninja-1.13.2/bin/ninja63mesonConfigurePhase: enabled\ parallel\ building
buildPhase
64[1/1] Generating nix_remote_proto with a custom command65[0/1] /nix/store/sc7hggvmvma7m8bbgmp8gsa1q1x37aq8-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always66>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/plugin-loader.cc67/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found68/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found69Error while processing /build/source/src/client/plugin-loader.cc.70../src/client/plugin-loader.cc:10:10: error: 'cstdio' file not found [clang-diagnostic-error]71 10 | #include <cstdio>72 | ^~~~~~~~73../src/client/plugin-loader.cc:107:19: error: variable 'override' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]74 107 | if (const char *override = std::getenv("NIX_GRPC_PLUGIN_OVERRIDE")) {75 | ^76 108 | plugin = override;77 | 78 | = nullptr79>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/farm-client-test.cc80/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found81/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found82Error while processing /build/source/tests/farm-client-test.cc.83../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]84 40 | std::optional<Remote> remote;85 | 86 | {}87 41 | 88 42 | public:89 43 | explicit Cache(const Niks3Config & cfg)90 | ^91../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]92 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>93 | ^94 | static 95../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]96 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)97 | ^98 | static 99../src/daemon/cache.hh:87:18: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]100 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)101 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~102../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'103 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)104 | ^~~~~105../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'106 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)107 | ^~~~~~~~~108../src/daemon/cache.hh:103:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]109 103 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const110 | ^ ~~~~~111 | static 112../src/daemon/niks3-client.hh:17:8: error: constructor does not initialize these fields: url, tokenFile, clientCert, clientKey, pushArgv [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]113 17 | struct Niks3Config114 | ^115 18 | {116 19 | std::string url;117 | 118 | {}119 20 | std::string tokenFile; // bearer, optional120 | 121 | {}122 21 | std::string clientCert; // mTLS, optional123 | 124 | {}125 22 | std::string clientKey;126 | 127 | {}128 23 | PushProcess::Argv pushArgv;129 | 130 | {}131../src/daemon/niks3-client.hh:40:5: error: constructor does not initialize these fields: baseUrl, bearer, clientCert, clientKey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]132 34 | std::string baseUrl;133 | 134 | {}135 35 | std::shared_ptr<TokenFile> bearer;136 | 137 | {}138 36 | std::string clientCert;139 | 140 | {}141 37 | std::string clientKey;142 | 143 | {}144 38 | 145 39 | public:146 40 | explicit Niks3Client(const Niks3Config & cfg)147 | ^148../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]149 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>150 | ^ ~~~~~151 | static 152../src/daemon/niks3-client.hh:53:29: error: 2 adjacent parameters of 'post' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]153 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>154 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~155../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'156 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>157 | ^~~~158../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'159 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>160 | ^~~~161../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values162 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>163 | ^164../src/daemon/push.hh:60:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]165 60 | explicit PushProcess(Argv argv)166 | ^167../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]168 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)169 | ^170 | static 171../src/daemon/push.hh:82:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]172 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)173 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~174../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'175 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)176 | ^~~~~177../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'178 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)179 | ^~~~~~~~~180../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]181 120 | explicit Pending(size_t count)182 | ^183../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]184 126 | auto ack(const std::string & status, const std::string & message) -> bool185 | ^186 | static 187../src/daemon/push.hh:126:18: error: 2 adjacent parameters of 'ack' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]188 126 | auto ack(const std::string & status, const std::string & message) -> bool189 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~190../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'191 126 | auto ack(const std::string & status, const std::string & message) -> bool192 | ^~~~~~193../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'194 126 | auto ack(const std::string & status, const std::string & message) -> bool195 | ^~~~~~~196../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]197 141 | void fail(const std::string & message)198 | ^199 | static 200../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]201 149 | auto wait(const Cancelled & cancelled) -> Result202 | ^203 | static 204../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]205 162 | struct Inner206 | ^207 163 | {208 164 | size_t left;209 | 210 | {}211../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]212 171 | struct State213 | ^214 172 | {215 173 | nix::Pid pid;216 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;217 | 218 | {}219../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]220 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)221 | ^222 | static 223../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]224 215 | void readAcks(int acksFd)225 | ^226 | static 227../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]228 21 | struct Cached229 | ^230 22 | {231 23 | std::string token;232 | 233 | {}234../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]235 19 | nix::Sync<Cached> cached;236 | 237 | {}238 20 | 239 21 | static auto mtime(const struct stat & info) -> struct timespec240 22 | {241 23 | #ifdef __APPLE__242 24 | return info.st_mtimespec;243 25 | #else244 26 | return info.st_mtim;245 27 | #endif246 28 | }247 29 | 248 30 | public:249 31 | explicit TokenFile(std::string path_)250 | ^251../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]252 46 | auto get() -> std::string253 | ^254 | static 255../src/http.hh:71:38: error: 2 adjacent parameters of 'collect' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]256 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t257 | ^~~~~~~~~~~~~~~~~~~~~~~~~258../src/http.hh:71:45: note: the first parameter in the range is 'size'259 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t260 | ^~~~261../src/http.hh:71:58: note: the last parameter in the range is 'nmemb'262 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t263 | ^~~~~264../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]265 81 | void header(const std::string & line)266 | ^267 | static 268../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]269 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)270 | ^271../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]272 129 | auto perform() -> long273 | ^274 | static 275../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]276 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds277 | ^ ~~~~~278 | static 279../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]280 23 | inline auto logfmtValue(std::string_view value) -> std::string281 | ^282../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]283 52 | enum class LogLevel : std::uint8_t { info, debug };284 | ^285../src/nix-compat.hh:72:36: error: 2 adjacent parameters of 'makeProtocolVersion' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]286 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {287 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~288../src/nix-compat.hh:72:49: note: the first parameter in the range is 'major'289 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {290 | ^~~~~291../src/nix-compat.hh:72:64: note: the last parameter in the range is 'minor'292 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {293 | ^~~~~294../src/nix-compat.hh:72:56: note: 'unsigned int' and 'int' may be implicitly converted295 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {296 | ^297../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]298 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {299 | ^300 | const301../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]302 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {303 | ^304 | const305../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]306 298 | bool dynamic = false;307 | ^308 | const 309../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]310 301 | nix::StorePathSet srcs;311 | ^ 312 | = 0313../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]314 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {315 | ^316 | const317../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]318 375 | using EnsureRead = nix::EnsureRead;319 | ^~~~~~~~~~~~320../tests/farm-client-test.cc:3:10: error: 'chrono' file not found [clang-diagnostic-error]321 3 | #include <chrono>322 | ^~~~~~~~323../tests/farm-client-test.cc:17:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]324 17 | #include <nlohmann/json_fwd.hpp>325 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~326 18 | 327../tests/farm-client-test.cc:23:1: error: included header niks3-client.hh is not used directly [misc-include-cleaner,-warnings-as-errors]328 23 | #include "niks3-client.hh"329 | ^~~~~~~~~~~~~~~~~~~~~~~~~~330 24 | #include "http.hh"331../tests/farm-client-test.cc:37:5: error: constructor does not initialize these fields: base [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]332 33 | std::string base;333 | 334 | {}335 34 | int failures = 0;336 35 | 337 36 | public:338 37 | explicit Suite(std::string base)339 | ^340../tests/farm-client-test.cc:53:24: error: method 'log' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]341 53 | [[nodiscard]] auto log() const -> nlohmann::json342 | ^ ~~~~~343 | static 344../tests/farm-client-test.cc:62:9: error: variable 'found' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]345 62 | int found = 0;346 | ^347 | const 348../tests/farm-client-test.cc:70:28: error: variable 'push' of type 'nixgrpc::PushProcess &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]349 70 | void testPush(Suite & tst, nixgrpc::PushProcess & push)350 | ^351 | const352../tests/farm-client-test.cc:125:51: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]353 125 | push.pushWait({"/nix/store/hang"}, [&]() -> bool { return stop; });354 | ^~355../tests/farm-client-test.cc:143:29: error: 2 adjacent parameters of 'testCache' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]356 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)357 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~358../tests/farm-client-test.cc:143:49: note: the first parameter in the range is 'base'359 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)360 | ^~~~361../tests/farm-client-test.cc:143:75: note: the last parameter in the range is 'mock'362 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)363 | ^~~~364>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/xfcc-test.cc365/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found366/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found367Error while processing /build/source/tests/xfcc-test.cc.368../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]369 29 | std::string_view rest;370 | 371 | {}372 30 | 373 31 | public:374 32 | explicit Cursor(std::string_view input)375 | ^376../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]377 47 | auto take() -> char378 | ^379 | static 380../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]381 52 | char const chr = rest.front();382 | ^ 383 | = 0384../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]385 58 | auto until(std::string_view stops) -> std::optional<std::string_view>386 | ^387 | static 388../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]389 69 | auto remaining() -> std::string_view390 | ^391 | static 392../src/daemon/xfcc.hh:150:13: error: variable 'subjectCommonName' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]393 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>394 | ^395../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]396 197 | void add(std::string_view pattern)397 | ^398 | static 399../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]400 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool401 | ^ ~~~~~402 | static 403../tests/xfcc-test.cc:1:10: error: 'cassert' file not found [clang-diagnostic-error]404 1 | #include <cassert>405 | ^~~~~~~~~406>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/scheduler-test.cc407/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found408/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found409Error while processing /build/source/tests/scheduler-test.cc.410../src/daemon/scheduler.hh:71:16: error: 2 adjacent parameters of 'place' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]411 71 | void place(size_t idx, std::pair<double, DrvId> item)412 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~413../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'414 71 | void place(size_t idx, std::pair<double, DrvId> item)415 | ^~~416../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'417 71 | void place(size_t idx, std::pair<double, DrvId> item)418 | ^~~~419../src/daemon/scheduler.hh:71:16: note: 420 71 | void place(size_t idx, std::pair<double, DrvId> item)421 | ^422../src/daemon/scheduler.hh:71:28: note: 'size_t' and 'int' may be implicitly converted: 'size_t' (as 'unsigned long') -> 'int', 'int' -> 'size_t' (as 'unsigned long')423 71 | void place(size_t idx, std::pair<double, DrvId> item)424 | ^425../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]426 77 | void siftUp(size_t idx)427 | ^428 | static 429../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]430 91 | void siftDown(size_t idx)431 | ^432 | static 433../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]434 94 | const size_t len = heap.size();435 | ^ 436 | = 0437../src/daemon/scheduler.hh:131:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]438 131 | void set(DrvId drv, double key)439 | ^~~~~~~~~~~~~~~~~~~~~440../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'441 131 | void set(DrvId drv, double key)442 | ^~~443../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'444 131 | void set(DrvId drv, double key)445 | ^~~446../src/daemon/scheduler.hh:131:14: note: 447 131 | void set(DrvId drv, double key)448 | ^449../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')450 131 | void set(DrvId drv, double key)451 | ^452../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]453 191 | void check(WorkerId wid) const454 | ^ ~~~~~455 | static 456../src/daemon/scheduler.hh:213:21: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]457 213 | nonempty |= 1;458 | ~~ ^459../src/daemon/scheduler.hh:221:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]460 221 | void set(WorkerId wid, int32_t val)461 | ^~~~~~~~~~~~~~~~~~~~~~~~~462../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'463 221 | void set(WorkerId wid, int32_t val)464 | ^~~465../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'466 221 | void set(WorkerId wid, int32_t val)467 | ^~~468../src/daemon/scheduler.hh:221:14: note: 469 221 | void set(WorkerId wid, int32_t val)470 | ^471../src/daemon/scheduler.hh:221:28: note: 'WorkerId' and 'int32_t' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int32_t' (as 'int'), 'int32_t' (as 'int') -> 'WorkerId' (as 'unsigned int')472 221 | void set(WorkerId wid, int32_t val)473 | ^474../src/daemon/scheduler.hh:254:9: error: variable 'top' of type 'int32_t' (aka 'int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]475 254 | auto top = maxFree();476 | ^477 | const 478../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]479 272 | struct Assign480 | ^481 273 | {482 274 | DrvId drv = 0;483 275 | WorkerId worker = 0;484 276 | uint64_t assignId = 0;485 277 | std::vector<ClientId> clients;486 | 487 | {}488../src/daemon/scheduler.hh:280:8: error: constructor does not initialize these fields: drvPath, inputs, system, features, followers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]489 280 | struct Entry490 | ^491 281 | {492 282 | std::string drvPath;493 | 494 | {}495 283 | std::vector<PathKey> inputs; // for locality only496 | 497 | {}498 284 | std::string system;499 | 500 | {}501 285 | std::vector<std::string> features; // required502 | 503 | {}504 286 | std::vector<ClientId> followers;505 | 506 | {}507../src/daemon/scheduler.hh:293:8: error: constructor does not initialize these fields: addr, systems, features, running [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]508 293 | struct Worker509 | ^510 294 | {511 295 | std::string addr;512 | 513 | {}514 296 | std::vector<std::string> systems;515 | 516 | {}517 297 | std::vector<std::string> features;518 | 519 | {}520 298 | int32_t maxJobs = 0;521 299 | bool up = false;522 300 | bool draining = false;523 301 | std::vector<DrvId> running;524 | 525 | {}526../src/daemon/scheduler.hh:307:5: error: constructor does not initialize these fields: drvIds, freeIds, workerIds, workers, systems [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]527 307 | explicit Core(Config cfg = {})528 | ^529../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]530 317 | auto drvId(std::string_view path) -> DrvId531 | ^532 | static 533../src/daemon/scheduler.hh:323:9: error: variable 'drv' of type 'DrvId' (aka 'unsigned int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]534 323 | DrvId drv = 0;535 | ^536 | const 537../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]538 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>539 | ^ ~~~~~540 | static 541../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]542 344 | auto workerId(std::string_view addr) -> WorkerId543 | ^544 | static 545../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]546 365 | [[nodiscard]] auto queued() const -> size_t547 | ^ ~~~~~548 | static 549../src/daemon/scheduler.hh:367:9: error: variable 'total' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness,-warnings-as-errors]550 367 | size_t total = 0;551 | ^552 | const 553../src/daemon/scheduler.hh:385:12: error: constructor does not initialize these fields: drvPath, inputs, system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]554 385 | struct WantInfo555 | ^556 386 | {557 387 | std::string_view drvPath;558 | 559 | {}560 388 | std::vector<std::string_view> inputs;561 | 562 | {}563 389 | std::string_view system;564 | 565 | {}566 390 | std::vector<std::string> features;567 | 568 | {}569../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]570 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult571 | ^572 | static 573../src/daemon/scheduler.hh:398:9: error: variable 'cpHintMs' of type 'double' can be declared 'const' [misc-const-correctness,-warnings-as-errors]574 398 | auto cpHintMs = info.cpHintMs;575 | ^576 | const 577../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]578 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>579 | ^580 | static 581../src/daemon/scheduler.hh:429:17: error: 2 adjacent parameters of 'cancel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]582 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>583 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~584../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'585 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>586 | ^~~~~~587../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'588 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>589 | ^~~~~~~590../src/daemon/scheduler.hh:429:17: note: 591 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>592 | ^593../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')594 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>595 | ^596../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]597 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)598 | ^599 | static 600../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]601 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)602 | ^603 | /*unused*/604../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]605 478 | struct HelloInfo606 | ^607 479 | {608 480 | std::string_view addr;609 | 610 | {}611 481 | std::vector<std::string> systems; // first is the native one612 | 613 | {}614 482 | std::vector<std::string> features;615 | 616 | {}617../src/daemon/scheduler.hh:539:10: error: 2 adjacent parameters of 'done' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]618 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)619 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~620../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'621 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)622 | ^~~623../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'624 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)625 | ^~~~~~~626../src/daemon/scheduler.hh:539:10: note: 627 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)628 | ^629../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')630 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)631 | ^632../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]633 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)634 | ^635 | /*unused*/636../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]637 610 | struct StatsKey638 | ^639 611 | {640 612 | std::string system;641 | 642 | {}643 613 | std::string features; // sorted, comma-joined644 | 645 | {}646../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]647 704 | void retire(DrvId drv)648 | ^649 | static 650../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]651 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)652 | ^653 | static 654../src/daemon/scheduler.hh:716:26: error: 2 adjacent parameters of 'rememberBuilder' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]655 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)656 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~657../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'658 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)659 | ^~~~660../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'661 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)662 | ^~~663../src/daemon/scheduler.hh:716:26: note: 664 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)665 | ^666../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'667 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)668 | ^669../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]670 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t671 | ^ ~~~~~672 | static 673../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]674 784 | void refreshFree(WorkerId wid)675 | ^676 | static 677../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]678 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>679 | ^ ~~~~~680 | static 681../src/daemon/scheduler.hh:837:9: error: variable 'score' of type '(lambda at ../src/daemon/scheduler.hh:837:22)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]682 837 | auto score = [&](WorkerId wid, double bytes) -> double {683 | ^684 | const 685../src/daemon/scheduler.hh:865:16: error: narrowing conversion from 'WorkerId' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]686 865 | return picked;687 | ^688../tests/scheduler-test.cc:3:10: error: 'algorithm' file not found [clang-diagnostic-error]689 3 | #include <algorithm>690 | ^~~~~~~~~~~691../tests/scheduler-test.cc:46:20: error: variable 'minKey' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]692 3 | double minKey = ref.begin()->second;693 | ^ 694 | = NAN695../tests/scheduler-test.cc:75:12: error: variable 'shard' of type 'Core &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]696 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId697 | ^698 | const699../tests/scheduler-test.cc:75:26: error: 4 adjacent parameters of 'hello' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]700 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId701 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~702../tests/scheduler-test.cc:75:43: note: the first parameter in the range is 'addr'703 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId704 | ^~~~705../tests/scheduler-test.cc:75:141: note: the last parameter in the range is 'features'706 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId707 | ^~~~~~~~708../tests/scheduler-test.cc:75:26: note: 709 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId710 | ^711../tests/scheduler-test.cc:75:49: note: 'int' and 'uint32_t' may be implicitly converted: 'int' -> 'uint32_t' (as 'unsigned int'), 'uint32_t' (as 'unsigned int') -> 'int'712 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId713 | ^714../tests/scheduler-test.cc:75:64: note: 'int' and 'const int &' parameters accept and bind the same kind of values715 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId716 | ^717../tests/scheduler-test.cc:75:49: note: 718 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId719 | ^720../tests/scheduler-test.cc:75:64: note: 'uint32_t' and 'const int &' parameters accept and bind the same kind of values721 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId722 | ^723../tests/scheduler-test.cc:75:64: note: 'uint32_t' and 'const int &' may be implicitly converted: 'uint32_t' (as 'unsigned int') -> 'const int &' (as 'int'), 'const int &' (as 'int') -> 'uint32_t' (as 'unsigned int')724../tests/scheduler-test.cc:75:156: error: pointee of variable 'superseded' of type 'int *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]725 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector<std::string_view> & running = {}, std::vector<std::string> features = {}, std::vector<Core::Superseded> * superseded = nullptr) -> WorkerId726 | ^727 | const728../tests/scheduler-test.cc:88:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]729 88 | Core shard;730 | ^731 | const 732../tests/scheduler-test.cc:106:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]733 106 | Core shard;734 | ^735 | const 736../tests/scheduler-test.cc:123:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]737 123 | Core shard;738 | ^739 | const 740../tests/scheduler-test.cc:157:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]741 157 | Core shard;742 | ^743 | const 744../tests/scheduler-test.cc:177:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]745 177 | Core shard;746 | ^747 | const 748../tests/scheduler-test.cc:199:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]749 199 | Core shard;750 | ^751 | const 752../tests/scheduler-test.cc:260:17: error: variable 'shard' of type 'Core &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]753 260 | void checkStats(Core & shard)754 | ^755 | const756../tests/scheduler-test.cc:263:5: error: variable 'stat' of type '(lambda at ../tests/scheduler-test.cc:263:17)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]757 263 | auto stat = [&](const char * sys, const char * feats = "") -> Core::Stats { return sts[{.system = sys, .features = feats}]; };758 | ^759 | const 760../tests/scheduler-test.cc:291:5: error: variable 'onBoth' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]761 291 | int onBoth = 0;762 | ^763 | const 764../tests/scheduler-test.cc:335:6: error: an exception may be thrown in function 'main' which should not throw exceptions [bugprone-exception-escape,-warnings-as-errors]765 335 | auto main() -> int766 | ^767../src/daemon/scheduler.hh:134:13: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'set' here768 134 | throw nix::Error("IndexedHeap: id out of range");769 | ^770../tests/scheduler-test.cc:35:13: note: frame #1: function 'testHeapAgainstMap' calls function 'set' here771 35 | heap.set(id, key);772 | ^773../tests/scheduler-test.cc:337:5: note: frame #2: function 'main' calls function 'testHeapAgainstMap' here774 337 | testHeapAgainstMap();775 | ^776>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/elector.cc777/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found778/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found779Error while processing /build/source/src/daemon/elector.cc.780../src/daemon/elector.cc:15:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]781 15 | #include <nlohmann/json_fwd.hpp>782 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~783 16 | #include <nlohmann/json.hpp>784../src/daemon/elector.cc:16:1: error: included header json.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]785 16 | #include <nlohmann/json.hpp>786 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~787 17 | 788../src/daemon/elector.cc:18:1: error: included header http.hh is not used directly [misc-include-cleaner,-warnings-as-errors]789 18 | #include "http.hh"790 | ^~~~~~~~~~~~~~~~~~791 19 | #include "logfmt.hh"792../src/daemon/elector.cc:29:8: error: constructor does not initialize these fields: stop, lead, buf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]793 29 | struct Reader794 | ^795 30 | {796 31 | std::stop_token stop;797 | 798 | {}799 32 | std::function<void(bool)> lead;800 | 801 | {}802 33 | std::string buf;803 | 804 | {}805../src/daemon/elector.cc:39:5: error: variable 'reader' of type 'Reader &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]806 39 | auto & reader = *static_cast<Reader *>(userp);807 | ^808 | const809../src/daemon/elector.cc:62:1: error: constructor does not initialize these fields: onChange, thread [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]810 62 | Elector::Elector(const Niks3Client & niks3_, std::function<void(bool)> onChange_)811 | ^812../src/daemon/elector.cc:69:10: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]813 69 | Elector::~Elector()814 | ^815/build/source/build/../src/daemon/elector.hh:5:10: error: 'functional' file not found [clang-diagnostic-error]816 5 | #include <functional>817 | ^~~~~~~~~~~~818../src/daemon/niks3-client.hh:17:8: error: constructor does not initialize these fields: url, tokenFile, clientCert, clientKey, pushArgv [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]819 17 | struct Niks3Config820 | ^821 18 | {822 19 | std::string url;823 | 824 | {}825 20 | std::string tokenFile; // bearer, optional826 | 827 | {}828 21 | std::string clientCert; // mTLS, optional829 | 830 | {}831 22 | std::string clientKey;832 | 833 | {}834 23 | PushProcess::Argv pushArgv;835 | 836 | {}837../src/daemon/niks3-client.hh:40:5: error: constructor does not initialize these fields: baseUrl, bearer, clientCert, clientKey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]838 34 | std::string baseUrl;839 | 840 | {}841 35 | std::shared_ptr<TokenFile> bearer;842 | 843 | {}844 36 | std::string clientCert;845 | 846 | {}847 37 | std::string clientKey;848 | 849 | {}850 38 | 851 39 | public:852 40 | explicit Niks3Client(const Niks3Config & cfg)853 | ^854../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]855 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>856 | ^ ~~~~~857 | static 858../src/daemon/niks3-client.hh:53:29: error: 2 adjacent parameters of 'post' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]859 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>860 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~861../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'862 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>863 | ^~~~864../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'865 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>866 | ^~~~867../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values868 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>869 | ^870../src/daemon/push.hh:60:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]871 60 | explicit PushProcess(Argv argv)872 | ^873../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]874 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)875 | ^876 | static 877../src/daemon/push.hh:82:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]878 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)879 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~880../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'881 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)882 | ^~~~~883../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'884 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)885 | ^~~~~~~~~886../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]887 120 | explicit Pending(size_t count)888 | ^889../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]890 126 | auto ack(const std::string & status, const std::string & message) -> bool891 | ^892 | static 893../src/daemon/push.hh:126:18: error: 2 adjacent parameters of 'ack' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]894 126 | auto ack(const std::string & status, const std::string & message) -> bool895 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~896../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'897 126 | auto ack(const std::string & status, const std::string & message) -> bool898 | ^~~~~~899../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'900 126 | auto ack(const std::string & status, const std::string & message) -> bool901 | ^~~~~~~902../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]903 141 | void fail(const std::string & message)904 | ^905 | static 906../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]907 149 | auto wait(const Cancelled & cancelled) -> Result908 | ^909 | static 910../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]911 162 | struct Inner912 | ^913 163 | {914 164 | size_t left;915 | 916 | {}917../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]918 171 | struct State919 | ^920 172 | {921 173 | nix::Pid pid;922 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;923 | 924 | {}925../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]926 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)927 | ^928 | static 929../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]930 215 | void readAcks(int acksFd)931 | ^932 | static 933../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]934 21 | struct Cached935 | ^936 22 | {937 23 | std::string token;938 | 939 | {}940../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]941 19 | nix::Sync<Cached> cached;942 | 943 | {}944 20 | 945 21 | static auto mtime(const struct stat & info) -> struct timespec946 22 | {947 23 | #ifdef __APPLE__948 24 | return info.st_mtimespec;949 25 | #else950 26 | return info.st_mtim;951 27 | #endif952 28 | }953 29 | 954 30 | public:955 31 | explicit TokenFile(std::string path_)956 | ^957../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]958 46 | auto get() -> std::string959 | ^960 | static 961../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]962 81 | void header(const std::string & line)963 | ^964 | static 965../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]966 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)967 | ^968../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]969 129 | auto perform() -> long970 | ^971 | static 972../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]973 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds974 | ^ ~~~~~975 | static 976../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]977 23 | inline auto logfmtValue(std::string_view value) -> std::string978 | ^979../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]980 52 | enum class LogLevel : std::uint8_t { info, debug };981 | ^982>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/options.cc983/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found984/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found985Error while processing /build/source/src/daemon/options.cc.986../src/daemon/acl.hh:22:12: error: enum 'Role' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]987 22 | enum class Role : std::uint8_t {988 | ^989../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]990 51 | class Acl991 | ^992 52 | {993 53 | struct Rule994 54 | {995 55 | std::string pattern;996 56 | Role role;997 57 | };998 58 | 999 59 | std::vector<Rule> rules;1000 | 1001 | {}1002 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1003 61 | std::optional<Role> anonRole;1004 | 1005 | {}1006../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1007 53 | struct Rule1008 | ^1009 54 | {1010 55 | std::string pattern;1011 | 1012 | {}1013../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1014 70 | void addRule(std::string_view spec)1015 | ^1016 | static 1017../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1018 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1019 | ^ ~~~~~1020 | static 1021../src/daemon/niks3-client.hh:17:8: error: constructor does not initialize these fields: url, tokenFile, clientCert, clientKey, pushArgv [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1022 17 | struct Niks3Config1023 | ^1024 18 | {1025 19 | std::string url;1026 | 1027 | {}1028 20 | std::string tokenFile; // bearer, optional1029 | 1030 | {}1031 21 | std::string clientCert; // mTLS, optional1032 | 1033 | {}1034 22 | std::string clientKey;1035 | 1036 | {}1037 23 | PushProcess::Argv pushArgv;1038 | 1039 | {}1040../src/daemon/niks3-client.hh:40:5: error: constructor does not initialize these fields: baseUrl, bearer, clientCert, clientKey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1041 34 | std::string baseUrl;1042 | 1043 | {}1044 35 | std::shared_ptr<TokenFile> bearer;1045 | 1046 | {}1047 36 | std::string clientCert;1048 | 1049 | {}1050 37 | std::string clientKey;1051 | 1052 | {}1053 38 | 1054 39 | public:1055 40 | explicit Niks3Client(const Niks3Config & cfg)1056 | ^1057../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1058 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1059 | ^ ~~~~~1060 | static 1061../src/daemon/niks3-client.hh:53:29: error: 2 adjacent parameters of 'post' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1062 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1063 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1064../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'1065 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1066 | ^~~~1067../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'1068 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1069 | ^~~~1070../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values1071 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1072 | ^1073../src/daemon/options.cc:4:1: error: included header nix-compat.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1074 4 | #include "nix-compat.hh"1075 | ^~~~~~~~~~~~~~~~~~~~~~~~1076 5 | 1077../src/daemon/options.cc:21:1: error: included header server_credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]1078 21 | #include <grpcpp/security/server_credentials.h>1079 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1080 22 | #include <grpcpp/security/tls_certificate_provider.h>1081../src/daemon/options.cc:23:1: error: included header tls_credentials_options.h is not used directly [misc-include-cleaner,-warnings-as-errors]1082 23 | #include <grpcpp/security/tls_credentials_options.h>1083 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1084 24 | 1085../src/daemon/options.cc:26:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1086 26 | #include <nix/util/file-system.hh>1087 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1088 27 | #include <nix/util/strings.hh>1089../src/daemon/options.cc:27:1: error: included header strings.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1090 27 | #include <nix/util/strings.hh>1091 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1092 28 | #include <nix/util/util.hh>1093../src/daemon/options.cc:29:1: error: included header environment-variables.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1094 29 | #include <nix/util/environment-variables.hh>1095 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1096 30 | 1097../src/daemon/options.cc:31:1: error: included header acl.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1098 31 | #include "acl.hh"1099 | ^~~~~~~~~~~~~~~~~1100 32 | #include "logfmt.hh"1101../src/daemon/options.cc:36:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1102 36 | #include "xfcc.hh"1103 | ^~~~~~~~~~~~~~~~~~1104 37 | 1105../src/daemon/options.cc:41:6: error: variable 'parseLogLevel' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]1106 41 | auto parseLogLevel(std::string_view value) -> LogLevel1107 | ^1108../src/daemon/options.cc:65:18: error: variable 'niks3' of type 'Niks3Config &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1109 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1110 | ^1111 | const1112../src/daemon/options.cc:65:39: error: 2 adjacent parameters of 'finishNiks3' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1113 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1114 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1115../src/daemon/options.cc:65:59: note: the first parameter in the range is 'tlsCert'1116 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1117 | ^~~~~~~1118../src/daemon/options.cc:65:88: note: the last parameter in the range is 'tlsKey'1119 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1120 | ^~~~~~1121../src/daemon/options.cc:92:6: error: function 'parseOptions' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]1122 92 | auto parseOptions(const std::vector<std::string_view> & args) -> Options1123 | ^1124 | static 1125../src/daemon/options.cc:227:6: error: function 'makeServerCredentials' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]1126 227 | auto makeServerCredentials(const Options & options) -> std::shared_ptr<grpc::ServerCredentials>1127 | ^1128 | static 1129../src/daemon/options.hh:4:10: error: 'chrono' file not found [clang-diagnostic-error]1130 4 | #include <chrono>1131 | ^~~~~~~~1132../src/daemon/push.hh:60:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1133 60 | explicit PushProcess(Argv argv)1134 | ^1135../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1136 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1137 | ^1138 | static 1139../src/daemon/push.hh:82:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1140 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1141 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1142../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'1143 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1144 | ^~~~~1145../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'1146 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1147 | ^~~~~~~~~1148../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1149 120 | explicit Pending(size_t count)1150 | ^1151../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1152 126 | auto ack(const std::string & status, const std::string & message) -> bool1153 | ^1154 | static 1155../src/daemon/push.hh:126:18: error: 2 adjacent parameters of 'ack' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1156 126 | auto ack(const std::string & status, const std::string & message) -> bool1157 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1158../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'1159 126 | auto ack(const std::string & status, const std::string & message) -> bool1160 | ^~~~~~1161../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'1162 126 | auto ack(const std::string & status, const std::string & message) -> bool1163 | ^~~~~~~1164../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1165 141 | void fail(const std::string & message)1166 | ^1167 | static 1168../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1169 149 | auto wait(const Cancelled & cancelled) -> Result1170 | ^1171 | static 1172../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1173 162 | struct Inner1174 | ^1175 163 | {1176 164 | size_t left;1177 | 1178 | {}1179../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1180 171 | struct State1181 | ^1182 172 | {1183 173 | nix::Pid pid;1184 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;1185 | 1186 | {}1187../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1188 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)1189 | ^1190 | static 1191../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1192 215 | void readAcks(int acksFd)1193 | ^1194 | static 1195../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1196 65 | class IndexedHeap1197 | ^1198 66 | {1199 67 | std::vector<std::pair<double, DrvId>> heap;1200 68 | std::vector<uint32_t> pos;1201 | 1202 | {}1203../src/daemon/scheduler.hh:71:16: error: 2 adjacent parameters of 'place' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1204 71 | void place(size_t idx, std::pair<double, DrvId> item)1205 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1206../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'1207 71 | void place(size_t idx, std::pair<double, DrvId> item)1208 | ^~~1209../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'1210 71 | void place(size_t idx, std::pair<double, DrvId> item)1211 | ^~~~1212../src/daemon/scheduler.hh:71:16: note: 1213 71 | void place(size_t idx, std::pair<double, DrvId> item)1214 | ^1215../src/daemon/scheduler.hh:71:28: note: 'size_t' and 'int' may be implicitly converted: 'size_t' (as 'unsigned long') -> 'int', 'int' -> 'size_t' (as 'unsigned long')1216 71 | void place(size_t idx, std::pair<double, DrvId> item)1217 | ^1218../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1219 77 | void siftUp(size_t idx)1220 | ^1221 | static 1222../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1223 91 | void siftDown(size_t idx)1224 | ^1225 | static 1226../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1227 94 | const size_t len = heap.size();1228 | ^ 1229 | = 01230../src/daemon/scheduler.hh:131:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1231 131 | void set(DrvId drv, double key)1232 | ^~~~~~~~~~~~~~~~~~~~~1233../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'1234 131 | void set(DrvId drv, double key)1235 | ^~~1236../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'1237 131 | void set(DrvId drv, double key)1238 | ^~~1239../src/daemon/scheduler.hh:131:14: note: 1240 131 | void set(DrvId drv, double key)1241 | ^1242../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')1243 131 | void set(DrvId drv, double key)1244 | ^1245../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1246 174 | class FreeIndex1247 | ^1248 175 | {1249 176 | public:1250 177 | static constexpr int32_t maxSlots = 63;1251 178 | 1252 179 | private:1253 180 | std::vector<int32_t> free; // may go negative (draining below running)1254 | 1255 | {}1256 181 | std::vector<uint32_t> pos;1257 | 1258 | {}1259 182 | std::vector<bool> tracked;1260 | 1261 | {}1262../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1263 191 | void check(WorkerId wid) const1264 | ^ ~~~~~1265 | static 1266../src/daemon/scheduler.hh:213:21: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]1267 213 | nonempty |= 1;1268 | ~~ ^1269../src/daemon/scheduler.hh:221:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1270 221 | void set(WorkerId wid, int32_t val)1271 | ^~~~~~~~~~~~~~~~~~~~~~~~~1272../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'1273 221 | void set(WorkerId wid, int32_t val)1274 | ^~~1275../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'1276 221 | void set(WorkerId wid, int32_t val)1277 | ^~~1278../src/daemon/scheduler.hh:221:14: note: 1279 221 | void set(WorkerId wid, int32_t val)1280 | ^1281../src/daemon/scheduler.hh:221:28: note: 'WorkerId' and 'int32_t' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int32_t' (as 'int'), 'int32_t' (as 'int') -> 'WorkerId' (as 'unsigned int')1282 221 | void set(WorkerId wid, int32_t val)1283 | ^1284../src/daemon/scheduler.hh:254:9: error: variable 'top' of type 'int32_t' (aka 'int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]1285 254 | auto top = maxFree();1286 | ^1287 | const 1288../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1289 272 | struct Assign1290 | ^1291 273 | {1292 274 | DrvId drv = 0;1293 275 | WorkerId worker = 0;1294 276 | uint64_t assignId = 0;1295 277 | std::vector<ClientId> clients;1296 | 1297 | {}1298../src/daemon/scheduler.hh:280:8: error: constructor does not initialize these fields: drvPath, inputs, system, features, followers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1299 280 | struct Entry1300 | ^1301 281 | {1302 282 | std::string drvPath;1303 | 1304 | {}1305 283 | std::vector<PathKey> inputs; // for locality only1306 | 1307 | {}1308 284 | std::string system;1309 | 1310 | {}1311 285 | std::vector<std::string> features; // required1312 | 1313 | {}1314 286 | std::vector<ClientId> followers;1315 | 1316 | {}1317../src/daemon/scheduler.hh:293:8: error: constructor does not initialize these fields: addr, systems, features, running [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1318 293 | struct Worker1319 | ^1320 294 | {1321 295 | std::string addr;1322 | 1323 | {}1324 296 | std::vector<std::string> systems;1325 | 1326 | {}1327 297 | std::vector<std::string> features;1328 | 1329 | {}1330 298 | int32_t maxJobs = 0;1331 299 | bool up = false;1332 300 | bool draining = false;1333 301 | std::vector<DrvId> running;1334 | 1335 | {}1336../src/daemon/scheduler.hh:307:5: error: constructor does not initialize these fields: drvIds, freeIds, workerIds, workers, systems [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1337 307 | explicit Core(Config cfg = {})1338 | ^1339../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1340 317 | auto drvId(std::string_view path) -> DrvId1341 | ^1342 | static 1343../src/daemon/scheduler.hh:323:9: error: variable 'drv' of type 'DrvId' (aka 'unsigned int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]1344 323 | DrvId drv = 0;1345 | ^1346 | const 1347../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1348 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>1349 | ^ ~~~~~1350 | static 1351../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1352 344 | auto workerId(std::string_view addr) -> WorkerId1353 | ^1354 | static 1355../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1356 365 | [[nodiscard]] auto queued() const -> size_t1357 | ^ ~~~~~1358 | static 1359../src/daemon/scheduler.hh:367:9: error: variable 'total' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness,-warnings-as-errors]1360 367 | size_t total = 0;1361 | ^1362 | const 1363../src/daemon/scheduler.hh:385:12: error: constructor does not initialize these fields: drvPath, inputs, system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1364 385 | struct WantInfo1365 | ^1366 386 | {1367 387 | std::string_view drvPath;1368 | 1369 | {}1370 388 | std::vector<std::string_view> inputs;1371 | 1372 | {}1373 389 | std::string_view system;1374 | 1375 | {}1376 390 | std::vector<std::string> features;1377 | 1378 | {}1379../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1380 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult1381 | ^1382 | static 1383../src/daemon/scheduler.hh:398:9: error: variable 'cpHintMs' of type 'double' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1384 398 | auto cpHintMs = info.cpHintMs;1385 | ^1386 | const 1387../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1388 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1389 | ^1390 | static 1391../src/daemon/scheduler.hh:429:17: error: 2 adjacent parameters of 'cancel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1392 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1393 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1394../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'1395 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1396 | ^~~~~~1397../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'1398 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1399 | ^~~~~~~1400../src/daemon/scheduler.hh:429:17: note: 1401 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1402 | ^1403../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')1404 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1405 | ^1406../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1407 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1408 | ^1409 | static 1410../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1411 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1412 | ^1413 | /*unused*/1414../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1415 478 | struct HelloInfo1416 | ^1417 479 | {1418 480 | std::string_view addr;1419 | 1420 | {}1421 481 | std::vector<std::string> systems; // first is the native one1422 | 1423 | {}1424 482 | std::vector<std::string> features;1425 | 1426 | {}1427../src/daemon/scheduler.hh:539:10: error: 2 adjacent parameters of 'done' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1428 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1429 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1430../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'1431 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1432 | ^~~1433../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'1434 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1435 | ^~~~~~~1436../src/daemon/scheduler.hh:539:10: note: 1437 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1438 | ^1439../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')1440 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1441 | ^1442../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1443 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1444 | ^1445 | /*unused*/1446../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1447 610 | struct StatsKey1448 | ^1449 611 | {1450 612 | std::string system;1451 | 1452 | {}1453 613 | std::string features; // sorted, comma-joined1454 | 1455 | {}1456../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1457 704 | void retire(DrvId drv)1458 | ^1459 | static 1460../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1461 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1462 | ^1463 | static 1464../src/daemon/scheduler.hh:716:26: error: 2 adjacent parameters of 'rememberBuilder' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1465 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1466 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1467../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'1468 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1469 | ^~~~1470../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'1471 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1472 | ^~~1473../src/daemon/scheduler.hh:716:26: note: 1474 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1475 | ^1476../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'1477 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1478 | ^1479../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1480 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t1481 | ^ ~~~~~1482 | static 1483../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1484 784 | void refreshFree(WorkerId wid)1485 | ^1486 | static 1487../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1488 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>1489 | ^ ~~~~~1490 | static 1491../src/daemon/scheduler.hh:837:9: error: variable 'score' of type '(lambda at ../src/daemon/scheduler.hh:837:22)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1492 837 | auto score = [&](WorkerId wid, double bytes) -> double {1493 | ^1494 | const 1495../src/daemon/scheduler.hh:865:16: error: narrowing conversion from 'WorkerId' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]1496 865 | return picked;1497 | ^1498../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1499 21 | struct Cached1500 | ^1501 22 | {1502 23 | std::string token;1503 | 1504 | {}1505../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1506 19 | nix::Sync<Cached> cached;1507 | 1508 | {}1509 20 | 1510 21 | static auto mtime(const struct stat & info) -> struct timespec1511 22 | {1512 23 | #ifdef __APPLE__1513 24 | return info.st_mtimespec;1514 25 | #else1515 26 | return info.st_mtim;1516 27 | #endif1517 28 | }1518 29 | 1519 30 | public:1520 31 | explicit TokenFile(std::string path_)1521 | ^1522../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1523 46 | auto get() -> std::string1524 | ^1525 | static 1526../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1527 29 | std::string_view rest;1528 | 1529 | {}1530 30 | 1531 31 | public:1532 32 | explicit Cursor(std::string_view input)1533 | ^1534../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1535 47 | auto take() -> char1536 | ^1537 | static 1538../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1539 52 | char const chr = rest.front();1540 | ^ 1541 | = 01542../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1543 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1544 | ^1545 | static 1546../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1547 69 | auto remaining() -> std::string_view1548 | ^1549 | static 1550../src/daemon/xfcc.hh:150:13: error: variable 'subjectCommonName' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]1551 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1552 | ^1553../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1554 192 | class TrustedProxies1555 | ^1556 193 | {1557 194 | std::vector<std::string> patterns;1558 | 1559 | {}1560../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1561 197 | void add(std::string_view pattern)1562 | ^1563 | static 1564../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1565 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1566 | ^ ~~~~~1567 | static 1568../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1569 81 | void header(const std::string & line)1570 | ^1571 | static 1572../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1573 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1574 | ^1575../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1576 129 | auto perform() -> long1577 | ^1578 | static 1579../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1580 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1581 | ^ ~~~~~1582 | static 1583../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]1584 23 | inline auto logfmtValue(std::string_view value) -> std::string1585 | ^1586../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]1587 52 | enum class LogLevel : std::uint8_t { info, debug };1588 | ^1589../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1590 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {1591 | ^1592 | const1593../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1594 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {1595 | ^1596 | const1597../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1598 298 | bool dynamic = false;1599 | ^1600 | const 1601../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1602 301 | nix::StorePathSet srcs;1603 | ^ 1604 | = 01605../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1606 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {1607 | ^1608 | const1609../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]1610 375 | using EnsureRead = nix::EnsureRead;1611 | ^~~~~~~~~~~~1612>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/auth.cc1613/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found1614/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found1615Error while processing /build/source/src/daemon/auth.cc.1616../src/daemon/acl.hh:22:12: error: enum 'Role' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]1617 22 | enum class Role : std::uint8_t {1618 | ^1619../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1620 51 | class Acl1621 | ^1622 52 | {1623 53 | struct Rule1624 54 | {1625 55 | std::string pattern;1626 56 | Role role;1627 57 | };1628 58 | 1629 59 | std::vector<Rule> rules;1630 | 1631 | {}1632 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1633 61 | std::optional<Role> anonRole;1634 | 1635 | {}1636../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1637 53 | struct Rule1638 | ^1639 54 | {1640 55 | std::string pattern;1641 | 1642 | {}1643../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1644 70 | void addRule(std::string_view spec)1645 | ^1646 | static 1647../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1648 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1649 | ^ ~~~~~1650 | static 1651../src/daemon/auth.cc:17:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1652 17 | #include "oidc.hh"1653 | ^~~~~~~~~~~~~~~~~~1654 18 | #include "xfcc.hh"1655../src/daemon/auth.cc:18:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1656 18 | #include "xfcc.hh"1657 | ^~~~~~~~~~~~~~~~~~1658 19 | 1659../src/daemon/auth.cc:25:12: error: method 'identify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1660 25 | auto Auth::identify(const grpc::ServerContextBase & context) const -> Caller1661 | ^ ~~~~~1662../src/daemon/auth.cc:50:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1663 50 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole) -> grpc::Status1664 | ^1665 | static 1666../src/daemon/auth.cc:78:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1667 78 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole, uint32_t buildMode) -> grpc::Status1668 | ^1669 | static 1670/build/source/build/../src/daemon/auth.hh:5:10: error: 'cstdint' file not found [clang-diagnostic-error]1671 5 | #include <cstdint>1672 | ^~~~~~~~~1673/build/source/build/../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1674 19 | struct Caller1675 | ^1676 20 | {1677 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1678 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics1679 23 | std::optional<Role> role;1680 | 1681 | {}1682/build/source/build/../src/daemon/auth.hh:21:16: error: enum 'Kind' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]1683 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1684 | ^1685../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1686 60 | struct Identity1687 | ^1688 61 | {1689 62 | std::string subject; // "oidc:<provider>:<sub>"1690 | 1691 | {}1692 63 | std::optional<Role> role; // nullopt: verified but no rule matched1693 | 1694 | {}1695../src/daemon/oidc.hh:76:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]1696 76 | } catch (...) {1697 | ^1698../src/daemon/oidc.hh:123:26: error: 2 adjacent parameters of 'providerFrom' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1699 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1700 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1701../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1702 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1703 | ^~~~1704../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1705 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1706 | ^~~~1707../src/daemon/oidc.hh:191:25: error: 2 adjacent parameters of 'lookupClaim' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1708 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1709 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1710../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1711 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1712 | ^~~~~~1713../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1714 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1715 | ^~~~1716../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1717 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1718 | ^1719../src/daemon/oidc.hh:251:8: error: constructor does not initialize these fields: kid, kty, crv, pem [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1720 251 | struct Jwk1721 | ^1722 252 | {1723 253 | std::string kid;1724 | 1725 | {}1726 254 | std::string kty;1727 | 1728 | {}1729 255 | std::string crv;1730 | 1731 | {}1732 256 | std::string pem;1733 | 1734 | {}1735../src/daemon/oidc.hh:294:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]1736 294 | } catch (...) {1737 | ^1738../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1739 300 | struct FixedClock1740 | ^1741 301 | {1742 302 | std::chrono::system_clock::time_point at;1743 | 1744 | {}1745../src/daemon/oidc.hh:311:22: error: variable 'verifier' of type 'int &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1746 311 | inline auto allowKey(VerifierBuilder & verifier, const std::string & alg, const Jwk & key) -> bool1747 | ^1748 | const1749../src/daemon/oidc.hh:315:5: error: variable 'ecc' of type '(lambda at ../src/daemon/oidc.hh:315:16)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1750 315 | auto ecc = [&](std::string_view crv) -> bool { return key.kty == "EC" && key.crv == crv; };1751 | ^1752 | const 1753../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1754 347 | struct Result1755 | ^1756 348 | {1757 349 | std::optional<Identity> identity;1758 | 1759 | {}1760 350 | std::string error; // for logs, not for the client1761 | 1762 | {}1763../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1764 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)1765 | ^1766../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1767 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1768 | ^1769 | static 1770../src/daemon/oidc.hh:363:17: error: 2 adjacent parameters of 'verify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1771 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1772 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1773../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'1774 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1775 | ^~~~~1776../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'1777 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1778 | ^~~1779../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values1780 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1781 | ^1782../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1783 377 | struct KeySet1784 | ^1785 378 | {1786 379 | std::mutex lock;1787 | 1788 | {}1789 380 | std::vector<Jwk> keys;1790 | 1791 | {}1792 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".1793 382 | std::optional<std::chrono::steady_clock::time_point> fetched;1794 | 1795 | {}1796../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1797 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json1798 | ^ ~~~~~1799 | static 1800../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1801 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>1802 | ^ ~~~~~1803 | static 1804../src/daemon/oidc.hh:442:9: error: 2 adjacent parameters of 'fetchDue' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1805 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1806 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1807 443 | std::chrono::steady_clock::time_point now,1808 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1809../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'1810 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1811 | ^~~~~~~1812../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'1813 443 | std::chrono::steady_clock::time_point now,1814 | ^~~1815../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1816 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1817 | ^1818 | static 1819../src/daemon/oidc.hh:456:62: error: 2 adjacent parameters of 'candidates' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1820 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1821 | ^~~~~~~~~~~~~~~~~~~~~~1822 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1823 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1824../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'1825 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1826 | ^~~~~1827../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'1828 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1829 | ^~~1830../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values1831 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1832 | ^1833../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1834 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1835 | ^1836 | static 1837../src/daemon/oidc.hh:493:19: error: 2 adjacent parameters of 'doVerify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1838 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1839 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1840../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'1841 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1842 | ^~~~~1843../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'1844 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1845 | ^~~1846../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1847 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1848 | ^1849../src/daemon/oidc.hh:521:55: error: initializer list should have a trailing comma [readability-trailing-comma,-warnings-as-errors]1850 521 | .error = role ? "" : "no rule matched"};1851 | ^1852 | ,1853../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1854 29 | std::string_view rest;1855 | 1856 | {}1857 30 | 1858 31 | public:1859 32 | explicit Cursor(std::string_view input)1860 | ^1861../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1862 47 | auto take() -> char1863 | ^1864 | static 1865../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1866 52 | char const chr = rest.front();1867 | ^ 1868 | = 01869../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1870 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1871 | ^1872 | static 1873../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1874 69 | auto remaining() -> std::string_view1875 | ^1876 | static 1877../src/daemon/xfcc.hh:150:13: error: variable 'subjectCommonName' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]1878 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1879 | ^1880../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1881 192 | class TrustedProxies1882 | ^1883 193 | {1884 194 | std::vector<std::string> patterns;1885 | 1886 | {}1887../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1888 197 | void add(std::string_view pattern)1889 | ^1890 | static 1891../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1892 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1893 | ^ ~~~~~1894 | static 1895../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1896 81 | void header(const std::string & line)1897 | ^1898 | static 1899../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1900 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1901 | ^1902../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1903 129 | auto perform() -> long1904 | ^1905 | static 1906../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1907 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1908 | ^ ~~~~~1909 | static 1910../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]1911 23 | inline auto logfmtValue(std::string_view value) -> std::string1912 | ^1913../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]1914 52 | enum class LogLevel : std::uint8_t { info, debug };1915 | ^1916>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/oidc-test.cc1917/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found1918/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found1919Error while processing /build/source/tests/oidc-test.cc.1920../src/daemon/acl.hh:22:12: error: enum 'Role' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]1921 22 | enum class Role : std::uint8_t {1922 | ^1923../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1924 51 | class Acl1925 | ^1926 52 | {1927 53 | struct Rule1928 54 | {1929 55 | std::string pattern;1930 56 | Role role;1931 57 | };1932 58 | 1933 59 | std::vector<Rule> rules;1934 | 1935 | {}1936 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1937 61 | std::optional<Role> anonRole;1938 | 1939 | {}1940../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1941 53 | struct Rule1942 | ^1943 54 | {1944 55 | std::string pattern;1945 | 1946 | {}1947../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1948 70 | void addRule(std::string_view spec)1949 | ^1950 | static 1951../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1952 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1953 | ^ ~~~~~1954 | static 1955../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1956 60 | struct Identity1957 | ^1958 61 | {1959 62 | std::string subject; // "oidc:<provider>:<sub>"1960 | 1961 | {}1962 63 | std::optional<Role> role; // nullopt: verified but no rule matched1963 | 1964 | {}1965../src/daemon/oidc.hh:76:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]1966 76 | } catch (...) {1967 | ^1968../src/daemon/oidc.hh:123:26: error: 2 adjacent parameters of 'providerFrom' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1969 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1970 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1971../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1972 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1973 | ^~~~1974../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1975 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1976 | ^~~~1977../src/daemon/oidc.hh:191:25: error: 2 adjacent parameters of 'lookupClaim' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1978 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1979 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1980../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1981 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1982 | ^~~~~~1983../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1984 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1985 | ^~~~1986../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1987 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1988 | ^1989../src/daemon/oidc.hh:251:8: error: constructor does not initialize these fields: kid, kty, crv, pem [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1990 251 | struct Jwk1991 | ^1992 252 | {1993 253 | std::string kid;1994 | 1995 | {}1996 254 | std::string kty;1997 | 1998 | {}1999 255 | std::string crv;2000 | 4734/build/source/build/../src/client/store.hh:610:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4735 610 | ~GrpcStore() override4736 | ^4737/build/source/build/../src/client/store.hh:616:24: error: rvalue reference parameter 'pathsToCopy' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved,-warnings-as-errors]4738 616 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override4739 | ^4740/build/source/build/../src/client/store.hh:630:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4741 626 | std::unique_ptr<Source> upstream;4742 | 4743 | {}4744 627 | AutoCloseFD fd;4745 628 | bool complete = false;4746 629 | 4747 630 | explicit ReplayableNar(std::unique_ptr<Source> src)4748 | ^4749/build/source/build/../src/client/store.hh:642:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4750 642 | LambdaSink tee([&](std::string_view data) -> void {4751 | ^4752 | const 4753/build/source/build/../src/client/store.hh:664:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4754 664 | FdSource replay(fd.get());4755 | ^4756 | const 4757../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4758 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {4759 | ^4760 | const4761../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4762 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {4763 | ^4764 | const4765../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4766 298 | bool dynamic = false;4767 | ^4768 | const 4769../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4770 301 | nix::StorePathSet srcs;4771 | ^ 4772 | = 04773../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4774 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {4775 | ^4776 | const4777../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]4778 375 | using EnsureRead = nix::EnsureRead;4779 | ^~~~~~~~~~~~4780../src/path-info-wire.hh:21:96: error: pointee of variable 'out' of type 'nix::remote::PathInfo *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4781 21 | inline void encodePathInfo(const nix::StoreDirConfig & store, const nix::ValidPathInfo & info, nix::remote::PathInfo * out)4782 | ^4783 | const4784../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4785 24 | nix::StringSink sink;4786 | ^4787 | const 4788../src/pump.hh:44:39: error: variable 'pipe' of type 'nix::Pipe &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4789 44 | inline void growPipe([[maybe_unused]] nix::Pipe & pipe)4790 | ^4791 | const4792../src/pump.hh:65:27: error: 2 adjacent parameters of 'readCoalesced' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]4793 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4794 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4795../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'4796 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4797 | ^~~~~~~~4798../src/pump.hh:65:57: note: the last parameter in the range is 'buf'4799 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4800 | ^~~4801../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4802 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);4803 | ^ 4804 | = 04805../src/pump.hh:77:52: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4806 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4807 | ^4808../src/pump.hh:77:59: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4809 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4810 | ^4811../src/pump.hh:90:41: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4812 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch4813 | ^4814../src/pump.hh:95:48: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4815 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4816 | ^4817../src/pump.hh:95:55: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4818 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4819 | ^4820../src/pump.hh:97:33: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]4821 97 | return static_cast<ssize_t>(got);4822 | ^4823../src/pump.hh:155:56: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]4824 155 | zstdCompressInto(*cctx, out, zin, directive, []() -> void {});4825 | ^~4826../src/pump.hh:233:78: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]4827 233 | zstdCompressInto(*cctx, *msg.mutable_data(), input, directive, [this]() -> void { ship(); });4828 | ^~4829>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/transfer.cc4830/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found4831/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found4832Error while processing /build/source/src/client/transfer.cc.4833../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4834 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}4835 | ^4836../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4837 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}4838 | ^4839 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)4840 64 | -> grpc::experimental::Interceptor * override {4841 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it4842 66 | }4843 67 | private:4844 68 | std::shared_ptr<const Headers> headers;4845 | 4846 | {}4847../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4848 77 | std::string path;4849 | 4850 | {}4851 78 | 4852 79 | public:4853 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}4854 | ^4855../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4856 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,4857 | ^4858 | static 4859../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]4860 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {4861 | ^4862 | const 4863../src/client/channel.hh:95:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]4864 95 | } catch (std::exception & err) {4865 | ^4866../src/client/nar-fetcher.hh:54:5: error: constructor does not initialize these fields: mutex, grown, failure [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4867 47 | std::mutex mutex;4868 | 4869 | {}4870 48 | std::condition_variable grown;4871 | 4872 | {}4873 49 | uint64_t written = 0;4874 50 | bool eof = false;4875 51 | std::exception_ptr failure;4876 | 4877 | {}4878 52 | 4879 53 | public:4880 54 | NarSpool()4881 | ^4882../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4883 95 | void fail(const std::exception_ptr & cause)4884 | ^4885 | static 4886../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4887 142 | inline void demuxNarFrames(Reader & reader, const std::vector<std::shared_ptr<NarSpool>> & targets)4888 | ^4889 | /*unused*/4890../src/client/nar-fetcher.hh:172:5: error: constructor does not initialize these fields: authority, connections, narMutex, pending, narSizes [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4891 172 | NarFetcher(4892 | ^4893../src/client/nar-fetcher.hh:172:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [cppcoreguidelines-explicit-constructor,misc-explicit-constructor,-warnings-as-errors]4894 172 | NarFetcher(4895 | ^4896 | explicit 4897../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4898 173 | std::function<std::shared_ptr<grpc::Channel>()> channelFactory,4899 | ^4900 | /*unused*/4901../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4902 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4903 | ^4904 | static 4905../src/client/nar-fetcher.hh:187:22: error: 2 adjacent parameters of 'recordOrder' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]4906 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4907 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4908../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order'4909 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4910 | ^~~~~4911../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes'4912 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4913 | ^~~~~4914../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4915 224 | ~NarFetcher()4916 | ^4917../src/client/nar-fetcher.hh:233:11: error: constructor does not initialize these fields: stub, reader, thread [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4918 233 | class Session4919 | ^4920 234 | {4921 235 | friend class NarFetcher;4922 236 | 4923 237 | std::unique_ptr<nix::remote::NixRemote::Stub> stub;4924 | 4925 | {}4926 238 | grpc::ClientContext ctx;4927 239 | std::unique_ptr<grpc::ClientReader<nix::remote::NarFrame>> reader;4928 | 4929 | {}4930 240 | std::vector<std::shared_ptr<NarSpool>> targets;4931 241 | std::jthread thread;4932 | 4933 | {}4934../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4935 243 | void run()4936 | ^4937 | static 4938../src/client/nar-fetcher.hh:254:15: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]4939 254 | } catch (...) {4940 | ^4941../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4942 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t4943 | ^ ~~~~~4944 | static 4945../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4946 279 | void startPending()4947 | ^4948 | static 4949../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4950 304 | void startSession(const std::vector<nix::StorePath> & paths)4951 | ^4952 | static 4953../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error]4954 6 | #include <algorithm>4955 | ^~~~~~~~~~~4956../src/client/store.hh:170:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [cppcoreguidelines-explicit-constructor,misc-explicit-constructor,-warnings-as-errors]4957 170 | GrpcStoreConfig(const Params & params)4958 | ^4959 | explicit 4960../src/client/store.hh:199:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4961 199 | auto getReference() const -> StoreReference override {4962 | ^4963 | [[nodiscard]] 4964../src/client/store.hh:210:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4965 210 | auto openStore() const -> ref<Store> override;4966 | ^4967 | [[nodiscard]] 4968../src/client/store.hh:254:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4969 254 | auto connectHint(const std::string & msg) const -> std::string4970 | ^4971 | [[nodiscard]] 4972../src/client/store.hh:263:15: error: throwing an exception whose type 'Error' is not derived from 'std::exception' [bugprone-std-exception-baseclass,-warnings-as-errors]4973 263 | throw statusError(status, opName);4974 | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~4975/nix/store/1snx32pjy869cfwainr1b6ff4h3lv6j2-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/error.hh:312:1: note: type defined here4976 312 | MakeError(Error, BaseError);4977 | ^4978/nix/store/1snx32pjy869cfwainr1b6ff4h3lv6j2-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/error.hh:305:5: note: expanded from macro 'MakeError'4979 305 | class newClass : public CloneableError<newClass, superClass> \4980 | ^4981../src/client/store.hh:329:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4982 329 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message()));4983 | ^4984/nix/store/1snx32pjy869cfwainr1b6ff4h3lv6j2-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4985 365 | #define printError(args...) printMsg(lvlError, args)4986 | ^4987/nix/store/1snx32pjy869cfwainr1b6ff4h3lv6j2-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4988 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4989 | ^4990/nix/store/1snx32pjy869cfwainr1b6ff4h3lv6j2-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4991 357 | do { \4992 | ^4993../src/client/store.hh:349:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4994 345 | std::shared_ptr<Store> evalStore;4995 | 4996 | {}4997 346 | ref<Builder> inner;4998 347 | 4999 348 | public:5000 349 | GrpcBuilder(GrpcStore * store, std::shared_ptr<Store> evalStore,5001 | ^5002../src/client/store.hh:407:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5003 402 | std::string text;5004 | 5005 | {}5006 403 | std::vector<Logger::Field> fields;5007 | 5008 | {}5009 404 | std::optional<Activity> act;5010 | 5011 | {}5012 405 | 5013 406 | public:5014 407 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)5015 | ^5016../src/client/store.hh:407:24: error: 2 adjacent parameters of 'BuildLogActivity' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5017 407 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)5018 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5019../src/client/store.hh:407:36: note: the first parameter in the range is 'text'5020 407 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)5021 | ^~~~5022../src/client/store.hh:407:69: note: the last parameter in the range is 'fields'5023 407 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)5024 | ^~~~~~5025../src/client/store.hh:417:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5026 417 | if (msg.has_log_line()) {5027 | ^5028../src/client/store.hh:419:11: note: else branch starts here5029 419 | } else {5030 | ^5031../src/client/store.hh:463:12: error: constructor does not initialize these fields: dependants, inputs, failedInput, result, workerAddr, redirectAddr, unplaceableSince, unplaceableReason [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5032 463 | struct Job {5033 | ^5034 464 | StorePath drvPath;5035 465 | BasicDerivation drv;5036 466 | std::vector<Job *> dependants;5037 | 5038 | {}5039 467 | std::vector<Job *> inputs;5040 | 5041 | {}5042 468 | size_t waiting = 0;5043 469 | uint64_t cpHintMs = 0;5044 470 | unsigned bounced = 0;5045 471 | std::optional<StorePath> failedInput;5046 | 5047 | {}5048 472 | std::optional<BuildResult> result;5049 | 5050 | {}5051 473 | // Set by the reader thread, consumed by a build thread.5052 474 | std::string workerAddr;5053 | 5054 | {}5055 475 | uint64_t assignId = 0;5056 476 | // A second Assigned while building: the scheduler moved the drv to a5057 477 | // worker that was already at it. Followed when the current one bounces.5058 478 | std::string redirectAddr;5059 | 5060 | {}5061../src/client/store.hh:554:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5062 554 | struct Connection : RemoteStore::Connection5063 | ^5064 555 | {5065 556 | private:5066 557 | friend struct GrpcStore;5067 558 | 5068 559 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the5069 560 | // gRPC stream to a pair of pipes with pump threads. This keeps the5070 561 | // blocking, ordered semantics the worker protocol relies on without5071 562 | // reimplementing Source/Sink on top of gRPC.5072 563 | grpc::ClientContext ctx;5073 564 | std::unique_ptr<GrpcStream> stream;5074 | 5075 | {}5076 565 | 5077 566 | Pipe toRemote; // plugin writes → reader thread sends over gRPC5078 567 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads5079 568 | 5080 569 | std::jthread reader;5081 | 5082 | {}5083../src/client/store.hh:610:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]5084 610 | ~GrpcStore() override5085 | ^5086../src/client/store.hh:616:24: error: rvalue reference parameter 'pathsToCopy' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved,-warnings-as-errors]5087 616 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override5088 | ^5089../src/client/store.hh:630:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5090 626 | std::unique_ptr<Source> upstream;5091 | 5092 | {}5093 627 | AutoCloseFD fd;5094 628 | bool complete = false;5095 629 | 5096 630 | explicit ReplayableNar(std::unique_ptr<Source> src)5097 | ^5098../src/client/store.hh:642:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5099 642 | LambdaSink tee([&](std::string_view data) -> void {5100 | ^5101 | const 5102../src/client/store.hh:664:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5103 664 | FdSource replay(fd.get());5104 | ^5105 | const 5106../src/client/transfer.cc:21:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors]5107 21 | #include <grpcpp/support/sync_stream.h>5108 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5109 22 | 5110../src/client/transfer.cc:24:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5111 24 | #include <nix/store/derived-path.hh>5112 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5113 25 | #include <nix/store/path-info.hh>5114../src/client/transfer.cc:28:1: error: included header worker-protocol.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5115 28 | #include <nix/store/worker-protocol.hh>5116 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5117 29 | #include <nix/util/error.hh>5118../src/client/transfer.cc:29:1: error: included header error.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5119 29 | #include <nix/util/error.hh>5120 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5121 30 | #include <nix/util/logging.hh>5122../src/client/transfer.cc:32:1: error: included header serialise.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5123 32 | #include <nix/util/serialise.hh>5124 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5125 33 | #include <nix/util/util.hh>5126../src/client/transfer.cc:33:1: error: included header util.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5127 33 | #include <nix/util/util.hh>5128 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~5129 34 | 5130../src/client/transfer.cc:36:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]5131 36 | #include "nix_remote.grpc.pb.h"5132 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5133 37 | #include "nix_remote.pb.h"5134../src/client/transfer.cc:38:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5135 38 | #include "path-info-wire.hh"5136 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5137 39 | #include "pump.hh"5138../src/client/transfer.cc:39:1: error: included header pump.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5139 39 | #include "pump.hh"5140 | ^~~~~~~~~~~~~~~~~~5141 40 | 5142../src/client/transfer.cc:51:34: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5143 51 | retrying("QueryValidPaths", [&]() -> grpc::Status {5144 | ^~5145../src/client/transfer.cc:57:16: error: variable 'res' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5146 57 | StorePathSet res;5147 | ^ 5148 | = 05149../src/client/transfer.cc:66:3: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5150 66 | grpc::ClientContext ctx;5151 | ^5152 | const 5153../src/client/transfer.cc:67:3: error: variable 'request' of type 'remote::QueryMissingRequest' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5154 67 | remote::QueryMissingRequest request;5155 | ^5156 | const 5157../src/client/transfer.cc:71:3: error: variable 'reply' of type 'remote::QueryMissingReply' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5158 71 | remote::QueryMissingReply reply;5159 | ^5160 | const 5161../src/client/transfer.cc:101:33: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5162 101 | retrying("QueryPathInfos", [&]() -> grpc::Status {5163 | ^~5164../src/client/transfer.cc:102:5: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5165 102 | grpc::ClientContext ctx;5166 | ^5167 | const 5168../src/client/transfer.cc:136:17: error: method 'runInfoBatches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5169 136 | void GrpcStore::runInfoBatches(const std::stop_token & stop)5170 | ^5171 | static 5172../src/client/transfer.cc:147:22: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5173 147 | StorePathSet paths;5174 | ^ 5175 | = 05176../src/client/transfer.cc:172:17: error: method 'queryPathInfoUncached' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5177 172 | void GrpcStore::queryPathInfoUncached(const StorePath & path, InfoCallback callback) noexcept {5178 | ^5179 | static 5180../src/client/transfer.cc:206:39: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5181 206 | retrying("AddMultipleToStore", [&]() -> grpc::Status {5182 | ^~5183../src/client/transfer.cc:211:17: error: variable 'addMultipleToStoreOnce' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]5184 211 | auto GrpcStore::addMultipleToStoreOnce(5185 | ^5186 | static 5187../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5188 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {5189 | ^5190 | const5191../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5192 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {5193 | ^5194 | const5195../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5196 298 | bool dynamic = false;5197 | ^5198 | const 5199../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5200 301 | nix::StorePathSet srcs;5201 | ^ 5202 | = 05203../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5204 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {5205 | ^5206 | const5207../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]5208 375 | using EnsureRead = nix::EnsureRead;5209 | ^~~~~~~~~~~~5210../src/path-info-wire.hh:21:96: error: pointee of variable 'out' of type 'nix::remote::PathInfo *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5211 21 | inline void encodePathInfo(const nix::StoreDirConfig & store, const nix::ValidPathInfo & info, nix::remote::PathInfo * out)5212 | ^5213 | const5214../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5215 24 | nix::StringSink sink;5216 | ^5217 | const 5218../src/pump.hh:44:39: error: variable 'pipe' of type 'nix::Pipe &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5219 44 | inline void growPipe([[maybe_unused]] nix::Pipe & pipe)5220 | ^5221 | const5222../src/pump.hh:65:27: error: 2 adjacent parameters of 'readCoalesced' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5223 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5224 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5225../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'5226 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5227 | ^~~~~~~~5228../src/pump.hh:65:57: note: the last parameter in the range is 'buf'5229 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5230 | ^~~5231../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5232 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);5233 | ^ 5234 | = 05235../src/pump.hh:77:52: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5236 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;5237 | ^5238../src/pump.hh:77:59: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5239 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;5240 | ^5241../src/pump.hh:90:41: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5242 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch5243 | ^5244../src/pump.hh:95:48: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5245 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;5246 | ^5247../src/pump.hh:95:55: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5248 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;5249 | ^5250../src/pump.hh:97:33: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]5251 97 | return static_cast<ssize_t>(got);5252 | ^5253../src/pump.hh:155:56: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5254 155 | zstdCompressInto(*cctx, out, zin, directive, []() -> void {});5255 | ^~5256../src/pump.hh:233:78: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5257 233 | zstdCompressInto(*cctx, *msg.mutable_data(), input, directive, [this]() -> void { ship(); });5258 | ^~5259>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/coordinator.cc5260/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found5261/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found5262Error while processing /build/source/src/daemon/coordinator.cc.5263../src/build-log.hh:42:41: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]5264 42 | constexpr size_t kMaxLogString = 1UL << 20;5265 | ~~ ^~5266../src/build-log.hh:46:27: error: variable 'source' of type 'nix::Source &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5267 46 | inline auto readLogFields(nix::Source & source) -> std::vector<std::string>5268 | ^5269 | const5270../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5271 66 | struct BuildEvent5272 | ^5273 67 | {5274 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;5275 69 | std::string text;5276 | 5277 | {}5278../src/build-log.hh:68:16: error: enum 'Kind' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]5279 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;5280 | ^5281../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5282 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}5283 | ^5284../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5285 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}5286 | ^5287 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)5288 64 | -> grpc::experimental::Interceptor * override {5289 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it5290 66 | }5291 67 | private:5292 68 | std::shared_ptr<const Headers> headers;5293 | 5294 | {}5295../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5296 77 | std::string path;5297 | 5298 | {}5299 78 | 5300 79 | public:5301 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}5302 | ^5303../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5304 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,5305 | ^5306 | static 5307../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]5308 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {5309 | ^5310 | const 5311../src/daemon/acl.hh:22:12: error: enum 'Role' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]5312 22 | enum class Role : std::uint8_t {5313 | ^5314../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5315 51 | class Acl5316 | ^5317 52 | {5318 53 | struct Rule5319 54 | {5320 55 | std::string pattern;5321 56 | Role role;5322 57 | };5323 58 | 5324 59 | std::vector<Rule> rules;5325 | 5326 | {}5327 60 | // Separate from the glob rules so '*' cannot grant anonymous access.5328 61 | std::optional<Role> anonRole;5329 | 5330 | {}5331../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5332 53 | struct Rule5333 | ^5334 54 | {5335 55 | std::string pattern;5336 | 5337 | {}5338../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5339 70 | void addRule(std::string_view spec)5340 | ^5341 | static 5342../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5343 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>5344 | ^ ~~~~~5345 | static 5346../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5347 19 | struct Caller5348 | ^5349 20 | {5350 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5351 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics5352 23 | std::optional<Role> role;5353 | 5354 | {}5355../src/daemon/auth.hh:21:16: error: enum 'Kind' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]5356 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5357 | ^5358../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5359 53 | struct Backends5360 | ^5361 54 | {5362 55 | std::string socketPath;5363 | 5364 | {}5365../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5366 40 | std::optional<Remote> remote;5367 | 5368 | {}5369 41 | 5370 42 | public:5371 43 | explicit Cache(const Niks3Config & cfg)5372 | ^5373../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5374 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>5375 | ^5376 | static 5377../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5378 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5379 | ^5380 | static 5381../src/daemon/cache.hh:87:18: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5382 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5383 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5384../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'5385 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5386 | ^~~~~5387../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'5388 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5389 | ^~~~~~~~~5390../src/daemon/cache.hh:103:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5391 103 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const5392 | ^ ~~~~~5393 | static 5394../src/daemon/coordinator.cc:25:1: error: included header create_channel.h is not used directly [misc-include-cleaner,-warnings-as-errors]5395 25 | #include <grpcpp/create_channel.h>5396 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5397 26 | #include <grpcpp/health_check_service_interface.h>5398../src/daemon/coordinator.cc:27:1: error: included header credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]5399 27 | #include <grpcpp/security/credentials.h>5400 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5401 28 | #include <grpcpp/security/tls_certificate_provider.h>5402../src/daemon/coordinator.cc:28:1: error: included header tls_certificate_provider.h is not used directly [misc-include-cleaner,-warnings-as-errors]5403 28 | #include <grpcpp/security/tls_certificate_provider.h>5404 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5405 29 | #include <grpcpp/security/tls_credentials_options.h>5406../src/daemon/coordinator.cc:34:1: error: included header status.h is not used directly [misc-include-cleaner,-warnings-as-errors]5407 34 | #include <grpcpp/support/status.h>5408 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5409 35 | #include <grpcpp/support/sync_stream.h>5410../src/daemon/coordinator.cc:35:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors]5411 35 | #include <grpcpp/support/sync_stream.h>5412 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5413 36 | 5414../src/daemon/coordinator.cc:38:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5415 38 | #include <nix/util/file-system.hh>5416 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5417 39 | 5418../src/daemon/coordinator.cc:43:1: error: included header cache.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5419 43 | #include "cache.hh"5420 | ^~~~~~~~~~~~~~~~~~~5421 44 | #include "client/channel.hh"5422../src/daemon/coordinator.cc:44:1: error: included header channel.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5423 44 | #include "client/channel.hh"5424 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5425 45 | #include "logfmt.hh"5426../src/daemon/coordinator.cc:47:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]5427 47 | #include "nix_remote.grpc.pb.h"5428 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5429 48 | #include "nix_remote.pb.h"5430../src/daemon/coordinator.cc:69:1: error: constructor does not initialize these fields: state, sendFn [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5431 69 | Builder::Builder(const Options & options, Metrics & metrics)5432 | ^5433../src/daemon/coordinator.cc:90:15: error: method 'onRevoke' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5434 90 | void Builder::onRevoke(const nix::remote::Revoke & rev)5435 | ^5436../src/daemon/coordinator.cc:111:15: error: method 'admit' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5437 111 | auto Builder::admit(const std::string & drvPath) -> std::optional<Admission>5438 | ^5439 | static 5440../src/daemon/coordinator.cc:124:15: error: method 'finished' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5441 124 | void Builder::finished(5442 | ^5443 | static 5444../src/daemon/coordinator.cc:127:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5445 127 | const std::vector<std::pair<std::string, uint64_t>> & outputs,5446 | ^5447 | /*unused*/5448../src/daemon/coordinator.cc:151:5: error: 2 adjacent parameters of 'sendDone' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5449 151 | const std::string & drvPath,5450 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5451 152 | uint64_t assignId,5452 | ~~~~~~~~~~~~~~~~~5453../src/daemon/coordinator.cc:151:25: note: the first parameter in the range is 'drvPath'5454 151 | const std::string & drvPath,5455 | ^~~~~~~5456../src/daemon/coordinator.cc:152:14: note: the last parameter in the range is 'assignId'5457 152 | uint64_t assignId,5458 | ^~~~~~~~5459../src/daemon/coordinator.cc:151:5: note: 5460 151 | const std::string & drvPath,5461 | ^5462../src/daemon/coordinator.cc:152:5: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5463 152 | uint64_t assignId,5464 | ^5465../src/daemon/coordinator.cc:152:5: note: 'const int &' and 'uint64_t' may be implicitly converted: 'const int &' (as 'int') -> 'uint64_t' (as 'unsigned long'), 'uint64_t' (as 'unsigned long') -> 'const int &' (as 'int')5466../src/daemon/coordinator.cc:154:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5467 154 | const std::vector<std::pair<std::string, uint64_t>> & outputs)5468 | ^5469 | /*unused*/5470../src/daemon/coordinator.cc:175:5: error: pointee of variable 'hel' of type '::nix::remote::Hello *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5471 175 | auto * hel = msg.mutable_hello();5472 | ^5473 | const5474../src/daemon/coordinator.cc:194:15: error: method 'setDraining' can be made const [readability-make-member-function-const,-warnings-as-errors]5475 194 | void Builder::setDraining(bool draining)5476 | ^ 5477 | const5478../src/daemon/coordinator.cc:209:15: error: method 'send' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5479 209 | auto Builder::send(const WorkerMsg & msg) const -> bool5480 | ^ ~~~~~5481../src/daemon/coordinator.cc:215:15: error: method 'tick' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5482 215 | void Builder::tick()5483 | ^5484../src/daemon/coordinator.cc:291:5: error: variable 'tls' of type 'grpc::experimental::TlsChannelCredentialsOptions' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5485 291 | grpc::experimental::TlsChannelCredentialsOptions tls;5486 | ^5487 | const 5488../src/daemon/coordinator.cc:295:24: error: no header providing "nix::Error" is directly included [misc-include-cleaner,-warnings-as-errors]5489 47 | throw nix::Error("loading CA certificates: %s", status.ToString());5490 | ^5491../src/daemon/coordinator.cc:320:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5492 320 | if (active) {5493 | ^5494../src/daemon/coordinator.cc:322:7: note: else branch starts here5495 322 | } else {5496 | ^5497../src/daemon/coordinator.cc:339:1: error: constructor does not initialize these fields: builder, dispatcher, scheduler, sessionThread, elector [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5498 339 | Coordinator::Coordinator(const Options & options, Auth & auth, Metrics & metrics)5499 | ^5500../src/daemon/coordinator.cc:414:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5501 414 | if (options.schedulerAddr.empty()) {5502 | ^5503../src/daemon/coordinator.cc:416:7: note: else branch starts here5504 416 | } else {5505 | ^5506../src/daemon/coordinator.cc:450:53: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]5507 450 | const std::stop_callback onStop(stop, [&ctx]() -> void { ctx.TryCancel(); });5508 | ^~5509../src/daemon/coordinator.cc:452:9: error: variable 'restarting' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5510 452 | bool restarting = false;5511 | ^5512 | const 5513/build/source/build/../src/daemon/coordinator.hh:5:10: error: 'atomic' file not found [clang-diagnostic-error]5514 5 | #include <atomic>5515 | ^~~~~~~~5516/build/source/build/../src/daemon/coordinator.hh:45:8: error: constructor does not initialize these fields: since [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5517 45 | struct Expected5518 | ^5519 46 | {5520 47 | uint64_t assignId = 0;5521 48 | Clock::time_point since;5522 | 5523 | {}5524/build/source/build/../src/daemon/coordinator.hh:52:12: error: constructor does not initialize these fields: mutex, cv, resultWire [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5525 52 | struct Shared5526 | ^5527 53 | {5528 54 | std::mutex mutex;5529 | 5530 | {}5531 55 | std::condition_variable cv;5532 | 5533 | {}5534 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along5535 57 | bool finished = false;5536 58 | std::string resultWire; // BuildDerivationDone serialised5537 | 5538 | {}5539/build/source/build/../src/daemon/coordinator.hh:79:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5540 79 | struct Admission5541 | ^5542 80 | {5543 81 | std::shared_ptr<Expected::Shared> shared;5544 | 5545 | {}5546/build/source/build/../src/daemon/coordinator.hh:90:9: error: parameter 3 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]5547 90 | const std::vector<std::pair<std::string, uint64_t>> & outputs,5548 | ^~~~~5549/build/source/build/../src/daemon/coordinator.hh:94:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5550 94 | auto hello() const -> nix::remote::WorkerMsg;5551 | ^5552 | [[nodiscard]] 5553/build/source/build/../src/daemon/coordinator.hh:107:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5554 107 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;5555 | ^5556 | [[nodiscard]] 5557/build/source/build/../src/daemon/coordinator.hh:110:21: error: member 'options' of type 'const Options &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]5558 110 | const Options & options;5559 | ^5560/build/source/build/../src/daemon/coordinator.hh:111:15: error: member 'metrics' of type 'Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]5561 111 | Metrics & metrics;5562 | ^5563/build/source/build/../src/daemon/coordinator.hh:113:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5564 113 | struct State5565 | ^5566 114 | {5567 115 | std::unordered_map<std::string, Expected> expected;5568 | 5569 | {}5570/build/source/build/../src/daemon/coordinator.hh:127:9: error: parameter 4 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]5571 127 | const std::vector<std::pair<std::string, uint64_t>> & outputs);5572 | ^~~~~5573../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5574 45 | struct Config5575 | ^5576 46 | {5577 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system5578 | 5579 | {}5580 48 | PresentFn present; // unset: nothing is ever Cached5581 | 5582 | {}5583../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5584 64 | struct Client5585 | ^5586 65 | {5587 66 | sched::ClientId id = 0;5588 67 | ClientSend send;5589 | 5590 | {}5591../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5592 80 | struct Worker5593 | ^5594 81 | {5595 82 | WorkerSend send;5596 | 5597 | {}5598 83 | std::optional<sched::WorkerId> id;5599 | 5600 | {}5601../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5602 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &5603 | ^5604 | [[nodiscard]] 5605/nix/store/9nb5n3dzcfqlf3fzahrkamqzpjazy5lh-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'5606 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))5607 | ^5608../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5609 71 | std::string method;5610 | 5611 | {}5612 72 | prometheus::Histogram * hist = nullptr;5613 73 | std::chrono::steady_clock::time_point start;5614 | 5615 | {}5616 74 | 5617 75 | public:5618 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.5619 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)5620 | ^5621../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5622 145 | void buildInfo(5623 | ^5624 | static 5625../src/daemon/metrics.hh:146:9: error: 4 adjacent parameters of 'buildInfo' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5626 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5627 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5628../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'5629 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5630 | ^~~~~~~5631../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'5632 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5633 | ^~~~~~~~5634../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5635 156 | void buildSlots(unsigned count)5636 | ^5637 | static 5638../src/daemon/metrics.hh:186:36: error: 4 adjacent parameters of 'schedSystem' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5639 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5640 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5641../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'5642 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5643 | ^~~~~~5644../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'5645 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5646 | ^~~~~5647../src/daemon/metrics.hh:186:36: note: 5648 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5649 | ^5650../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values5651 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5652 | ^5653../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' may be implicitly converted: 'const int &' (as 'int') -> 'size_t' (as 'unsigned long'), 'size_t' (as 'unsigned long') -> 'const int &' (as 'int')5654../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5655 21 | explicit Metrics(const std::string & listen)5656 | ^5657../src/daemon/metrics.hh:213:19: error: 2 adjacent parameters of 'countRpc' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5658 213 | void countRpc(const std::string & method, const std::string & commonName)5659 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5660../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'5661 213 | void countRpc(const std::string & method, const std::string & commonName)5662 | ^~~~~~5663../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'5664 213 | void countRpc(const std::string & method, const std::string & commonName)5665 | ^~~~~~~~~~5666../src/daemon/metrics.hh:218:27: error: 3 adjacent parameters of 'countTunnelBytes' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5667 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5668 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5669../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'5670 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5671 | ^~~~~~~~~~5672../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'5673 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5674 | ^~~~~~~~5675../src/daemon/metrics.hh:218:27: note: 5676 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5677 | ^5678../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5679 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5680 | ^5681../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' may be implicitly converted: 'const int &' (as 'int') -> 'uint64_t' (as 'unsigned long'), 'uint64_t' (as 'unsigned long') -> 'const int &' (as 'int')5682../src/daemon/metrics.hh:224:24: error: 3 adjacent parameters of 'countNarBytes' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5683 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5684 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5685../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'5686 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5687 | ^~~~~~~~~5688../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'5689 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5690 | ^~~~~5691../src/daemon/metrics.hh:224:24: note: 5692 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5693 | ^5694../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5695 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5696 | ^5697../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' may be implicitly converted: 'const int &' (as 'int') -> 'uint64_t' (as 'unsigned long'), 'uint64_t' (as 'unsigned long') -> 'const int &' (as 'int')5698../src/daemon/niks3-client.hh:17:8: error: constructor does not initialize these fields: url, tokenFile, clientCert, clientKey, pushArgv [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5699 17 | struct Niks3Config5700 | ^5701 18 | {5702 19 | std::string url;5703 | 5704 | {}5705 20 | std::string tokenFile; // bearer, optional5706 | 5707 | {}5708 21 | std::string clientCert; // mTLS, optional5709 | 5710 | {}5711 22 | std::string clientKey;5712 | 5713 | {}5714 23 | PushProcess::Argv pushArgv;5715 | 5716 | {}5717../src/daemon/niks3-client.hh:40:5: error: constructor does not initialize these fields: baseUrl, bearer, clientCert, clientKey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5718 34 | std::string baseUrl;5719 | 5720 | {}5721 35 | std::shared_ptr<TokenFile> bearer;5722 | 5723 | {}5724 36 | std::string clientCert;5725 | 5726 | {}5727 37 | std::string clientKey;5728 | 5729 | {}5730 38 | 5731 39 | public:5732 40 | explicit Niks3Client(const Niks3Config & cfg)5733 | ^5734../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5735 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5736 | ^ ~~~~~5737 | static 5738../src/daemon/niks3-client.hh:53:29: error: 2 adjacent parameters of 'post' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5739 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5740 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5741../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'5742 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5743 | ^~~~5744../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'5745 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5746 | ^~~~5747../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values5748 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5749 | ^5750../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5751 60 | struct Identity5752 | ^5753 61 | {5754 62 | std::string subject; // "oidc:<provider>:<sub>"5755 | 5756 | {}5757 63 | std::optional<Role> role; // nullopt: verified but no rule matched5758 | 5759 | {}5760../src/daemon/oidc.hh:76:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]5761 76 | } catch (...) {5762 | ^5763../src/daemon/oidc.hh:123:26: error: 2 adjacent parameters of 'providerFrom' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5764 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5765 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5766../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'5767 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5768 | ^~~~5769../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'5770 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5771 | ^~~~5772../src/daemon/oidc.hh:191:25: error: 2 adjacent parameters of 'lookupClaim' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5773 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5774 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5775../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'5776 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5777 | ^~~~~~5778../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'5779 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5780 | ^~~~5781../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5782 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5783 | ^5784../src/daemon/oidc.hh:251:8: error: constructor does not initialize these fields: kid, kty, crv, pem [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5785 251 | struct Jwk5786 | ^5787 252 | {5788 253 | std::string kid;5789 | 5790 | {}5791 254 | std::string kty;5792 | 5793 | {}5794 255 | std::string crv;5795 | 5796 | {}5797 256 | std::string pem;5798 | 5799 | {}5800../src/daemon/oidc.hh:294:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]5801 294 | } catch (...) {5802 | ^5803../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5804 300 | struct FixedClock5805 | ^5806 301 | {5807 302 | std::chrono::system_clock::time_point at;5808 | 5809 | {}5810../src/daemon/oidc.hh:311:22: error: variable 'verifier' of type 'int &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5811 311 | inline auto allowKey(VerifierBuilder & verifier, const std::string & alg, const Jwk & key) -> bool5812 | ^5813 | const5814../src/daemon/oidc.hh:315:5: error: variable 'ecc' of type '(lambda at ../src/daemon/oidc.hh:315:16)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5815 315 | auto ecc = [&](std::string_view crv) -> bool { return key.kty == "EC" && key.crv == crv; };5816 | ^5817 | const 5818../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5819 347 | struct Result5820 | ^5821 348 | {5822 349 | std::optional<Identity> identity;5823 | 5824 | {}5825 350 | std::string error; // for logs, not for the client5826 | 5827 | {}5828../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5829 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)5830 | ^5831../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5832 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5833 | ^5834 | static 5835../src/daemon/oidc.hh:363:17: error: 2 adjacent parameters of 'verify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5836 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5837 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5838../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'5839 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5840 | ^~~~~5841../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'5842 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5843 | ^~~5844../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values5845 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5846 | ^5847../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5848 377 | struct KeySet5849 | ^5850 378 | {5851 379 | std::mutex lock;5852 | 5853 | {}5854 380 | std::vector<Jwk> keys;5855 | 5856 | {}5857 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".5858 382 | std::optional<std::chrono::steady_clock::time_point> fetched;5859 | 5860 | {}5861../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5862 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json5863 | ^ ~~~~~5864 | static 5865../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5866 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>5867 | ^ ~~~~~5868 | static 5869../src/daemon/oidc.hh:442:9: error: 2 adjacent parameters of 'fetchDue' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5870 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5871 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5872 443 | std::chrono::steady_clock::time_point now,5873 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5874../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'5875 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5876 | ^~~~~~~5877../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'5878 443 | std::chrono::steady_clock::time_point now,5879 | ^~~5880../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5881 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5882 | ^5883 | static 5884../src/daemon/oidc.hh:456:62: error: 2 adjacent parameters of 'candidates' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5885 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5886 | ^~~~~~~~~~~~~~~~~~~~~~5887 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5888 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5889../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'5890 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5891 | ^~~~~5892../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'5893 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5894 | ^~~5895../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values5896 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5897 | ^5898../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5899 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5900 | ^5901 | static 5902../src/daemon/oidc.hh:493:19: error: 2 adjacent parameters of 'doVerify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5903 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5904 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5905../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'5906 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5907 | ^~~~~5908../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'5909 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5910 | ^~~5911../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5912 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5913 | ^5914../src/daemon/oidc.hh:521:55: error: initializer list should have a trailing comma [readability-trailing-comma,-warnings-as-errors]5915 521 | .error = role ? "" : "no rule matched"};5916 | ^5917 | ,5918../src/daemon/options.hh:21:8: error: constructor does not initialize these fields: idleTimeout, storeUri, tlsCert, tlsKey, clientCA, metricsListen, workerName, oidcConfig, schedulerAddr, schedulerTokenFile, advertise, storeDir [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5919 21 | struct Options5920 | ^5921 22 | {5922 23 | std::string listen = "0.0.0.0:50051";5923 24 | std::optional<std::chrono::seconds> idleTimeout;5924 | 5925 | {}5926 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";5927 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.5928 27 | std::string storeUri;5929 | 5930 | {}5931 28 | std::string tlsCert;5932 | 5933 | {}5934 29 | std::string tlsKey;5935 | 5936 | {}5937 30 | std::string clientCA;5938 | 5939 | {}5940 31 | std::string metricsListen;5941 | 5942 | {}5943 32 | std::string workerName;5944 | 5945 | {}5946 33 | LogLevel logLevel = LogLevel::info;5947 34 | Acl acl;5948 35 | xfcc::TrustedProxies proxies;5949 36 | std::string oidcConfig;5950 | 5951 | {}5952../src/daemon/push.hh:60:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5953 60 | explicit PushProcess(Argv argv)5954 | ^5955../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5956 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5957 | ^5958 | static 5959../src/daemon/push.hh:82:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5960 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5961 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5962../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'5963 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5964 | ^~~~~5965../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'5966 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5967 | ^~~~~~~~~5968../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5969 120 | explicit Pending(size_t count)5970 | ^5971../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5972 126 | auto ack(const std::string & status, const std::string & message) -> bool5973 | ^5974 | static 5975../src/daemon/push.hh:126:18: error: 2 adjacent parameters of 'ack' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5976 126 | auto ack(const std::string & status, const std::string & message) -> bool5977 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5978../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'5979 126 | auto ack(const std::string & status, const std::string & message) -> bool5980 | ^~~~~~5981../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'5982 126 | auto ack(const std::string & status, const std::string & message) -> bool5983 | ^~~~~~~5984../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5985 141 | void fail(const std::string & message)5986 | ^5987 | static 5988../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5989 149 | auto wait(const Cancelled & cancelled) -> Result5990 | ^5991 | static 5992../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5993 162 | struct Inner5994 | ^5995 163 | {5996 164 | size_t left;5997 | 5998 | {}5999../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6000 171 | struct State6001 | ^6002 172 | {6003 173 | nix::Pid pid;6004 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;6005 | 6006 | {}6007../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6008 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)6009 | ^6010 | static 6011../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6012 215 | void readAcks(int acksFd)6013 | ^6014 | static 6015../src/daemon/sched-reactor.hh:28:8: error: constructor does not initialize these fields: queue [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6016 28 | struct SendQueue6017 | ^6018 29 | {6019 30 | // About a minute of Expects at full rate. Beyond it the peer is stuck.6020 31 | static constexpr size_t limit = 1U << 16U;6021 32 | // Messages per Write.6022 33 | static constexpr int maxBatch = 1024;6023 34 | 6024 35 | // Leaf lock, may be taken inside Dispatcher::mutex.6025 36 | absl::Mutex mutex;6026 37 | std::deque<Msg> queue ABSL_GUARDED_BY(mutex);6027 | {}6028../src/daemon/sched-reactor.hh:58:5: error: constructor does not initialize these fields: sendq [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6029 58 | explicit SchedReactorBase(grpc::CallbackServerContext * ctx)6030 | ^6031../src/daemon/sched-reactor.hh:69:13: error: variable 'kick' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6032 69 | bool kick = false;6033 | ^6034 | const 6035../src/daemon/sched-reactor.hh:86:40: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6036 86 | disp.afterUnlock([this]() -> void { writeNext(); });6037 | ^~6038../src/daemon/sched-reactor.hh:153:9: error: variable 'have' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6039 153 | bool have = false;6040 | ^6041 | const 6042../src/daemon/sched-reactor.hh:183:9: error: variable 'fin' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6043 183 | bool fin = false;6044 | ^6045 | const 6046../src/daemon/sched-reactor.hh:206:5: error: constructor does not initialize these fields: client [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6047 206 | ScheduleReactor(grpc::CallbackServerContext * ctx, Dispatcher & disp)6048 | ^6049../src/daemon/sched-reactor.hh:226:18: error: member 'disp' of type 'Dispatcher &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6050 226 | Dispatcher & disp;6051 | ^6052../src/daemon/sched-reactor.hh:255:18: error: member 'disp' of type 'Dispatcher &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6053 255 | Dispatcher & disp;6054 | ^6055../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6056 65 | class IndexedHeap6057 | ^6058 66 | {6059 67 | std::vector<std::pair<double, DrvId>> heap;6060 68 | std::vector<uint32_t> pos;6061 | 6062 | {}6063../src/daemon/scheduler.hh:71:16: error: 2 adjacent parameters of 'place' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6064 71 | void place(size_t idx, std::pair<double, DrvId> item)6065 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6066../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'6067 71 | void place(size_t idx, std::pair<double, DrvId> item)6068 | ^~~6069../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'6070 71 | void place(size_t idx, std::pair<double, DrvId> item)6071 | ^~~~6072../src/daemon/scheduler.hh:71:16: note: 6073 71 | void place(size_t idx, std::pair<double, DrvId> item)6074 | ^6075../src/daemon/scheduler.hh:71:28: note: 'size_t' and 'int' may be implicitly converted: 'size_t' (as 'unsigned long') -> 'int', 'int' -> 'size_t' (as 'unsigned long')6076 71 | void place(size_t idx, std::pair<double, DrvId> item)6077 | ^6078../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6079 77 | void siftUp(size_t idx)6080 | ^6081 | static 6082../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6083 91 | void siftDown(size_t idx)6084 | ^6085 | static 6086../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6087 94 | const size_t len = heap.size();6088 | ^ 6089 | = 06090../src/daemon/scheduler.hh:131:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6091 131 | void set(DrvId drv, double key)6092 | ^~~~~~~~~~~~~~~~~~~~~6093../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'6094 131 | void set(DrvId drv, double key)6095 | ^~~6096../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'6097 131 | void set(DrvId drv, double key)6098 | ^~~6099../src/daemon/scheduler.hh:131:14: note: 6100 131 | void set(DrvId drv, double key)6101 | ^6102../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')6103 131 | void set(DrvId drv, double key)6104 | ^6105../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6106 174 | class FreeIndex6107 | ^6108 175 | {6109 176 | public:6110 177 | static constexpr int32_t maxSlots = 63;6111 178 | 6112 179 | private:6113 180 | std::vector<int32_t> free; // may go negative (draining below running)6114 | 6115 | {}6116 181 | std::vector<uint32_t> pos;6117 | 6118 | {}6119 182 | std::vector<bool> tracked;6120 | 6121 | {}6122../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6123 191 | void check(WorkerId wid) const6124 | ^ ~~~~~6125 | static 6126../src/daemon/scheduler.hh:213:21: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]6127 213 | nonempty |= 1;6128 | ~~ ^6129../src/daemon/scheduler.hh:221:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6130 221 | void set(WorkerId wid, int32_t val)6131 | ^~~~~~~~~~~~~~~~~~~~~~~~~6132../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'6133 221 | void set(WorkerId wid, int32_t val)6134 | ^~~6135../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'6136 221 | void set(WorkerId wid, int32_t val)6137 | ^~~6138../src/daemon/scheduler.hh:221:14: note: 6139 221 | void set(WorkerId wid, int32_t val)6140 | ^6141../src/daemon/scheduler.hh:221:28: note: 'WorkerId' and 'int32_t' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int32_t' (as 'int'), 'int32_t' (as 'int') -> 'WorkerId' (as 'unsigned int')6142 221 | void set(WorkerId wid, int32_t val)6143 | ^6144../src/daemon/scheduler.hh:254:9: error: variable 'top' of type 'int32_t' (aka 'int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]6145 254 | auto top = maxFree();6146 | ^6147 | const 6148../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6149 272 | struct Assign6150 | ^6151 273 | {6152 274 | DrvId drv = 0;6153 275 | WorkerId worker = 0;6154 276 | uint64_t assignId = 0;6155 277 | std::vector<ClientId> clients;6156 | 6157 | {}6158../src/daemon/scheduler.hh:280:8: error: constructor does not initialize these fields: drvPath, inputs, system, features, followers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6159 280 | struct Entry6160 | ^6161 281 | {6162 282 | std::string drvPath;6163 | 6164 | {}6165 283 | std::vector<PathKey> inputs; // for locality only6166 | 6167 | {}6168 284 | std::string system;6169 | 6170 | {}6171 285 | std::vector<std::string> features; // required6172 | 6173 | {}6174 286 | std::vector<ClientId> followers;6175 | 6176 | {}6177../src/daemon/scheduler.hh:293:8: error: constructor does not initialize these fields: addr, systems, features, running [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6178 293 | struct Worker6179 | ^6180 294 | {6181 295 | std::string addr;6182 | 6183 | {}6184 296 | std::vector<std::string> systems;6185 | 6186 | {}6187 297 | std::vector<std::string> features;6188 | 6189 | {}6190 298 | int32_t maxJobs = 0;6191 299 | bool up = false;6192 300 | bool draining = false;6193 301 | std::vector<DrvId> running;6194 | 6195 | {}6196../src/daemon/scheduler.hh:307:5: error: constructor does not initialize these fields: drvIds, freeIds, workerIds, workers, systems [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6197 307 | explicit Core(Config cfg = {})6198 | ^6199../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6200 317 | auto drvId(std::string_view path) -> DrvId6201 | ^6202 | static 6203../src/daemon/scheduler.hh:323:9: error: variable 'drv' of type 'DrvId' (aka 'unsigned int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]6204 323 | DrvId drv = 0;6205 | ^6206 | const 6207../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6208 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>6209 | ^ ~~~~~6210 | static 6211../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6212 344 | auto workerId(std::string_view addr) -> WorkerId6213 | ^6214 | static 6215../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6216 365 | [[nodiscard]] auto queued() const -> size_t6217 | ^ ~~~~~6218 | static 6219../src/daemon/scheduler.hh:367:9: error: variable 'total' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness,-warnings-as-errors]6220 367 | size_t total = 0;6221 | ^6222 | const 6223../src/daemon/scheduler.hh:385:12: error: constructor does not initialize these fields: drvPath, inputs, system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6224 385 | struct WantInfo6225 | ^6226 386 | {6227 387 | std::string_view drvPath;6228 | 6229 | {}6230 388 | std::vector<std::string_view> inputs;6231 | 6232 | {}6233 389 | std::string_view system;6234 | 6235 | {}6236 390 | std::vector<std::string> features;6237 | 6238 | {}6239../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6240 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult6241 | ^6242 | static 6243../src/daemon/scheduler.hh:398:9: error: variable 'cpHintMs' of type 'double' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6244 398 | auto cpHintMs = info.cpHintMs;6245 | ^6246 | const 6247../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6248 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6249 | ^6250 | static 6251../src/daemon/scheduler.hh:429:17: error: 2 adjacent parameters of 'cancel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6252 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6253 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6254../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'6255 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6256 | ^~~~~~6257../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'6258 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6259 | ^~~~~~~6260../src/daemon/scheduler.hh:429:17: note: 6261 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6262 | ^6263../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')6264 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6265 | ^6266../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6267 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)6268 | ^6269 | static 6270../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6271 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)6272 | ^6273 | /*unused*/6274../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6275 478 | struct HelloInfo6276 | ^6277 479 | {6278 480 | std::string_view addr;6279 | 6280 | {}6281 481 | std::vector<std::string> systems; // first is the native one6282 | 6283 | {}6284 482 | std::vector<std::string> features;6285 | 6286 | {}6287../src/daemon/scheduler.hh:539:10: error: 2 adjacent parameters of 'done' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6288 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6289 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6290../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'6291 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6292 | ^~~6293../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'6294 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6295 | ^~~~~~~6296../src/daemon/scheduler.hh:539:10: note: 6297 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6298 | ^6299../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')6300 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6301 | ^6302../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6303 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6304 | ^6305 | /*unused*/6306../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6307 610 | struct StatsKey6308 | ^6309 611 | {6310 612 | std::string system;6311 | 6312 | {}6313 613 | std::string features; // sorted, comma-joined6314 | 6315 | {}6316../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6317 704 | void retire(DrvId drv)6318 | ^6319 | static 6320../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6321 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6322 | ^6323 | static 6324../src/daemon/scheduler.hh:716:26: error: 2 adjacent parameters of 'rememberBuilder' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6325 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6326 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6327../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'6328 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6329 | ^~~~6330../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'6331 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6332 | ^~~6333../src/daemon/scheduler.hh:716:26: note: 6334 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6335 | ^6336../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'6337 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6338 | ^6339../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6340 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t6341 | ^ ~~~~~6342 | static 6343../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6344 784 | void refreshFree(WorkerId wid)6345 | ^6346 | static 6347../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6348 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>6349 | ^ ~~~~~6350 | static 6351../src/daemon/scheduler.hh:837:9: error: variable 'score' of type '(lambda at ../src/daemon/scheduler.hh:837:22)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6352 837 | auto score = [&](WorkerId wid, double bytes) -> double {6353 | ^6354 | const 6355../src/daemon/scheduler.hh:865:16: error: narrowing conversion from 'WorkerId' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]6356 865 | return picked;6357 | ^6358../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6359 21 | struct Cached6360 | ^6361 22 | {6362 23 | std::string token;6363 | 6364 | {}6365../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6366 19 | nix::Sync<Cached> cached;6367 | 6368 | {}6369 20 | 6370 21 | static auto mtime(const struct stat & info) -> struct timespec6371 22 | {6372 23 | #ifdef __APPLE__6373 24 | return info.st_mtimespec;6374 25 | #else6375 26 | return info.st_mtim;6376 27 | #endif6377 28 | }6378 29 | 6379 30 | public:6380 31 | explicit TokenFile(std::string path_)6381 | ^6382../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6383 46 | auto get() -> std::string6384 | ^6385 | static 6386../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6387 29 | std::string_view rest;6388 | 6389 | {}6390 30 | 6391 31 | public:6392 32 | explicit Cursor(std::string_view input)6393 | ^6394../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6395 47 | auto take() -> char6396 | ^6397 | static 6398../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6399 52 | char const chr = rest.front();6400 | ^ 6401 | = 06402../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6403 58 | auto until(std::string_view stops) -> std::optional<std::string_view>6404 | ^6405 | static 6406../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6407 69 | auto remaining() -> std::string_view6408 | ^6409 | static 6410../src/daemon/xfcc.hh:150:13: error: variable 'subjectCommonName' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]6411 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>6412 | ^6413../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6414 192 | class TrustedProxies6415 | ^6416 193 | {6417 194 | std::vector<std::string> patterns;6418 | 6419 | {}6420../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6421 197 | void add(std::string_view pattern)6422 | ^6423 | static 6424../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6425 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool6426 | ^ ~~~~~6427 | static 6428../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6429 81 | void header(const std::string & line)6430 | ^6431 | static 6432../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6433 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)6434 | ^6435../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6436 129 | auto perform() -> long6437 | ^6438 | static 6439../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6440 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds6441 | ^ ~~~~~6442 | static 6443../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]6444 23 | inline auto logfmtValue(std::string_view value) -> std::string6445 | ^6446../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]6447 52 | enum class LogLevel : std::uint8_t { info, debug };6448 | ^6449../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6450 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {6451 | ^6452 | const6453../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6454 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {6455 | ^6456 | const6457../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6458 298 | bool dynamic = false;6459 | ^6460 | const 6461../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6462 301 | nix::StorePathSet srcs;6463 | ^ 6464 | = 06465../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6466 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {6467 | ^6468 | const6469../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]6470 375 | using EnsureRead = nix::EnsureRead;6471 | ^~~~~~~~~~~~6472>>> /nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/main.cc6473Errors encountered while running clang-tidy6474/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 5: 182: not found6475/nix/store/5lgv23ha2psasly8ri612pj1pvp1q38g-clang-tools-23.1.0/bin/clang-tidy: line 23: 182: not found6476Error while processing /build/source/src/daemon/main.cc.6477../src/build-log.hh:42:41: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]6478 42 | constexpr size_t kMaxLogString = 1UL << 20;6479 | ~~ ^~6480../src/build-log.hh:46:27: error: variable 'source' of type 'nix::Source &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6481 46 | inline auto readLogFields(nix::Source & source) -> std::vector<std::string>6482 | ^6483 | const6484../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6485 66 | struct BuildEvent6486 | ^6487 67 | {6488 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6489 69 | std::string text;6490 | 6491 | {}6492../src/build-log.hh:68:16: error: enum 'Kind' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]6493 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6494 | ^6495../src/daemon/acl.hh:22:12: error: enum 'Role' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]6496 22 | enum class Role : std::uint8_t {6497 | ^6498../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6499 51 | class Acl6500 | ^6501 52 | {6502 53 | struct Rule6503 54 | {6504 55 | std::string pattern;6505 56 | Role role;6506 57 | };6507 58 | 6508 59 | std::vector<Rule> rules;6509 | 6510 | {}6511 60 | // Separate from the glob rules so '*' cannot grant anonymous access.6512 61 | std::optional<Role> anonRole;6513 | 6514 | {}6515../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6516 53 | struct Rule6517 | ^6518 54 | {6519 55 | std::string pattern;6520 | 6521 | {}6522../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6523 70 | void addRule(std::string_view spec)6524 | ^6525 | static 6526../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6527 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>6528 | ^ ~~~~~6529 | static 6530../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6531 19 | struct Caller6532 | ^6533 20 | {6534 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6535 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics6536 23 | std::optional<Role> role;6537 | 6538 | {}6539../src/daemon/auth.hh:21:16: error: enum 'Kind' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]6540 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6541 | ^6542../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6543 53 | struct Backends6544 | ^6545 54 | {6546 55 | std::string socketPath;6547 | 6548 | {}6549../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6550 40 | std::optional<Remote> remote;6551 | 6552 | {}6553 41 | 6554 42 | public:6555 43 | explicit Cache(const Niks3Config & cfg)6556 | ^6557../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6558 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>6559 | ^6560 | static 6561../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6562 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6563 | ^6564 | static 6565../src/daemon/cache.hh:87:18: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6566 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6567 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6568../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'6569 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6570 | ^~~~~6571../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'6572 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6573 | ^~~~~~~~~6574../src/daemon/cache.hh:103:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6575 103 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const6576 | ^ ~~~~~6577 | static 6578../src/daemon/coordinator.hh:45:8: error: constructor does not initialize these fields: since [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6579 45 | struct Expected6580 | ^6581 46 | {6582 47 | uint64_t assignId = 0;6583 48 | Clock::time_point since;6584 | 6585 | {}6586../src/daemon/coordinator.hh:52:12: error: constructor does not initialize these fields: mutex, cv, resultWire [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6587 52 | struct Shared6588 | ^6589 53 | {6590 54 | std::mutex mutex;6591 | 6592 | {}6593 55 | std::condition_variable cv;6594 | 6595 | {}6596 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along6597 57 | bool finished = false;6598 58 | std::string resultWire; // BuildDerivationDone serialised6599 | 6600 | {}6601../src/daemon/coordinator.hh:79:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6602 79 | struct Admission6603 | ^6604 80 | {6605 81 | std::shared_ptr<Expected::Shared> shared;6606 | 6607 | {}6608../src/daemon/coordinator.hh:90:9: error: parameter 3 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]6609 90 | const std::vector<std::pair<std::string, uint64_t>> & outputs,6610 | ^~~~~6611../src/daemon/coordinator.hh:94:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6612 94 | auto hello() const -> nix::remote::WorkerMsg;6613 | ^6614 | [[nodiscard]] 6615../src/daemon/coordinator.hh:107:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6616 107 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;6617 | ^6618 | [[nodiscard]] 6619../src/daemon/coordinator.hh:110:21: error: member 'options' of type 'const Options &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6620 110 | const Options & options;6621 | ^6622../src/daemon/coordinator.hh:111:15: error: member 'metrics' of type 'Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6623 111 | Metrics & metrics;6624 | ^6625../src/daemon/coordinator.hh:113:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6626 113 | struct State6627 | ^6628 114 | {6629 115 | std::unordered_map<std::string, Expected> expected;6630 | 6631 | {}6632../src/daemon/coordinator.hh:127:9: error: parameter 4 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]6633 127 | const std::vector<std::pair<std::string, uint64_t>> & outputs);6634 | ^~~~~6635../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6636 45 | struct Config6637 | ^6638 46 | {6639 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system6640 | 6641 | {}6642 48 | PresentFn present; // unset: nothing is ever Cached6643 | 6644 | {}6645../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6646 64 | struct Client6647 | ^6648 65 | {6649 66 | sched::ClientId id = 0;6650 67 | ClientSend send;6651 | 6652 | {}6653../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6654 80 | struct Worker6655 | ^6656 81 | {6657 82 | WorkerSend send;6658 | 6659 | {}6660 83 | std::optional<sched::WorkerId> id;6661 | 6662 | {}6663../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6664 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &6665 | ^6666 | [[nodiscard]] 6667/nix/store/9nb5n3dzcfqlf3fzahrkamqzpjazy5lh-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'6668 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))6669 | ^6670../src/daemon/idle.hh:41:24: error: method 'idleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6671 41 | [[nodiscard]] auto idleFor() const -> Clock::duration6672 | ^ ~~~~~6673 | static 6674../src/daemon/main.cc:9:10: error: 'algorithm' file not found [clang-diagnostic-error]6675 9 | #include <algorithm>6676 | ^~~~~~~~~~~6677../src/daemon/main.cc:44:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6678 44 | #include <nix/store/derived-path.hh>6679 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6680 45 | #include <nix/store/globals.hh>6681../src/daemon/main.cc:61:1: error: included header unix-domain-socket.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6682 61 | #include <nix/util/unix-domain-socket.hh>6683 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6684 62 | #include <nix/util/util.hh>6685../src/daemon/main.cc:75:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6686 75 | #include "oidc.hh"6687 | ^~~~~~~~~~~~~~~~~~6688 76 | #include "path-info-wire.hh"6689../src/daemon/main.cc:76:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6690 76 | #include "path-info-wire.hh"6691 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~6692 77 | #include "metrics.hh"6693../src/daemon/main.cc:90:37: error: variable 'stopSignal' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]6694 90 | volatile std::sig_atomic_t nixgrpc::stopSignal = 0;6695 | ^6696 | static 6697../src/daemon/main.cc:99:24: error: member 'metrics' of type 'nixgrpc::Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6698 99 | nixgrpc::Metrics & metrics;6699 | ^6700../src/daemon/main.cc:100:28: error: member 'idle' of type 'nixgrpc::IdleTracker &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6701 100 | nixgrpc::IdleTracker & idle;6702 | ^6703../src/daemon/main.cc:102:21: error: member 'auth' of type 'nixgrpc::Auth &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6704 102 | nixgrpc::Auth & auth;6705 | ^6706../src/daemon/main.cc:104:28: error: member 'coord' of type 'nixgrpc::Coordinator &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6707 104 | nixgrpc::Coordinator & coord;6708 | ^6709../src/daemon/main.cc:111:10: error: method 'getStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6710 111 | auto getStore() -> nix::ref<nix::Store>6711 | ^6712 | static 6713../src/daemon/main.cc:121:10: error: method 'openScopedStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6714 121 | auto openScopedStore() -> nix::ref<nix::Store>6715 | ^6716 | static 6717../src/daemon/main.cc:137:23: error: forwarding reference parameter 'func' is never forwarded inside the function body [cppcoreguidelines-missing-std-forward,-warnings-as-errors]6718 137 | auto guarded(F && func) -> grpc::Status6719 | ^6720../src/daemon/main.cc:156:81: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6721 156 | void logDebug(std::initializer_list<std::pair<std::string_view, std::string>> fields)6722 | ^6723 | /*unused*/6724../src/daemon/main.cc:166:12: error: constructor does not initialize these fields: context, method [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6725 166 | struct Rpc6726 | ^6727 167 | {6728 168 | grpc::ServerContext * context;6729 | 6730 | {}6731 169 | std::string_view method;6732 | 6733 | {}6734../src/daemon/main.cc:173:14: error: method 'done' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6735 173 | void done(const Fields & extra) const6736 | ^ ~~~~~6737 | static 6738../src/daemon/main.cc:201:5: error: constructor does not initialize these fields: storeUri, workerName, storeMutex, store [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6739 97 | NixRemoteService(6740 | ^6741../src/daemon/main.cc:202:9: error: 3 adjacent parameters of 'NixRemoteService' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6742 202 | std::string socketPath,6743 | ^~~~~~~~~~~~~~~~~~~~~~~6744 203 | std::string storeUri,6745 | ~~~~~~~~~~~~~~~~~~~~~6746 204 | std::string workerName,6747 | ~~~~~~~~~~~~~~~~~~~~~~6748../src/daemon/main.cc:202:21: note: the first parameter in the range is 'socketPath'6749 202 | std::string socketPath,6750 | ^~~~~~~~~~6751../src/daemon/main.cc:204:21: note: the last parameter in the range is 'workerName'6752 204 | std::string workerName,6753 | ^~~~~~~~~~6754../src/daemon/main.cc:223:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6755 223 | return guarded([&]() -> grpc::Status {6756 | ^~6757../src/daemon/main.cc:264:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6758 264 | return guarded([&]() -> grpc::Status {6759 | ^~6760../src/daemon/main.cc:268:31: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6761 268 | nix::StorePathSet paths;6762 | ^ 6763 | = 06764../src/daemon/main.cc:287:47: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6765 287 | coord.cache.publish(valid, [&]() -> bool { return context->IsCancelled(); });6766 | ^~6767../src/daemon/main.cc:298:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6768 298 | return guarded([&]() -> grpc::Status {6769 | ^~6770../src/daemon/main.cc:330:46: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6771 330 | coord.cache.publish(imported, [&]() -> bool { return context->IsCancelled(); });6772 | ^~6773../src/daemon/main.cc:343:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6774 343 | return guarded([&]() -> grpc::Status {6775 | ^~6776../src/daemon/main.cc:368:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6777 368 | return guarded([&]() -> grpc::Status {6778 | ^~6779../src/daemon/main.cc:392:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6780 392 | return guarded([&]() -> grpc::Status {6781 | ^~6782../src/daemon/main.cc:525:9: error: variable 'report' of type '(lambda at ../src/daemon/main.cc:525:23)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6783 525 | auto report = [&]() -> void { builder.finished(drvName, outcome, outputs, wire); };6784 | ^6785 | const 6786../src/daemon/main.cc:525:26: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6787 525 | auto report = [&]() -> void { builder.finished(drvName, outcome, outputs, wire); };6788 | ^~6789../src/daemon/main.cc:556:9: error: 2 adjacent parameters of 'buildExpected' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6790 556 | const nixgrpc::BuildEventSink & log,6791 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6792 557 | const std::map<std::string, nix::StorePath> & outPaths,6793 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6794../src/daemon/main.cc:556:41: note: the first parameter in the range is 'log'6795 556 | const nixgrpc::BuildEventSink & log,6796 | ^~~6797../src/daemon/main.cc:557:55: note: the last parameter in the range is 'outPaths'6798 557 | const std::map<std::string, nix::StorePath> & outPaths,6799 | ^~~~~~~~6800../src/daemon/main.cc:560:53: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6801 560 | std::vector<std::pair<std::string, uint64_t>> & outputs) -> grpc::Status6802 | ^6803 | /*unused*/6804../src/daemon/main.cc:562:9: error: variable 'cancelled' of type '(lambda at ../src/daemon/main.cc:562:26)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6805 562 | auto cancelled = [&]() -> bool {6806 | ^6807 | const 6808../src/daemon/main.cc:562:29: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6809 562 | auto cancelled = [&]() -> bool {6810 | ^~6811../src/daemon/main.cc:624:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6812 624 | return guarded([&]() -> grpc::Status {6813 | ^~6814../src/daemon/main.cc:634:13: error: variable 'sendLogLine' of type '(lambda at ../src/daemon/main.cc:634:32)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6815 634 | auto sendLogLine = [&](nixgrpc::BuildEvent event) -> void {6816 | ^6817 | const 6818../src/daemon/main.cc:662:27: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]6819 662 | return guarded([&]() -> grpc::Status {6820 | ^~6821../src/daemon/main.cc:693:13: error: variable 'counting' of type 'nix::LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6822 693 | nix::LambdaSink counting([&](std::string_view data) -> void {6823 | ^6824 | const 6825../src/daemon/main.cc:725:5: error: variable 'server' of type 'grpc::Server &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6826 725 | grpc::Server & server,6827 | ^6828 | const6829../src/daemon/main.cc:727:5: error: variable 'idle' of type 'nixgrpc::IdleTracker &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6830 727 | nixgrpc::IdleTracker & idle,6831 | ^6832 | const6833../src/daemon/main.cc:729:5: error: variable 'metrics' of type 'nixgrpc::Metrics &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6834 729 | nixgrpc::Metrics & metrics)6835 | ^6836 | const6837../src/daemon/main.cc:758:6: error: an exception may be thrown in function 'main' which should not throw exceptions [bugprone-exception-escape,-warnings-as-errors]6838 758 | auto main(int argc, char ** argv) -> int6839 | ^6840../src/daemon/main.cc:781:9: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'main' here6841 781 | throw nix::Error("--idle-timeout requires systemd socket activation");6842 | ^6843../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6844 71 | std::string method;6845 | 6846 | {}6847 72 | prometheus::Histogram * hist = nullptr;6848 73 | std::chrono::steady_clock::time_point start;6849 | 6850 | {}6851 74 | 6852 75 | public:6853 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.6854 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)6855 | ^6856../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6857 145 | void buildInfo(6858 | ^6859 | static 6860../src/daemon/metrics.hh:146:9: error: 4 adjacent parameters of 'buildInfo' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6861 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6862 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6863../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'6864 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6865 | ^~~~~~~6866../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'6867 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6868 | ^~~~~~~~6869../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6870 156 | void buildSlots(unsigned count)6871 | ^6872 | static 6873../src/daemon/metrics.hh:186:36: error: 4 adjacent parameters of 'schedSystem' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6874 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6875 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6876../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'6877 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6878 | ^~~~~~6879../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'6880 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6881 | ^~~~~6882../src/daemon/metrics.hh:186:36: note: 6883 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6884 | ^6885../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values6886 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6887 | ^6888../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' may be implicitly converted: 'const int &' (as 'int') -> 'size_t' (as 'unsigned long'), 'size_t' (as 'unsigned long') -> 'const int &' (as 'int')6889../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6890 21 | explicit Metrics(const std::string & listen)6891 | ^6892../src/daemon/metrics.hh:213:19: error: 2 adjacent parameters of 'countRpc' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6893 213 | void countRpc(const std::string & method, const std::string & commonName)6894 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6895../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'6896 213 | void countRpc(const std::string & method, const std::string & commonName)6897 | ^~~~~~6898../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'6899 213 | void countRpc(const std::string & method, const std::string & commonName)6900 | ^~~~~~~~~~6901../src/daemon/metrics.hh:218:27: error: 3 adjacent parameters of 'countTunnelBytes' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6902 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6903 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6904../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'6905 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6906 | ^~~~~~~~~~6907../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'6908 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6909 | ^~~~~~~~6910../src/daemon/metrics.hh:218:27: note: 6911 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6912 | ^6913../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6914 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6915 | ^6916../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' may be implicitly converted: 'const int &' (as 'int') -> 'uint64_t' (as 'unsigned long'), 'uint64_t' (as 'unsigned long') -> 'const int &' (as 'int')6917../src/daemon/metrics.hh:224:24: error: 3 adjacent parameters of 'countNarBytes' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6918 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6919 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6920../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'6921 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6922 | ^~~~~~~~~6923../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'6924 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6925 | ^~~~~6926../src/daemon/metrics.hh:224:24: note: 6927 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6928 | ^6929../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6930 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6931 | ^6932../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' may be implicitly converted: 'const int &' (as 'int') -> 'uint64_t' (as 'unsigned long'), 'uint64_t' (as 'unsigned long') -> 'const int &' (as 'int')6933../src/daemon/niks3-client.hh:17:8: error: constructor does not initialize these fields: url, tokenFile, clientCert, clientKey, pushArgv [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6934 17 | struct Niks3Config6935 | ^6936 18 | {6937 19 | std::string url;6938 | 6939 | {}6940 20 | std::string tokenFile; // bearer, optional6941 | 6942 | {}6943 21 | std::string clientCert; // mTLS, optional6944 | 6945 | {}6946 22 | std::string clientKey;6947 | 6948 | {}6949 23 | PushProcess::Argv pushArgv;6950 | 6951 | {}6952../src/daemon/niks3-client.hh:40:5: error: constructor does not initialize these fields: baseUrl, bearer, clientCert, clientKey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6953 34 | std::string baseUrl;6954 | 6955 | {}6956 35 | std::shared_ptr<TokenFile> bearer;6957 | 6958 | {}6959 36 | std::string clientCert;6960 | 6961 | {}6962 37 | std::string clientKey;6963 | 6964 | {}6965 38 | 6966 39 | public:6967 40 | explicit Niks3Client(const Niks3Config & cfg)6968 | ^6969../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6970 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6971 | ^ ~~~~~6972 | static 6973../src/daemon/niks3-client.hh:53:29: error: 2 adjacent parameters of 'post' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6974 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6975 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6976../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'6977 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6978 | ^~~~6979../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'6980 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6981 | ^~~~6982../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values6983 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6984 | ^6985../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6986 60 | struct Identity6987 | ^6988 61 | {6989 62 | std::string subject; // "oidc:<provider>:<sub>"6990 | 6991 | {}6992 63 | std::optional<Role> role; // nullopt: verified but no rule matched6993 | 6994 | {}6995../src/daemon/oidc.hh:76:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]6996 76 | } catch (...) {6997 | ^6998../src/daemon/oidc.hh:123:26: error: 2 adjacent parameters of 'providerFrom' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6999 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider7000 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7001../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'7002 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider7003 | ^~~~7004../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'7005 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider7006 | ^~~~7007../src/daemon/oidc.hh:191:25: error: 2 adjacent parameters of 'lookupClaim' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7008 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *7009 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7010../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'7011 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *7012 | ^~~~~~7013../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'7014 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *7015 | ^~~~7016../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values7017 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *7018 | ^7019../src/daemon/oidc.hh:251:8: error: constructor does not initialize these fields: kid, kty, crv, pem [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7020 251 | struct Jwk7021 | ^7022 252 | {7023 253 | std::string kid;7024 | 7025 | {}7026 254 | std::string kty;7027 | 7028 | {}7029 255 | std::string crv;7030 | 7031 | {}7032 256 | std::string pem;7033 | 7034 | {}7035../src/daemon/oidc.hh:294:7: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]7036 294 | } catch (...) {7037 | ^7038../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7039 300 | struct FixedClock7040 | ^7041 301 | {7042 302 | std::chrono::system_clock::time_point at;7043 | 7044 | {}7045../src/daemon/oidc.hh:311:22: error: variable 'verifier' of type 'int &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7046 311 | inline auto allowKey(VerifierBuilder & verifier, const std::string & alg, const Jwk & key) -> bool7047 | ^7048 | const7049../src/daemon/oidc.hh:315:5: error: variable 'ecc' of type '(lambda at ../src/daemon/oidc.hh:315:16)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7050 315 | auto ecc = [&](std::string_view crv) -> bool { return key.kty == "EC" && key.crv == crv; };7051 | ^7052 | const 7053../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7054 347 | struct Result7055 | ^7056 348 | {7057 349 | std::optional<Identity> identity;7058 | 7059 | {}7060 350 | std::string error; // for logs, not for the client7061 | 7062 | {}7063../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7064 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)7065 | ^7066../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7067 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result7068 | ^7069 | static 7070../src/daemon/oidc.hh:363:17: error: 2 adjacent parameters of 'verify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7071 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result7072 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7073../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'7074 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result7075 | ^~~~~7076../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'7077 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result7078 | ^~~7079../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values7080 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result7081 | ^7082../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7083 377 | struct KeySet7084 | ^7085 378 | {7086 379 | std::mutex lock;7087 | 7088 | {}7089 380 | std::vector<Jwk> keys;7090 | 7091 | {}7092 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".7093 382 | std::optional<std::chrono::steady_clock::time_point> fetched;7094 | 7095 | {}7096../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7097 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json7098 | ^ ~~~~~7099 | static 7100../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7101 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>7102 | ^ ~~~~~7103 | static 7104../src/daemon/oidc.hh:442:9: error: 2 adjacent parameters of 'fetchDue' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7105 442 | std::optional<std::chrono::steady_clock::time_point> fetched,7106 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7107 443 | std::chrono::steady_clock::time_point now,7108 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7109../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'7110 442 | std::optional<std::chrono::steady_clock::time_point> fetched,7111 | ^~~~~~~7112../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'7113 443 | std::chrono::steady_clock::time_point now,7114 | ^~~7115../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7116 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,7117 | ^7118 | static 7119../src/daemon/oidc.hh:456:62: error: 2 adjacent parameters of 'candidates' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7120 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,7121 | ^~~~~~~~~~~~~~~~~~~~~~7122 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder7123 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7124../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'7125 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,7126 | ^~~~~7127../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'7128 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder7129 | ^~~7130../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values7131 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder7132 | ^7133../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7134 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result7135 | ^7136 | static 7137../src/daemon/oidc.hh:493:19: error: 2 adjacent parameters of 'doVerify' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7138 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result7139 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7140../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'7141 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result7142 | ^~~~~7143../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'7144 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result7145 | ^~~7146../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values7147 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result7148 | ^7149../src/daemon/oidc.hh:521:55: error: initializer list should have a trailing comma [readability-trailing-comma,-warnings-as-errors]7150 521 | .error = role ? "" : "no rule matched"};7151 | ^7152 | ,7153../src/daemon/options.hh:21:8: error: constructor does not initialize these fields: idleTimeout, storeUri, tlsCert, tlsKey, clientCA, metricsListen, workerName, oidcConfig, schedulerAddr, schedulerTokenFile, advertise, storeDir [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7154 21 | struct Options7155 | ^7156 22 | {7157 23 | std::string listen = "0.0.0.0:50051";7158 24 | std::optional<std::chrono::seconds> idleTimeout;7159 | 7160 | {}7161 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";7162 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.7163 27 | std::string storeUri;7164 | 7165 | {}7166 28 | std::string tlsCert;7167 | 7168 | {}7169 29 | std::string tlsKey;7170 | 7171 | {}7172 30 | std::string clientCA;7173 | 7174 | {}7175 31 | std::string metricsListen;7176 | 7177 | {}7178 32 | std::string workerName;7179 | 7180 | {}7181 33 | LogLevel logLevel = LogLevel::info;7182 34 | Acl acl;7183 35 | xfcc::TrustedProxies proxies;7184 36 | std::string oidcConfig;7185 | 7186 | {}7187../src/daemon/push.hh:60:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7188 60 | explicit PushProcess(Argv argv)7189 | ^7190../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7191 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)7192 | ^7193 | static 7194../src/daemon/push.hh:82:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7195 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)7196 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7197../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'7198 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)7199 | ^~~~~7200../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'7201 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)7202 | ^~~~~~~~~7203../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7204 120 | explicit Pending(size_t count)7205 | ^7206../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7207 126 | auto ack(const std::string & status, const std::string & message) -> bool7208 | ^7209 | static 7210../src/daemon/push.hh:126:18: error: 2 adjacent parameters of 'ack' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7211 126 | auto ack(const std::string & status, const std::string & message) -> bool7212 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7213../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'7214 126 | auto ack(const std::string & status, const std::string & message) -> bool7215 | ^~~~~~7216../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'7217 126 | auto ack(const std::string & status, const std::string & message) -> bool7218 | ^~~~~~~7219../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7220 141 | void fail(const std::string & message)7221 | ^7222 | static 7223../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7224 149 | auto wait(const Cancelled & cancelled) -> Result7225 | ^7226 | static 7227../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7228 162 | struct Inner7229 | ^7230 163 | {7231 164 | size_t left;7232 | 7233 | {}7234../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7235 171 | struct State7236 | ^7237 172 | {7238 173 | nix::Pid pid;7239 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;7240 | 7241 | {}7242../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7243 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)7244 | ^7245 | static 7246../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7247 215 | void readAcks(int acksFd)7248 | ^7249 | static 7250../src/daemon/push.hh:234:11: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]7251 234 | } catch (nix::EndOfFile &) {7252 | ^7253../src/daemon/push.hh:236:11: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]7254 236 | } catch (std::exception & err) {7255 | ^7256../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7257 65 | class IndexedHeap7258 | ^7259 66 | {7260 67 | std::vector<std::pair<double, DrvId>> heap;7261 68 | std::vector<uint32_t> pos;7262 | 7263 | {}7264../src/daemon/scheduler.hh:71:16: error: 2 adjacent parameters of 'place' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7265 71 | void place(size_t idx, std::pair<double, DrvId> item)7266 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7267../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'7268 71 | void place(size_t idx, std::pair<double, DrvId> item)7269 | ^~~7270../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'7271 71 | void place(size_t idx, std::pair<double, DrvId> item)7272 | ^~~~7273../src/daemon/scheduler.hh:71:16: note: 7274 71 | void place(size_t idx, std::pair<double, DrvId> item)7275 | ^7276../src/daemon/scheduler.hh:71:28: note: 'size_t' and 'int' may be implicitly converted: 'size_t' (as 'unsigned long') -> 'int', 'int' -> 'size_t' (as 'unsigned long')7277 71 | void place(size_t idx, std::pair<double, DrvId> item)7278 | ^7279../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7280 77 | void siftUp(size_t idx)7281 | ^7282 | static 7283../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7284 91 | void siftDown(size_t idx)7285 | ^7286 | static 7287../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7288 94 | const size_t len = heap.size();7289 | ^ 7290 | = 07291../src/daemon/scheduler.hh:131:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7292 131 | void set(DrvId drv, double key)7293 | ^~~~~~~~~~~~~~~~~~~~~7294../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'7295 131 | void set(DrvId drv, double key)7296 | ^~~7297../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'7298 131 | void set(DrvId drv, double key)7299 | ^~~7300../src/daemon/scheduler.hh:131:14: note: 7301 131 | void set(DrvId drv, double key)7302 | ^7303../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')7304 131 | void set(DrvId drv, double key)7305 | ^7306../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7307 174 | class FreeIndex7308 | ^7309 175 | {7310 176 | public:7311 177 | static constexpr int32_t maxSlots = 63;7312 178 | 7313 179 | private:7314 180 | std::vector<int32_t> free; // may go negative (draining below running)7315 | 7316 | {}7317 181 | std::vector<uint32_t> pos;7318 | 7319 | {}7320 182 | std::vector<bool> tracked;7321 | 7322 | {}7323../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7324 191 | void check(WorkerId wid) const7325 | ^ ~~~~~7326 | static 7327../src/daemon/scheduler.hh:213:21: error: use of a signed integer operand with a binary bitwise operator [bugprone-signed-bitwise,-warnings-as-errors]7328 213 | nonempty |= 1;7329 | ~~ ^7330../src/daemon/scheduler.hh:221:14: error: 2 adjacent parameters of 'set' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7331 221 | void set(WorkerId wid, int32_t val)7332 | ^~~~~~~~~~~~~~~~~~~~~~~~~7333../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'7334 221 | void set(WorkerId wid, int32_t val)7335 | ^~~7336../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'7337 221 | void set(WorkerId wid, int32_t val)7338 | ^~~7339../src/daemon/scheduler.hh:221:14: note: 7340 221 | void set(WorkerId wid, int32_t val)7341 | ^7342../src/daemon/scheduler.hh:221:28: note: 'WorkerId' and 'int32_t' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int32_t' (as 'int'), 'int32_t' (as 'int') -> 'WorkerId' (as 'unsigned int')7343 221 | void set(WorkerId wid, int32_t val)7344 | ^7345../src/daemon/scheduler.hh:254:9: error: variable 'top' of type 'int32_t' (aka 'int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]7346 254 | auto top = maxFree();7347 | ^7348 | const 7349../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7350 272 | struct Assign7351 | ^7352 273 | {7353 274 | DrvId drv = 0;7354 275 | WorkerId worker = 0;7355 276 | uint64_t assignId = 0;7356 277 | std::vector<ClientId> clients;7357 | 7358 | {}7359../src/daemon/scheduler.hh:280:8: error: constructor does not initialize these fields: drvPath, inputs, system, features, followers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7360 280 | struct Entry7361 | ^7362 281 | {7363 282 | std::string drvPath;7364 | 7365 | {}7366 283 | std::vector<PathKey> inputs; // for locality only7367 | 7368 | {}7369 284 | std::string system;7370 | 7371 | {}7372 285 | std::vector<std::string> features; // required7373 | 7374 | {}7375 286 | std::vector<ClientId> followers;7376 | 7377 | {}7378../src/daemon/scheduler.hh:293:8: error: constructor does not initialize these fields: addr, systems, features, running [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7379 293 | struct Worker7380 | ^7381 294 | {7382 295 | std::string addr;7383 | 7384 | {}7385 296 | std::vector<std::string> systems;7386 | 7387 | {}7388 297 | std::vector<std::string> features;7389 | 7390 | {}7391 298 | int32_t maxJobs = 0;7392 299 | bool up = false;7393 300 | bool draining = false;7394 301 | std::vector<DrvId> running;7395 | 7396 | {}7397../src/daemon/scheduler.hh:307:5: error: constructor does not initialize these fields: drvIds, freeIds, workerIds, workers, systems [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7398 307 | explicit Core(Config cfg = {})7399 | ^7400../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7401 317 | auto drvId(std::string_view path) -> DrvId7402 | ^7403 | static 7404../src/daemon/scheduler.hh:323:9: error: variable 'drv' of type 'DrvId' (aka 'unsigned int') can be declared 'const' [misc-const-correctness,-warnings-as-errors]7405 323 | DrvId drv = 0;7406 | ^7407 | const 7408../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7409 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>7410 | ^ ~~~~~7411 | static 7412../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7413 344 | auto workerId(std::string_view addr) -> WorkerId7414 | ^7415 | static 7416../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7417 365 | [[nodiscard]] auto queued() const -> size_t7418 | ^ ~~~~~7419 | static 7420../src/daemon/scheduler.hh:367:9: error: variable 'total' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness,-warnings-as-errors]7421 367 | size_t total = 0;7422 | ^7423 | const 7424../src/daemon/scheduler.hh:385:12: error: constructor does not initialize these fields: drvPath, inputs, system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7425 385 | struct WantInfo7426 | ^7427 386 | {7428 387 | std::string_view drvPath;7429 | 7430 | {}7431 388 | std::vector<std::string_view> inputs;7432 | 7433 | {}7434 389 | std::string_view system;7435 | 7436 | {}7437 390 | std::vector<std::string> features;7438 | 7439 | {}7440../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7441 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult7442 | ^7443 | static 7444../src/daemon/scheduler.hh:398:9: error: variable 'cpHintMs' of type 'double' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7445 398 | auto cpHintMs = info.cpHintMs;7446 | ^7447 | const 7448../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7449 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7450 | ^7451 | static 7452../src/daemon/scheduler.hh:429:17: error: 2 adjacent parameters of 'cancel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7453 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7454 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7455../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'7456 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7457 | ^~~~~~7458../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'7459 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7460 | ^~~~~~~7461../src/daemon/scheduler.hh:429:17: note: 7462 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7463 | ^7464../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')7465 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7466 | ^7467../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7468 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7469 | ^7470 | static 7471../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7472 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7473 | ^7474 | /*unused*/7475../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7476 478 | struct HelloInfo7477 | ^7478 479 | {7479 480 | std::string_view addr;7480 | 7481 | {}7482 481 | std::vector<std::string> systems; // first is the native one7483 | 7484 | {}7485 482 | std::vector<std::string> features;7486 | 7487 | {}7488../src/daemon/scheduler.hh:539:10: error: 2 adjacent parameters of 'done' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7489 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7490 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7491../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'7492 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7493 | ^~~7494../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'7495 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7496 | ^~~~~~~7497../src/daemon/scheduler.hh:539:10: note: 7498 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7499 | ^7500../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')7501 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7502 | ^7503../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7504 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7505 | ^7506 | /*unused*/7507../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7508 610 | struct StatsKey7509 | ^7510 611 | {7511 612 | std::string system;7512 | 7513 | {}7514 613 | std::string features; // sorted, comma-joined7515 | 7516 | {}7517../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7518 704 | void retire(DrvId drv)7519 | ^7520 | static 7521../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7522 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7523 | ^7524 | static 7525../src/daemon/scheduler.hh:716:26: error: 2 adjacent parameters of 'rememberBuilder' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7526 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7527 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7528../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'7529 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7530 | ^~~~7531../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'7532 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7533 | ^~~7534../src/daemon/scheduler.hh:716:26: note: 7535 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7536 | ^7537../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'7538 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7539 | ^7540../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7541 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t7542 | ^ ~~~~~7543 | static 7544../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7545 784 | void refreshFree(WorkerId wid)7546 | ^7547 | static 7548../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7549 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>7550 | ^ ~~~~~7551 | static 7552../src/daemon/scheduler.hh:837:9: error: variable 'score' of type '(lambda at ../src/daemon/scheduler.hh:837:22)' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7553 837 | auto score = [&](WorkerId wid, double bytes) -> double {7554 | ^7555 | const 7556../src/daemon/scheduler.hh:865:16: error: narrowing conversion from 'WorkerId' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7557 865 | return picked;7558 | ^7559../src/daemon/socket-activation.hh:90:12: error: 2 adjacent parameters of 'acceptInto' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7560 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7561 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7562../src/daemon/socket-activation.hh:90:37: note: the first parameter in the range is 'listenFds'7563 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7564 | ^~~~~~~~~7565../src/daemon/socket-activation.hh:90:120: note: the last parameter in the range is 'acceptor'7566 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7567 | ^~~~~~~~7568../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7569 21 | struct Cached7570 | ^7571 22 | {7572 23 | std::string token;7573 | 7574 | {}7575../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7576 19 | nix::Sync<Cached> cached;7577 | 7578 | {}7579 20 | 7580 21 | static auto mtime(const struct stat & info) -> struct timespec7581 22 | {7582 23 | #ifdef __APPLE__7583 24 | return info.st_mtimespec;7584 25 | #else7585 26 | return info.st_mtim;7586 27 | #endif7587 28 | }7588 29 | 7589 30 | public:7590 31 | explicit TokenFile(std::string path_)7591 | ^7592../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7593 46 | auto get() -> std::string7594 | ^7595 | static 7596../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7597 29 | std::string_view rest;7598 | 7599 | {}7600 30 | 7601 31 | public:7602 32 | explicit Cursor(std::string_view input)7603 | ^7604../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7605 47 | auto take() -> char7606 | ^7607 | static 7608../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7609 52 | char const chr = rest.front();7610 | ^ 7611 | = 07612../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7613 58 | auto until(std::string_view stops) -> std::optional<std::string_view>7614 | ^7615 | static 7616../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7617 69 | auto remaining() -> std::string_view7618 | ^7619 | static 7620../src/daemon/xfcc.hh:150:13: error: variable 'subjectCommonName' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]7621 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>7622 | ^7623../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7624 192 | class TrustedProxies7625 | ^7626 193 | {7627 194 | std::vector<std::string> patterns;7628 | 7629 | {}7630../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7631 197 | void add(std::string_view pattern)7632 | ^7633 | static 7634../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7635 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool7636 | ^ ~~~~~7637 | static 7638../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7639 81 | void header(const std::string & line)7640 | ^7641 | static 7642../src/http.hh:101:5: error: constructor does not initialize these fields: curl, headers, url, payload, body_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7643 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)7644 | ^7645../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7646 129 | auto perform() -> long7647 | ^7648 | static 7649../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7650 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds7651 | ^ ~~~~~7652 | static 7653../src/logfmt.hh:23:13: error: variable 'logfmtValue' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]7654 23 | inline auto logfmtValue(std::string_view value) -> std::string7655 | ^7656../src/logfmt.hh:52:12: error: enum 'LogLevel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size,-warnings-as-errors]7657 52 | enum class LogLevel : std::uint8_t { info, debug };7658 | ^7659../src/nix-compat.hh:251:27: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7660 251 | inline auto failureStatus(nix::BuildResult &res) -> std::optional<FailureStatus> {7661 | ^7662 | const7663../src/nix-compat.hh:264:38: error: variable 'res' of type 'nix::BuildResult &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7664 264 | inline auto deterministicFailureKind(nix::BuildResult &res) -> std::string {7665 | ^7666 | const7667../src/nix-compat.hh:298:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7668 298 | bool dynamic = false;7669 | ^7670 | const 7671../src/nix-compat.hh:301:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7672 301 | nix::StorePathSet srcs;7673 | ^ 7674 | = 07675../src/nix-compat.hh:364:24: error: variable 'store' of type 'nix::Store &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7676 364 | inline void ensurePath(nix::Store &store, const nix::StorePath &path) {7677 | ^7678 | const7679../src/nix-compat.hh:375:7: error: type alias is redundant; use a using-declaration instead [readability-redundant-qualified-alias,-warnings-as-errors]7680 375 | using EnsureRead = nix::EnsureRead;7681 | ^~~~~~~~~~~~7682../src/path-info-wire.hh:21:96: error: pointee of variable 'out' of type 'nix::remote::PathInfo *' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7683 21 | inline void encodePathInfo(const nix::StoreDirConfig & store, const nix::ValidPathInfo & info, nix::remote::PathInfo * out)7684 | ^7685 | const7686../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7687 24 | nix::StringSink sink;7688 | ^7689 | const 7690../src/pump.hh:44:39: error: variable 'pipe' of type 'nix::Pipe &' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7691 44 | inline void growPipe([[maybe_unused]] nix::Pipe & pipe)7692 | ^7693 | const7694../src/pump.hh:65:27: error: 2 adjacent parameters of 'readCoalesced' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]7695 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7696 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7697../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'7698 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7699 | ^~~~~~~~7700../src/pump.hh:65:57: note: the last parameter in the range is 'buf'7701 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7702 | ^~~7703../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7704 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);7705 | ^ 7706 | = 07707../src/pump.hh:77:52: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7708 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;7709 | ^7710../src/pump.hh:77:59: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7711 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;7712 | ^7713../src/pump.hh:90:41: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7714 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch7715 | ^7716../src/pump.hh:95:48: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7717 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;7718 | ^7719../src/pump.hh:95:55: error: narrowing conversion from constant value 18446744073709551615 (0xFFFFFFFFFFFFFFFF) of type 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7720 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;7721 | ^7722../src/pump.hh:97:33: error: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]7723 97 | return static_cast<ssize_t>(got);7724 | ^7725../src/pump.hh:155:56: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]7726 155 | zstdCompressInto(*cctx, out, zin, directive, []() -> void {});7727 | ^~7728../src/pump.hh:233:78: error: redundant empty parameter list in lambda expression [readability-redundant-lambda-parameter-list,-warnings-as-errors]7729 233 | zstdCompressInto(*cctx, *msg.mutable_data(), input, directive, [this]() -> void { ship(); });7730 | ^~7731FAILED: [code=1] meson-internal__clang-tidy 7732/nix/store/sc7hggvmvma7m8bbgmp8gsa1q1x37aq8-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always7733ninja: build stopped: subcommand failed.