nixbot

builds

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

1tribuchet: building on jamie
unpackPhase
2unpacking source archive /nix/store/g513ffa7yp79gid9sy1ql4n3k6xib60j-source3source root is source
configurePhase
4mesonConfigurePhase flags: --prefix=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1 --libdir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib --libexecdir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec --bindir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin --sbindir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin --includedir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/include --mandir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man --infodir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info --localedir=/nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-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 22.1.8 "clang version 22.1.8")14C++ linker for the host machine: clang++ ld.bfd 2.4615Host machine cpu family: x86_6416Host machine cpu: x86_6417Found pkg-config: YES (/nix/store/29d1c5xk6w3rwl7yvdfwl90whslv5h54-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/4hdzvycn5mkg3xm1ggscp3mxz8005c3m-protobuf-36.1/bin/protoc)36Program grpc_cpp_plugin found: YES (/nix/store/n81x7qakspm4bnm9q8cjdgjvvx6h691v-grpc-1.83.0/bin/grpc_cpp_plugin)37Program mold found: YES (/nix/store/vfvfq1k7436b6sidk1246m72j6944kv7-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/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin51 buildtype : plain52 includedir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/include53 infodir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info54 libdir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib55 libexecdir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec56 localedir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/locale57 mandir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man58 prefix : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.159 sbindir : /nix/store/jlkdcfrxjvb5mgz3ckkks7ppm5zshrwq-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin60 wrap_mode : nodownload6162Found ninja-1.13.2 at /nix/store/r8a159fqvj0mpczq0dq8d3dwdd2rsz8c-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/jaa89dphx07w3r26y7gh79a7b1mld5p4-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always66>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/plugin-loader.cc67/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found68/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/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/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/farm-client-test.cc80/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found81/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/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:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]298 279 | bool dynamic = false;299 | ^300 | const 301../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]302 282 | nix::StorePathSet srcs;303 | ^ 304 | = 0305../tests/farm-client-test.cc:3:10: error: 'chrono' file not found [clang-diagnostic-error]306 3 | #include <chrono>307 | ^~~~~~~~308../tests/farm-client-test.cc:17:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]309 17 | #include <nlohmann/json_fwd.hpp>310 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~311 18 | 312../tests/farm-client-test.cc:23:1: error: included header niks3-client.hh is not used directly [misc-include-cleaner,-warnings-as-errors]313 23 | #include "niks3-client.hh"314 | ^~~~~~~~~~~~~~~~~~~~~~~~~~315 24 | #include "http.hh"316../tests/farm-client-test.cc:37:5: error: constructor does not initialize these fields: base [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]317 33 | std::string base;318 | 319 | {}320 34 | int failures = 0;321 35 | 322 36 | public:323 37 | explicit Suite(std::string base)324 | ^325../tests/farm-client-test.cc:53:24: error: method 'log' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]326 53 | [[nodiscard]] auto log() const -> nlohmann::json327 | ^ ~~~~~328 | static 329../tests/farm-client-test.cc:62:9: error: variable 'found' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]330 62 | int found = 0;331 | ^332 | const 333../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]334 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)335 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~336../tests/farm-client-test.cc:143:49: note: the first parameter in the range is 'base'337 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)338 | ^~~~339../tests/farm-client-test.cc:143:75: note: the last parameter in the range is 'mock'340 143 | void testCache(Suite & tst, const std::string & base, const std::string & mock)341 | ^~~~342>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/scheduler-test.cc343/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found344/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found345Error while processing /build/source/tests/scheduler-test.cc.346../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]347 71 | void place(size_t idx, std::pair<double, DrvId> item)348 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~349../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'350 71 | void place(size_t idx, std::pair<double, DrvId> item)351 | ^~~352../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'353 71 | void place(size_t idx, std::pair<double, DrvId> item)354 | ^~~~355../src/daemon/scheduler.hh:71:16: note: 356 71 | void place(size_t idx, std::pair<double, DrvId> item)357 | ^358../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')359 71 | void place(size_t idx, std::pair<double, DrvId> item)360 | ^361../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]362 77 | void siftUp(size_t idx)363 | ^364 | static 365../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]366 91 | void siftDown(size_t idx)367 | ^368 | static 369../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]370 94 | const size_t len = heap.size();371 | ^ 372 | = 0373../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]374 131 | void set(DrvId drv, double key)375 | ^~~~~~~~~~~~~~~~~~~~~376../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'377 131 | void set(DrvId drv, double key)378 | ^~~379../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'380 131 | void set(DrvId drv, double key)381 | ^~~382../src/daemon/scheduler.hh:131:14: note: 383 131 | void set(DrvId drv, double key)384 | ^385../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')386 131 | void set(DrvId drv, double key)387 | ^388../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]389 191 | void check(WorkerId wid) const390 | ^ ~~~~~391 | static 392../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]393 221 | void set(WorkerId wid, int32_t val)394 | ^~~~~~~~~~~~~~~~~~~~~~~~~395../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'396 221 | void set(WorkerId wid, int32_t val)397 | ^~~398../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'399 221 | void set(WorkerId wid, int32_t val)400 | ^~~401../src/daemon/scheduler.hh:221:14: note: 402 221 | void set(WorkerId wid, int32_t val)403 | ^404../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')405 221 | void set(WorkerId wid, int32_t val)406 | ^407../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]408 272 | struct Assign409 | ^410 273 | {411 274 | DrvId drv = 0;412 275 | WorkerId worker = 0;413 276 | uint64_t assignId = 0;414 277 | std::vector<ClientId> clients;415 | 416 | {}417../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]418 280 | struct Entry419 | ^420 281 | {421 282 | std::string drvPath;422 | 423 | {}424 283 | std::vector<PathKey> inputs; // for locality only425 | 426 | {}427 284 | std::string system;428 | 429 | {}430 285 | std::vector<std::string> features; // required431 | 432 | {}433 286 | std::vector<ClientId> followers;434 | 435 | {}436../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]437 293 | struct Worker438 | ^439 294 | {440 295 | std::string addr;441 | 442 | {}443 296 | std::vector<std::string> systems;444 | 445 | {}446 297 | std::vector<std::string> features;447 | 448 | {}449 298 | int32_t maxJobs = 0;450 299 | bool up = false;451 300 | bool draining = false;452 301 | std::vector<DrvId> running;453 | 454 | {}455../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]456 307 | explicit Core(Config cfg = {})457 | ^458../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]459 317 | auto drvId(std::string_view path) -> DrvId460 | ^461 | static 462../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]463 323 | DrvId drv = 0;464 | ^465 | const 466../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]467 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>468 | ^ ~~~~~469 | static 470../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]471 344 | auto workerId(std::string_view addr) -> WorkerId472 | ^473 | static 474../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]475 365 | [[nodiscard]] auto queued() const -> size_t476 | ^ ~~~~~477 | static 478../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]479 367 | size_t total = 0;480 | ^481 | const 482../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]483 385 | struct WantInfo484 | ^485 386 | {486 387 | std::string_view drvPath;487 | 488 | {}489 388 | std::vector<std::string_view> inputs;490 | 491 | {}492 389 | std::string_view system;493 | 494 | {}495 390 | std::vector<std::string> features;496 | 497 | {}498../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]499 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult500 | ^501 | static 502../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]503 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>504 | ^505 | static 506../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]507 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>508 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~509../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'510 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>511 | ^~~~~~512../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'513 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>514 | ^~~~~~~515../src/daemon/scheduler.hh:429:17: note: 516 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>517 | ^518../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')519 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>520 | ^521../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]522 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)523 | ^524 | static 525../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]526 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)527 | ^528 | /*unused*/529../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]530 478 | struct HelloInfo531 | ^532 479 | {533 480 | std::string_view addr;534 | 535 | {}536 481 | std::vector<std::string> systems; // first is the native one537 | 538 | {}539 482 | std::vector<std::string> features;540 | 541 | {}542../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]543 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)544 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~545../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'546 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)547 | ^~~548../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'549 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)550 | ^~~~~~~551../src/daemon/scheduler.hh:539:10: note: 552 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)553 | ^554../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')555 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)556 | ^557../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]558 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)559 | ^560 | /*unused*/561../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]562 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool563 | ^ ~~~~~564 | static 565../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]566 610 | struct StatsKey567 | ^568 611 | {569 612 | std::string system;570 | 571 | {}572 613 | std::string features; // sorted, comma-joined573 | 574 | {}575../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]576 704 | void retire(DrvId drv)577 | ^578 | static 579../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]580 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)581 | ^582 | static 583../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]584 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)585 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~586../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'587 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)588 | ^~~~589../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'590 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)591 | ^~~592../src/daemon/scheduler.hh:716:26: note: 593 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)594 | ^595../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'596 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)597 | ^598../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]599 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t600 | ^ ~~~~~601 | static 602../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]603 784 | void refreshFree(WorkerId wid)604 | ^605 | static 606../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]607 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>608 | ^ ~~~~~609 | static 610../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]611 865 | return picked;612 | ^613../tests/scheduler-test.cc:3:10: error: 'algorithm' file not found [clang-diagnostic-error]614 3 | #include <algorithm>615 | ^~~~~~~~~~~616../tests/scheduler-test.cc:46:20: error: variable 'minKey' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]617 3 | double minKey = ref.begin()->second;618 | ^ 619 | = NAN620../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]621 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) -> WorkerId622 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~623../tests/scheduler-test.cc:75:43: note: the first parameter in the range is 'addr'624 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) -> WorkerId625 | ^~~~626../tests/scheduler-test.cc:75:141: note: the last parameter in the range is 'features'627 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) -> WorkerId628 | ^~~~~~~~629../tests/scheduler-test.cc:75:26: note: 630 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) -> WorkerId631 | ^632../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'633 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) -> WorkerId634 | ^635../tests/scheduler-test.cc:75:64: note: 'int' and 'const int &' parameters accept and bind the same kind of values636 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) -> WorkerId637 | ^638../tests/scheduler-test.cc:75:49: note: 639 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) -> WorkerId640 | ^641../tests/scheduler-test.cc:75:64: note: 'uint32_t' and 'const int &' parameters accept and bind the same kind of values642 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) -> WorkerId643 | ^644../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')645../tests/scheduler-test.cc:88:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]646 88 | Core shard;647 | ^648 | const 649../tests/scheduler-test.cc:106:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]650 106 | Core shard;651 | ^652 | const 653../tests/scheduler-test.cc:123:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]654 123 | Core shard;655 | ^656 | const 657../tests/scheduler-test.cc:157:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]658 157 | Core shard;659 | ^660 | const 661../tests/scheduler-test.cc:177:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]662 177 | Core shard;663 | ^664 | const 665../tests/scheduler-test.cc:199:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]666 199 | Core shard;667 | ^668 | const 669../tests/scheduler-test.cc:291:5: error: variable 'onBoth' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]670 291 | int onBoth = 0;671 | ^672 | const 673../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]674 335 | auto main() -> int675 | ^676../src/daemon/scheduler.hh:134:13: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'set' here677 134 | throw nix::Error("IndexedHeap: id out of range");678 | ^679../tests/scheduler-test.cc:35:13: note: frame #1: function 'testHeapAgainstMap' calls function 'set' here680 35 | heap.set(id, key);681 | ^682../tests/scheduler-test.cc:337:5: note: frame #2: function 'main' calls function 'testHeapAgainstMap' here683 337 | testHeapAgainstMap();684 | ^685>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/xfcc-test.cc686/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found687/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found688Error while processing /build/source/tests/xfcc-test.cc.689../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]690 29 | std::string_view rest;691 | 692 | {}693 30 | 694 31 | public:695 32 | explicit Cursor(std::string_view input)696 | ^697../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]698 47 | auto take() -> char699 | ^700 | static 701../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]702 52 | char const chr = rest.front();703 | ^ 704 | = 0705../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]706 58 | auto until(std::string_view stops) -> std::optional<std::string_view>707 | ^708 | static 709../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]710 69 | auto remaining() -> std::string_view711 | ^712 | static 713../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]714 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>715 | ^716../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]717 197 | void add(std::string_view pattern)718 | ^719 | static 720../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]721 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool722 | ^ ~~~~~723 | static 724../tests/xfcc-test.cc:1:10: error: 'cassert' file not found [clang-diagnostic-error]725 1 | #include <cassert>726 | ^~~~~~~~~727>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/elector.cc728/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found729/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found730Error while processing /build/source/src/daemon/elector.cc.731../src/daemon/elector.cc:16:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]732 16 | #include <nlohmann/json_fwd.hpp>733 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~734 17 | #include <nlohmann/json.hpp>735../src/daemon/elector.cc:17:1: error: included header json.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]736 17 | #include <nlohmann/json.hpp>737 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~738 18 | 739../src/daemon/elector.cc:19:1: error: included header http.hh is not used directly [misc-include-cleaner,-warnings-as-errors]740 19 | #include "http.hh"741 | ^~~~~~~~~~~~~~~~~~742 20 | #include "logfmt.hh"743../src/daemon/elector.cc:30:8: error: constructor does not initialize these fields: stop, lead, buf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]744 30 | struct Reader745 | ^746 31 | {747 32 | std::stop_token stop;748 | 749 | {}750 33 | std::function<void(bool)> lead;751 | 752 | {}753 34 | std::string buf;754 | 755 | {}756../src/daemon/elector.cc:43:14: error: variable 'eol' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness,-warnings-as-errors]757 43 | for (size_t eol = 0; (eol = reader.buf.find('\n')) != std::string::npos;) {758 | ^759 | const 760../src/daemon/elector.cc:63:1: error: constructor does not initialize these fields: onChange, thread [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]761 63 | Elector::Elector(const Niks3Client & niks3_, std::function<void(bool)> onChange_)762 | ^763../src/daemon/elector.cc:70:10: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]764 70 | Elector::~Elector()765 | ^766/build/source/build/../src/daemon/elector.hh:6:10: error: 'chrono' file not found [clang-diagnostic-error]767 6 | #include <chrono>768 | ^~~~~~~~769../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]770 17 | struct Niks3Config771 | ^772 18 | {773 19 | std::string url;774 | 775 | {}776 20 | std::string tokenFile; // bearer, optional777 | 778 | {}779 21 | std::string clientCert; // mTLS, optional780 | 781 | {}782 22 | std::string clientKey;783 | 784 | {}785 23 | PushProcess::Argv pushArgv;786 | 787 | {}788../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]789 34 | std::string baseUrl;790 | 791 | {}792 35 | std::shared_ptr<TokenFile> bearer;793 | 794 | {}795 36 | std::string clientCert;796 | 797 | {}798 37 | std::string clientKey;799 | 800 | {}801 38 | 802 39 | public:803 40 | explicit Niks3Client(const Niks3Config & cfg)804 | ^805../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]806 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>807 | ^ ~~~~~808 | static 809../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]810 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>811 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~812../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'813 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>814 | ^~~~815../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'816 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>817 | ^~~~818../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values819 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>820 | ^821../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]822 60 | explicit PushProcess(Argv argv)823 | ^824../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]825 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)826 | ^827 | static 828../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]829 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)830 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~831../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'832 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)833 | ^~~~~834../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'835 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)836 | ^~~~~~~~~837../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]838 120 | explicit Pending(size_t count)839 | ^840../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]841 126 | auto ack(const std::string & status, const std::string & message) -> bool842 | ^843 | static 844../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]845 126 | auto ack(const std::string & status, const std::string & message) -> bool846 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~847../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'848 126 | auto ack(const std::string & status, const std::string & message) -> bool849 | ^~~~~~850../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'851 126 | auto ack(const std::string & status, const std::string & message) -> bool852 | ^~~~~~~853../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]854 141 | void fail(const std::string & message)855 | ^856 | static 857../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]858 149 | auto wait(const Cancelled & cancelled) -> Result859 | ^860 | static 861../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]862 162 | struct Inner863 | ^864 163 | {865 164 | size_t left;866 | 867 | {}868../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]869 171 | struct State870 | ^871 172 | {872 173 | nix::Pid pid;873 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;874 | 875 | {}876../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]877 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)878 | ^879 | static 880../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]881 215 | void readAcks(int acksFd)882 | ^883 | static 884../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]885 21 | struct Cached886 | ^887 22 | {888 23 | std::string token;889 | 890 | {}891../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]892 19 | nix::Sync<Cached> cached;893 | 894 | {}895 20 | 896 21 | static auto mtime(const struct stat & info) -> struct timespec897 22 | {898 23 | #ifdef __APPLE__899 24 | return info.st_mtimespec;900 25 | #else901 26 | return info.st_mtim;902 27 | #endif903 28 | }904 29 | 905 30 | public:906 31 | explicit TokenFile(std::string path_)907 | ^908../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]909 46 | auto get() -> std::string910 | ^911 | static 912../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]913 81 | void header(const std::string & line)914 | ^915 | static 916../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]917 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)918 | ^919../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]920 129 | auto perform() -> long921 | ^922 | static 923../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]924 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds925 | ^ ~~~~~926 | static 927../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]928 23 | inline auto logfmtValue(std::string_view value) -> std::string929 | ^930../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]931 52 | enum class LogLevel : std::uint8_t { info, debug };932 | ^933>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/options.cc934/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found935/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found936Error while processing /build/source/src/daemon/options.cc.937../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]938 22 | enum class Role : std::uint8_t {939 | ^940../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]941 51 | class Acl942 | ^943 52 | {944 53 | struct Rule945 54 | {946 55 | std::string pattern;947 56 | Role role;948 57 | };949 58 | 950 59 | std::vector<Rule> rules;951 | 952 | {}953 60 | // Separate from the glob rules so '*' cannot grant anonymous access.954 61 | std::optional<Role> anonRole;955 | 956 | {}957../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]958 53 | struct Rule959 | ^960 54 | {961 55 | std::string pattern;962 | 963 | {}964../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]965 70 | void addRule(std::string_view spec)966 | ^967 | static 968../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]969 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>970 | ^ ~~~~~971 | static 972../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]973 17 | struct Niks3Config974 | ^975 18 | {976 19 | std::string url;977 | 978 | {}979 20 | std::string tokenFile; // bearer, optional980 | 981 | {}982 21 | std::string clientCert; // mTLS, optional983 | 984 | {}985 22 | std::string clientKey;986 | 987 | {}988 23 | PushProcess::Argv pushArgv;989 | 990 | {}991../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]992 34 | std::string baseUrl;993 | 994 | {}995 35 | std::shared_ptr<TokenFile> bearer;996 | 997 | {}998 36 | std::string clientCert;999 | 1000 | {}1001 37 | std::string clientKey;1002 | 1003 | {}1004 38 | 1005 39 | public:1006 40 | explicit Niks3Client(const Niks3Config & cfg)1007 | ^1008../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1009 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1010 | ^ ~~~~~1011 | static 1012../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]1013 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1014 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1015../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'1016 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1017 | ^~~~1018../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'1019 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1020 | ^~~~1021../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values1022 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1023 | ^1024../src/daemon/options.cc:4:1: error: included header nix-compat.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1025 4 | #include "nix-compat.hh"1026 | ^~~~~~~~~~~~~~~~~~~~~~~~1027 5 | 1028../src/daemon/options.cc:21:1: error: included header server_credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]1029 21 | #include <grpcpp/security/server_credentials.h>1030 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1031 22 | #include <grpcpp/security/tls_certificate_provider.h>1032../src/daemon/options.cc:23:1: error: included header tls_credentials_options.h is not used directly [misc-include-cleaner,-warnings-as-errors]1033 23 | #include <grpcpp/security/tls_credentials_options.h>1034 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1035 24 | 1036../src/daemon/options.cc:26:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1037 26 | #include <nix/util/file-system.hh>1038 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1039 27 | #include <nix/util/strings.hh>1040../src/daemon/options.cc:27:1: error: included header strings.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1041 27 | #include <nix/util/strings.hh>1042 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1043 28 | #include <nix/util/util.hh>1044../src/daemon/options.cc:29:1: error: included header environment-variables.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1045 29 | #include <nix/util/environment-variables.hh>1046 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1047 30 | 1048../src/daemon/options.cc:31:1: error: included header acl.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1049 31 | #include "acl.hh"1050 | ^~~~~~~~~~~~~~~~~1051 32 | #include "logfmt.hh"1052../src/daemon/options.cc:36:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1053 36 | #include "xfcc.hh"1054 | ^~~~~~~~~~~~~~~~~~1055 37 | 1056../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]1057 41 | auto parseLogLevel(std::string_view value) -> LogLevel1058 | ^1059../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]1060 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1061 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1062../src/daemon/options.cc:65:59: note: the first parameter in the range is 'tlsCert'1063 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1064 | ^~~~~~~1065../src/daemon/options.cc:65:88: note: the last parameter in the range is 'tlsKey'1066 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1067 | ^~~~~~1068../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]1069 92 | auto parseOptions(const std::vector<std::string_view> & args) -> Options1070 | ^1071 | static 1072../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]1073 227 | auto makeServerCredentials(const Options & options) -> std::shared_ptr<grpc::ServerCredentials>1074 | ^1075 | static 1076../src/daemon/options.hh:4:10: error: 'chrono' file not found [clang-diagnostic-error]1077 4 | #include <chrono>1078 | ^~~~~~~~1079../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]1080 60 | explicit PushProcess(Argv argv)1081 | ^1082../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1083 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1084 | ^1085 | static 1086../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]1087 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1088 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1089../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'1090 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1091 | ^~~~~1092../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'1093 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)1094 | ^~~~~~~~~1095../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1096 120 | explicit Pending(size_t count)1097 | ^1098../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1099 126 | auto ack(const std::string & status, const std::string & message) -> bool1100 | ^1101 | static 1102../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]1103 126 | auto ack(const std::string & status, const std::string & message) -> bool1104 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1105../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'1106 126 | auto ack(const std::string & status, const std::string & message) -> bool1107 | ^~~~~~1108../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'1109 126 | auto ack(const std::string & status, const std::string & message) -> bool1110 | ^~~~~~~1111../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1112 141 | void fail(const std::string & message)1113 | ^1114 | static 1115../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1116 149 | auto wait(const Cancelled & cancelled) -> Result1117 | ^1118 | static 1119../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1120 162 | struct Inner1121 | ^1122 163 | {1123 164 | size_t left;1124 | 1125 | {}1126../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1127 171 | struct State1128 | ^1129 172 | {1130 173 | nix::Pid pid;1131 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;1132 | 1133 | {}1134../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1135 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)1136 | ^1137 | static 1138../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1139 215 | void readAcks(int acksFd)1140 | ^1141 | static 1142../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1143 65 | class IndexedHeap1144 | ^1145 66 | {1146 67 | std::vector<std::pair<double, DrvId>> heap;1147 68 | std::vector<uint32_t> pos;1148 | 1149 | {}1150../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]1151 71 | void place(size_t idx, std::pair<double, DrvId> item)1152 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1153../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'1154 71 | void place(size_t idx, std::pair<double, DrvId> item)1155 | ^~~1156../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'1157 71 | void place(size_t idx, std::pair<double, DrvId> item)1158 | ^~~~1159../src/daemon/scheduler.hh:71:16: note: 1160 71 | void place(size_t idx, std::pair<double, DrvId> item)1161 | ^1162../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')1163 71 | void place(size_t idx, std::pair<double, DrvId> item)1164 | ^1165../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1166 77 | void siftUp(size_t idx)1167 | ^1168 | static 1169../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1170 91 | void siftDown(size_t idx)1171 | ^1172 | static 1173../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1174 94 | const size_t len = heap.size();1175 | ^ 1176 | = 01177../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]1178 131 | void set(DrvId drv, double key)1179 | ^~~~~~~~~~~~~~~~~~~~~1180../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'1181 131 | void set(DrvId drv, double key)1182 | ^~~1183../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'1184 131 | void set(DrvId drv, double key)1185 | ^~~1186../src/daemon/scheduler.hh:131:14: note: 1187 131 | void set(DrvId drv, double key)1188 | ^1189../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')1190 131 | void set(DrvId drv, double key)1191 | ^1192../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1193 174 | class FreeIndex1194 | ^1195 175 | {1196 176 | public:1197 177 | static constexpr int32_t maxSlots = 63;1198 178 | 1199 179 | private:1200 180 | std::vector<int32_t> free; // may go negative (draining below running)1201 | 1202 | {}1203 181 | std::vector<uint32_t> pos;1204 | 1205 | {}1206 182 | std::vector<bool> tracked;1207 | 1208 | {}1209../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1210 191 | void check(WorkerId wid) const1211 | ^ ~~~~~1212 | static 1213../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]1214 221 | void set(WorkerId wid, int32_t val)1215 | ^~~~~~~~~~~~~~~~~~~~~~~~~1216../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'1217 221 | void set(WorkerId wid, int32_t val)1218 | ^~~1219../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'1220 221 | void set(WorkerId wid, int32_t val)1221 | ^~~1222../src/daemon/scheduler.hh:221:14: note: 1223 221 | void set(WorkerId wid, int32_t val)1224 | ^1225../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')1226 221 | void set(WorkerId wid, int32_t val)1227 | ^1228../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1229 272 | struct Assign1230 | ^1231 273 | {1232 274 | DrvId drv = 0;1233 275 | WorkerId worker = 0;1234 276 | uint64_t assignId = 0;1235 277 | std::vector<ClientId> clients;1236 | 1237 | {}1238../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]1239 280 | struct Entry1240 | ^1241 281 | {1242 282 | std::string drvPath;1243 | 1244 | {}1245 283 | std::vector<PathKey> inputs; // for locality only1246 | 1247 | {}1248 284 | std::string system;1249 | 1250 | {}1251 285 | std::vector<std::string> features; // required1252 | 1253 | {}1254 286 | std::vector<ClientId> followers;1255 | 1256 | {}1257../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]1258 293 | struct Worker1259 | ^1260 294 | {1261 295 | std::string addr;1262 | 1263 | {}1264 296 | std::vector<std::string> systems;1265 | 1266 | {}1267 297 | std::vector<std::string> features;1268 | 1269 | {}1270 298 | int32_t maxJobs = 0;1271 299 | bool up = false;1272 300 | bool draining = false;1273 301 | std::vector<DrvId> running;1274 | 1275 | {}1276../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]1277 307 | explicit Core(Config cfg = {})1278 | ^1279../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1280 317 | auto drvId(std::string_view path) -> DrvId1281 | ^1282 | static 1283../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]1284 323 | DrvId drv = 0;1285 | ^1286 | const 1287../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1288 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>1289 | ^ ~~~~~1290 | static 1291../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1292 344 | auto workerId(std::string_view addr) -> WorkerId1293 | ^1294 | static 1295../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1296 365 | [[nodiscard]] auto queued() const -> size_t1297 | ^ ~~~~~1298 | static 1299../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]1300 367 | size_t total = 0;1301 | ^1302 | const 1303../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]1304 385 | struct WantInfo1305 | ^1306 386 | {1307 387 | std::string_view drvPath;1308 | 1309 | {}1310 388 | std::vector<std::string_view> inputs;1311 | 1312 | {}1313 389 | std::string_view system;1314 | 1315 | {}1316 390 | std::vector<std::string> features;1317 | 1318 | {}1319../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1320 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult1321 | ^1322 | static 1323../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1324 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1325 | ^1326 | static 1327../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]1328 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1329 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1330../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'1331 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1332 | ^~~~~~1333../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'1334 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1335 | ^~~~~~~1336../src/daemon/scheduler.hh:429:17: note: 1337 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1338 | ^1339../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')1340 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1341 | ^1342../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1343 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1344 | ^1345 | static 1346../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1347 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1348 | ^1349 | /*unused*/1350../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1351 478 | struct HelloInfo1352 | ^1353 479 | {1354 480 | std::string_view addr;1355 | 1356 | {}1357 481 | std::vector<std::string> systems; // first is the native one1358 | 1359 | {}1360 482 | std::vector<std::string> features;1361 | 1362 | {}1363../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]1364 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1365 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1366../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'1367 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1368 | ^~~1369../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'1370 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1371 | ^~~~~~~1372../src/daemon/scheduler.hh:539:10: note: 1373 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1374 | ^1375../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')1376 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1377 | ^1378../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1379 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1380 | ^1381 | /*unused*/1382../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1383 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool1384 | ^ ~~~~~1385 | static 1386../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1387 610 | struct StatsKey1388 | ^1389 611 | {1390 612 | std::string system;1391 | 1392 | {}1393 613 | std::string features; // sorted, comma-joined1394 | 1395 | {}1396../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1397 704 | void retire(DrvId drv)1398 | ^1399 | static 1400../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1401 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1402 | ^1403 | static 1404../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]1405 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1406 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1407../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'1408 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1409 | ^~~~1410../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'1411 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1412 | ^~~1413../src/daemon/scheduler.hh:716:26: note: 1414 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1415 | ^1416../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'1417 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1418 | ^1419../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1420 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t1421 | ^ ~~~~~1422 | static 1423../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1424 784 | void refreshFree(WorkerId wid)1425 | ^1426 | static 1427../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1428 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>1429 | ^ ~~~~~1430 | static 1431../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]1432 865 | return picked;1433 | ^1434../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1435 21 | struct Cached1436 | ^1437 22 | {1438 23 | std::string token;1439 | 1440 | {}1441../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1442 19 | nix::Sync<Cached> cached;1443 | 1444 | {}1445 20 | 1446 21 | static auto mtime(const struct stat & info) -> struct timespec1447 22 | {1448 23 | #ifdef __APPLE__1449 24 | return info.st_mtimespec;1450 25 | #else1451 26 | return info.st_mtim;1452 27 | #endif1453 28 | }1454 29 | 1455 30 | public:1456 31 | explicit TokenFile(std::string path_)1457 | ^1458../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1459 46 | auto get() -> std::string1460 | ^1461 | static 1462../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1463 29 | std::string_view rest;1464 | 1465 | {}1466 30 | 1467 31 | public:1468 32 | explicit Cursor(std::string_view input)1469 | ^1470../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1471 47 | auto take() -> char1472 | ^1473 | static 1474../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1475 52 | char const chr = rest.front();1476 | ^ 1477 | = 01478../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1479 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1480 | ^1481 | static 1482../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1483 69 | auto remaining() -> std::string_view1484 | ^1485 | static 1486../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]1487 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1488 | ^1489../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1490 192 | class TrustedProxies1491 | ^1492 193 | {1493 194 | std::vector<std::string> patterns;1494 | 1495 | {}1496../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1497 197 | void add(std::string_view pattern)1498 | ^1499 | static 1500../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1501 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1502 | ^ ~~~~~1503 | static 1504../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1505 81 | void header(const std::string & line)1506 | ^1507 | static 1508../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]1509 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1510 | ^1511../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1512 129 | auto perform() -> long1513 | ^1514 | static 1515../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1516 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1517 | ^ ~~~~~1518 | static 1519../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]1520 23 | inline auto logfmtValue(std::string_view value) -> std::string1521 | ^1522../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]1523 52 | enum class LogLevel : std::uint8_t { info, debug };1524 | ^1525../src/nix-compat.hh:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1526 279 | bool dynamic = false;1527 | ^1528 | const 1529../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1530 282 | nix::StorePathSet srcs;1531 | ^ 1532 | = 01533>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/auth.cc1534/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found1535/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found1536Error while processing /build/source/src/daemon/auth.cc.1537../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]1538 22 | enum class Role : std::uint8_t {1539 | ^1540../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1541 51 | class Acl1542 | ^1543 52 | {1544 53 | struct Rule1545 54 | {1546 55 | std::string pattern;1547 56 | Role role;1548 57 | };1549 58 | 1550 59 | std::vector<Rule> rules;1551 | 1552 | {}1553 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1554 61 | std::optional<Role> anonRole;1555 | 1556 | {}1557../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1558 53 | struct Rule1559 | ^1560 54 | {1561 55 | std::string pattern;1562 | 1563 | {}1564../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1565 70 | void addRule(std::string_view spec)1566 | ^1567 | static 1568../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1569 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1570 | ^ ~~~~~1571 | static 1572../src/daemon/auth.cc:17:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1573 17 | #include "oidc.hh"1574 | ^~~~~~~~~~~~~~~~~~1575 18 | #include "xfcc.hh"1576../src/daemon/auth.cc:18:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1577 18 | #include "xfcc.hh"1578 | ^~~~~~~~~~~~~~~~~~1579 19 | 1580../src/daemon/auth.cc:25:12: error: method 'identify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1581 25 | auto Auth::identify(const grpc::ServerContextBase & context) const -> Caller1582 | ^ ~~~~~1583../src/daemon/auth.cc:50:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1584 50 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole) -> grpc::Status1585 | ^1586 | static 1587../src/daemon/auth.cc:78:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1588 78 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole, uint32_t buildMode) -> grpc::Status1589 | ^1590 | static 1591/build/source/build/../src/daemon/auth.hh:5:10: error: 'cstdint' file not found [clang-diagnostic-error]1592 5 | #include <cstdint>1593 | ^~~~~~~~~1594/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]1595 19 | struct Caller1596 | ^1597 20 | {1598 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1599 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics1600 23 | std::optional<Role> role;1601 | 1602 | {}1603/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]1604 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1605 | ^1606../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1607 60 | struct Identity1608 | ^1609 61 | {1610 62 | std::string subject; // "oidc:<provider>:<sub>"1611 | 1612 | {}1613 63 | std::optional<Role> role; // nullopt: verified but no rule matched1614 | 1615 | {}1616../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]1617 76 | } catch (...) {1618 | ^1619../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]1620 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1621 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1622../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1623 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1624 | ^~~~1625../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1626 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1627 | ^~~~1628../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]1629 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1630 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1631../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1632 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1633 | ^~~~~~1634../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1635 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1636 | ^~~~1637../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1638 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1639 | ^1640../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]1641 251 | struct Jwk1642 | ^1643 252 | {1644 253 | std::string kid;1645 | 1646 | {}1647 254 | std::string kty;1648 | 1649 | {}1650 255 | std::string crv;1651 | 1652 | {}1653 256 | std::string pem;1654 | 1655 | {}1656../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]1657 286 | if (jwk.kty == "RSA") {1658 | ^1659../src/daemon/oidc.hh:288:10: note: end of the original1660 288 | } else if (jwk.kty == "EC") {1661 | ^1662../src/daemon/oidc.hh:288:37: note: clone 1 starts here1663 288 | } else if (jwk.kty == "EC") {1664 | ^1665../src/daemon/oidc.hh:290:62: note: clone 2 starts here1666 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {1667 | ^1668../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]1669 294 | } catch (...) {1670 | ^1671../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1672 300 | struct FixedClock1673 | ^1674 301 | {1675 302 | std::chrono::system_clock::time_point at;1676 | 1677 | {}1678../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1679 347 | struct Result1680 | ^1681 348 | {1682 349 | std::optional<Identity> identity;1683 | 1684 | {}1685 350 | std::string error; // for logs, not for the client1686 | 1687 | {}1688../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1689 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)1690 | ^1691../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1692 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1693 | ^1694 | static 1695../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]1696 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1697 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1698../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'1699 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1700 | ^~~~~1701../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'1702 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1703 | ^~~1704../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values1705 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1706 | ^1707../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1708 377 | struct KeySet1709 | ^1710 378 | {1711 379 | std::mutex lock;1712 | 1713 | {}1714 380 | std::vector<Jwk> keys;1715 | 1716 | {}1717 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".1718 382 | std::optional<std::chrono::steady_clock::time_point> fetched;1719 | 1720 | {}1721../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1722 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json1723 | ^ ~~~~~1724 | static 1725../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1726 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>1727 | ^ ~~~~~1728 | static 1729../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]1730 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1731 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1732 443 | std::chrono::steady_clock::time_point now,1733 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1734../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'1735 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1736 | ^~~~~~~1737../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'1738 443 | std::chrono::steady_clock::time_point now,1739 | ^~~1740../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1741 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1742 | ^1743 | static 1744../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]1745 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1746 | ^~~~~~~~~~~~~~~~~~~~~~1747 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1748 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1749../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'1750 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1751 | ^~~~~1752../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'1753 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1754 | ^~~1755../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values1756 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1757 | ^1758../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1759 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1760 | ^1761 | static 1762../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]1763 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1764 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1765../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'1766 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1767 | ^~~~~1768../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'1769 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1770 | ^~~1771../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1772 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1773 | ^1774../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1775 29 | std::string_view rest;1776 | 1777 | {}1778 30 | 1779 31 | public:1780 32 | explicit Cursor(std::string_view input)1781 | ^1782../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1783 47 | auto take() -> char1784 | ^1785 | static 1786../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1787 52 | char const chr = rest.front();1788 | ^ 1789 | = 01790../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1791 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1792 | ^1793 | static 1794../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1795 69 | auto remaining() -> std::string_view1796 | ^1797 | static 1798../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]1799 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1800 | ^1801../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1802 192 | class TrustedProxies1803 | ^1804 193 | {1805 194 | std::vector<std::string> patterns;1806 | 1807 | {}1808../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1809 197 | void add(std::string_view pattern)1810 | ^1811 | static 1812../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1813 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1814 | ^ ~~~~~1815 | static 1816../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1817 81 | void header(const std::string & line)1818 | ^1819 | static 1820../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]1821 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1822 | ^1823../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1824 129 | auto perform() -> long1825 | ^1826 | static 1827../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1828 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1829 | ^ ~~~~~1830 | static 1831../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]1832 23 | inline auto logfmtValue(std::string_view value) -> std::string1833 | ^1834../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]1835 52 | enum class LogLevel : std::uint8_t { info, debug };1836 | ^1837>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/oidc-test.cc1838/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found1839/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found1840Error while processing /build/source/tests/oidc-test.cc.1841../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]1842 22 | enum class Role : std::uint8_t {1843 | ^1844../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1845 51 | class Acl1846 | ^1847 52 | {1848 53 | struct Rule1849 54 | {1850 55 | std::string pattern;1851 56 | Role role;1852 57 | };1853 58 | 1854 59 | std::vector<Rule> rules;1855 | 1856 | {}1857 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1858 61 | std::optional<Role> anonRole;1859 | 1860 | {}1861../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1862 53 | struct Rule1863 | ^1864 54 | {1865 55 | std::string pattern;1866 | 1867 | {}1868../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1869 70 | void addRule(std::string_view spec)1870 | ^1871 | static 1872../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1873 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1874 | ^ ~~~~~1875 | static 1876../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1877 60 | struct Identity1878 | ^1879 61 | {1880 62 | std::string subject; // "oidc:<provider>:<sub>"1881 | 1882 | {}1883 63 | std::optional<Role> role; // nullopt: verified but no rule matched1884 | 1885 | {}1886../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]1887 76 | } catch (...) {1888 | ^1889../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]1890 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1891 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1892../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1893 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1894 | ^~~~1895../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1896 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1897 | ^~~~1898../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]1899 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1900 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1901../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1902 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1903 | ^~~~~~1904../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1905 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1906 | ^~~~1907../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1908 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1909 | ^1910../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]1911 251 | struct Jwk1912 | ^1913 252 | {1914 253 | std::string kid;1915 | 1916 | {}1917 254 | std::string kty;1918 | 1919 | {}1920 255 | std::string crv;1921 | 1922 | {}1923 256 | std::string pem;1924 | 1925 | {}1926../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]1927 286 | if (jwk.kty == "RSA") {1928 | ^1929../src/daemon/oidc.hh:288:10: note: end of the original1930 288 | } else if (jwk.kty == "EC") {1931 | ^1932../src/daemon/oidc.hh:288:37: note: clone 1 starts here1933 288 | } else if (jwk.kty == "EC") {1934 | ^1935../src/daemon/oidc.hh:290:62: note: clone 2 starts here1936 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {1937 | ^1938../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]1939 294 | } catch (...) {1940 | ^1941../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1942 300 | struct FixedClock1943 | ^1944 301 | {1945 302 | std::chrono::system_clock::time_point at;1946 | 1947 | {}1948../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1949 347 | struct Result1950 | ^1951 348 | {1952 349 | std::optional<Identity> identity;1953 | 1954 | {}1955 350 | std::string error; // for logs, not for the client1956 | 1957 | {}1958../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1959 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)1960 | ^1961../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1962 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1963 | ^1964 | static 1965../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]1966 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1967 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1968../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'1969 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1970 | ^~~~~1971../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'1972 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1973 | ^~~1974../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values1975 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1976 | ^1977../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1978 377 | struct KeySet1979 | ^1980 378 | {1981 379 | std::mutex lock;1982 | 1983 | {}1984 380 | std::vector<Jwk> keys;1985 | 1986 | {}1987 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".1988 382 | std::optional<std::chrono::steady_clock::time_point> fetched;1989 | 1990 | {}1991../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1992 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json1993 | ^ ~~~~~1994 | static 1995../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1996 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>1997 | ^ ~~~~~1998 | static 1999../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]2000 442 | std::optional<std::chrono::steady_clock::time_point> fetched,4297 | ^4298 467 | StorePath drvPath;4299 468 | BasicDerivation drv;4300 469 | std::vector<Job *> dependants;4301 | 4302 | {}4303 470 | std::vector<Job *> inputs;4304 | 4305 | {}4306 471 | size_t waiting = 0;4307 472 | uint64_t cpHintMs = 0;4308 473 | unsigned bounced = 0;4309 474 | std::optional<StorePath> failedInput;4310 | 4311 | {}4312 475 | std::optional<BuildResult> result;4313 | 4314 | {}4315 476 | // Set by the reader thread, consumed by a build thread.4316 477 | std::string workerAddr;4317 | 4318 | {}4319 478 | uint64_t assignId = 0;4320 479 | // A second Assigned while building: the scheduler moved the drv to a4321 480 | // worker that was already at it. Followed when the current one bounces.4322 481 | std::string redirectAddr;4323 | 4324 | {}4325/build/source/build/../src/client/store.hh:557:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4326 557 | struct Connection : RemoteStore::Connection4327 | ^4328 558 | {4329 559 | private:4330 560 | friend struct GrpcStore;4331 561 | 4332 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the4333 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the4334 564 | // blocking, ordered semantics the worker protocol relies on without4335 565 | // reimplementing Source/Sink on top of gRPC.4336 566 | grpc::ClientContext ctx;4337 567 | std::unique_ptr<GrpcStream> stream;4338 | 4339 | {}4340 568 | 4341 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC4342 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads4343 571 | 4344 572 | std::jthread reader;4345 | 4346 | {}4347/build/source/build/../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4348 613 | ~GrpcStore() override4349 | ^4350/build/source/build/../src/client/store.hh:619:24: error: rvalue reference parameter 'pathsToCopy' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved,-warnings-as-errors]4351 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override4352 | ^4353/build/source/build/../src/client/store.hh:633:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4354 629 | std::unique_ptr<Source> upstream;4355 | 4356 | {}4357 630 | AutoCloseFD fd;4358 631 | bool complete = false;4359 632 | 4360 633 | explicit ReplayableNar(std::unique_ptr<Source> src)4361 | ^4362/build/source/build/../src/client/store.hh:645:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4363 645 | LambdaSink tee([&](std::string_view data) -> void {4364 | ^4365 | const 4366/build/source/build/../src/client/store.hh:652:23: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]4367 652 | } catch (...) {4368 | ^4369/build/source/build/../src/client/store.hh:667:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4370 667 | FdSource replay(fd.get());4371 | ^4372 | const 4373../src/nix-compat.hh:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4374 279 | bool dynamic = false;4375 | ^4376 | const 4377../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4378 282 | nix::StorePathSet srcs;4379 | ^ 4380 | = 04381../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4382 24 | nix::StringSink sink;4383 | ^4384 | const 4385../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]4386 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4387 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4388../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'4389 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4390 | ^~~~~~~~4391../src/pump.hh:65:57: note: the last parameter in the range is 'buf'4392 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4393 | ^~~4394../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4395 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);4396 | ^ 4397 | = 04398../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]4399 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4400 | ^4401../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]4402 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4403 | ^4404../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]4405 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch4406 | ^4407../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]4408 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4409 | ^4410../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]4411 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4412 | ^4413../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]4414 97 | return static_cast<ssize_t>(got);4415 | ^4416>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/build.cc4417/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found4418/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found4419Error while processing /build/source/src/client/build.cc.4420../src/client/build.cc:33:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4421 33 | #include <nix/store/derived-path.hh>4422 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4423 34 | #include <nix/store/path-info.hh>4424../src/client/build.cc:37:1: error: included header store-open.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4425 37 | #include <nix/store/store-open.hh>4426 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4427 38 | #include <nix/store/worker-protocol.hh>4428../src/client/build.cc:40:1: error: included header finally.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4429 40 | #include <nix/util/finally.hh>4430 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4431 41 | #include <nix/util/repair-flag.hh>4432../src/client/build.cc:41:1: error: included header repair-flag.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4433 41 | #include <nix/util/repair-flag.hh>4434 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4435 42 | #include <nix/util/fmt.hh>4436../src/client/build.cc:49:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]4437 49 | #include "nix_remote.grpc.pb.h"4438 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4439 50 | #include "nix_remote.pb.h"4440../src/client/build.cc:63:17: error: method 'uploadDrvClosure' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4441 63 | void GrpcStore::uploadDrvClosure(Store & evalStore, const StorePath & drvPath, const Metadata & headers) {4442 | ^4443 | static 4444../src/client/build.cc:64:16: error: variable 'closure' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4445 64 | StorePathSet closure;4446 | ^ 4447 | = 04448../src/client/build.cc:67:16: error: variable 'missing' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4449 67 | StorePathSet missing;4450 | ^ 4451 | = 04452../src/client/build.cc:147:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4453 147 | printError("%s: %s, asking the scheduler again", job.drvPath.to_string(), firstLine(status.error_message()));4454 | ^4455/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4456 365 | #define printError(args...) printMsg(lvlError, args)4457 | ^4458/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4459 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4460 | ^4461/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4462 357 | do { \4463 | ^4464../src/client/build.cc:158:17: error: method 'localEvalStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4465 158 | auto GrpcStore::localEvalStore(const StorePathSet & drvPaths) -> std::shared_ptr<Store> {4466 | ^4467 | static 4468../src/client/build.cc:170:19: error: constructor does not initialize these fields: mode, mutex, cv, ready, wantable, remaining [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4469 170 | struct GrpcStore::Run {4470 | ^4471 171 | GrpcStore & store;4472 172 | BuildMode mode;4473 173 | Store & evalStore;4474 174 | std::map<StorePath, Job> & jobs;4475 175 | 4476 176 | std::mutex mutex;4477 | 4478 | {}4479 177 | std::condition_variable cv;4480 | 4481 | {}4482 178 | std::deque<Job *> ready; // assigned, cached, lost or dep-failed: a thread can finish it4483 | 4484 | {}4485 179 | std::deque<Job *> wantable; // inputs done, Want not yet sent4486 | 4487 | {}4488 180 | size_t remaining;4489 | 4490 | {}4491../src/client/build.cc:171:15: error: member 'store' of type 'GrpcStore &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]4492 171 | GrpcStore & store;4493 | ^4494../src/client/build.cc:173:11: error: member 'evalStore' of type 'Store &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]4495 173 | Store & evalStore;4496 | ^4497../src/client/build.cc:174:30: error: member 'jobs' of type 'int &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]4498 174 | std::map<StorePath, Job> & jobs;4499 | ^4500../src/client/build.cc:185:8: error: method 'next' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4501 185 | auto next() -> Job * {4502 | ^4503 | static 4504../src/client/build.cc:212:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4505 212 | debug("grpc: want %s", job.drvPath.to_string());4506 | ^4507/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug'4508 369 | #define debug(args...) printMsg(lvlDebug, args)4509 | ^4510/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4511 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4512 | ^4513/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4514 357 | do { \4515 | ^4516../src/client/build.cc:306:9: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]4517 306 | } catch (Interrupted &) {4518 | ^4519../src/client/build.cc:310:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4520 310 | printError("%s: %s", job->drvPath.to_string(), err.what());4521 | ^4522/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4523 365 | #define printError(args...) printMsg(lvlError, args)4524 | ^4525/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4526 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4527 | ^4528/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4529 357 | do { \4530 | ^4531../src/client/build.cc:336:22: error: method 'cachedResult' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4532 336 | [[nodiscard]] auto cachedResult(const Job & job) const -> BuildResult {4533 | ^ ~~~~~4534 | static 4535../src/client/build.cc:347:8: error: method 'onMsgs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4536 347 | void onMsgs(const remote::SchedMsgs & msgs) {4537 | ^4538 | static 4539../src/client/build.cc:358:11: error: variable 'job' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4540 358 | Job * job = found == byName.end() ? nullptr : found->second;4541 | ^ 4542 | = nullptr4543../src/client/build.cc:370:7: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4544 370 | debug("grpc: assigned %s -> %s", name, msg.assigned().worker_addr());4545 | ^4546/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug'4547 369 | #define debug(args...) printMsg(lvlDebug, args)4548 | ^4549/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4550 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4551 | ^4552/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4553 357 | do { \4554 | ^4555../src/client/build.cc:498:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4556 498 | debug("grpc: scheduler at %s restarting, reconnecting", where);4557 | ^4558/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug'4559 369 | #define debug(args...) printMsg(lvlDebug, args)4560 | ^4561/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4562 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4563 | ^4564/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4565 357 | do { \4566 | ^4567../src/client/build.cc:500:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4568 500 | printError("scheduler at %s: %s, reconnecting", where, GrpcStore::firstLine(status.error_message()));4569 | ^4570/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4571 365 | #define printError(args...) printMsg(lvlError, args)4572 | ^4573/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4574 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4575 | ^4576/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4577 357 | do { \4578 | ^4579../src/client/build.cc:507:17: error: method 'scheduleUntilDone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4580 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers,4581 | ^4582 | static 4583../src/client/build.cc:507:46: error: 2 adjacent parameters of 'scheduleUntilDone' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]4584 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers,4585 | ^~~~~~~~~~~~~~~~~~~~~~~~~4586 508 | const std::function<void(grpc::ClientContext *)> & setCtx) -> grpc::Status {4587 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4588../src/client/build.cc:507:63: note: the first parameter in the range is 'headers'4589 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers,4590 | ^~~~~~~4591../src/client/build.cc:508:86: note: the last parameter in the range is 'setCtx'4592 508 | const std::function<void(grpc::ClientContext *)> & setCtx) -> grpc::Status {4593 | ^~~~~~4594../src/client/build.cc:518:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4595 518 | debug("grpc: Schedule stream open, %d jobs", run.jobs.size());4596 | ^4597/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug'4598 369 | #define debug(args...) printMsg(lvlDebug, args)4599 | ^4600/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4601 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4602 | ^4603/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4604 357 | do { \4605 | ^4606../src/client/build.cc:539:17: error: variable 'runJobs' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]4607 539 | void GrpcStore::runJobs(std::map<StorePath, Job> & jobs, BuildMode buildMode, Store & evalStore) {4608 | ^4609 | static 4610../src/client/build.cc:588:18: error: variable 'drvs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4611 588 | StorePathSet drvs;4612 | ^ 4613 | = 04614../src/client/build.cc:606:16: error: variable 'opaque' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4615 606 | StorePathSet opaque;4616 | ^ 4617 | = 04618../src/client/build.cc:652:17: error: method 'basicForFarm' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4619 652 | auto GrpcStore::basicForFarm(Store & evalStore, const StorePath & drvPath, const Derivation & full)4620 | ^4621 | static 4622../src/client/build.cc:686:16: error: variable 'tops' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4623 686 | StorePathSet tops;4624 | ^ 4625 | = 04626../src/client/build.cc:693:16: error: variable 'outputs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4627 693 | StorePathSet outputs;4628 | ^ 4629 | = 04630../src/client/build.cc:707:16: error: variable 'valid' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4631 707 | StorePathSet valid;4632 | ^ 4633 | = 04634../src/client/build.cc:716:17: error: method 'loadJobs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4635 716 | void GrpcStore::loadJobs(const std::vector<DerivedPath> & reqs, Store & evalStore,4636 | ^4637 | static 4638../src/client/build.cc:764:17: error: variable 'throwOnFailedBuilds' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]4639 764 | void GrpcStore::throwOnFailedBuilds(std::vector<KeyedBuildResult> & results) {4640 | ^4641 | static 4642../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4643 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}4644 | ^4645../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4646 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}4647 | ^4648 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)4649 64 | -> grpc::experimental::Interceptor * override {4650 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it4651 66 | }4652 67 | private:4653 68 | std::shared_ptr<const Headers> headers;4654 | 4655 | {}4656../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4657 77 | std::string path;4658 | 4659 | {}4660 78 | 4661 79 | public:4662 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}4663 | ^4664../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4665 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,4666 | ^4667 | static 4668../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]4669 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {4670 | ^4671 | const 4672../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]4673 95 | } catch (std::exception & err) {4674 | ^4675../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]4676 47 | std::mutex mutex;4677 | 4678 | {}4679 48 | std::condition_variable grown;4680 | 4681 | {}4682 49 | uint64_t written = 0;4683 50 | bool eof = false;4684 51 | std::exception_ptr failure;4685 | 4686 | {}4687 52 | 4688 53 | public:4689 54 | NarSpool()4690 | ^4691../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4692 95 | void fail(const std::exception_ptr & cause)4693 | ^4694 | static 4695../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4696 142 | inline void demuxNarFrames(Reader & reader, const std::vector<std::shared_ptr<NarSpool>> & targets)4697 | ^4698 | /*unused*/4699../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]4700 172 | NarFetcher(4701 | ^4702../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4703 173 | std::function<std::shared_ptr<grpc::Channel>()> channelFactory,4704 | ^4705 | /*unused*/4706../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4707 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4708 | ^4709 | static 4710../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]4711 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4712 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4713../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order'4714 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4715 | ^~~~~4716../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes'4717 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4718 | ^~~~~4719../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4720 224 | ~NarFetcher()4721 | ^4722../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]4723 233 | class Session4724 | ^4725 234 | {4726 235 | friend class NarFetcher;4727 236 | 4728 237 | std::unique_ptr<nix::remote::NixRemote::Stub> stub;4729 | 4730 | {}4731 238 | grpc::ClientContext ctx;4732 239 | std::unique_ptr<grpc::ClientReader<nix::remote::NarFrame>> reader;4733 | 4734 | {}4735 240 | std::vector<std::shared_ptr<NarSpool>> targets;4736 241 | std::jthread thread;4737 | 4738 | {}4739../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4740 243 | void run()4741 | ^4742 | static 4743../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]4744 254 | } catch (...) {4745 | ^4746../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4747 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t4748 | ^ ~~~~~4749 | static 4750../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4751 279 | void startPending()4752 | ^4753 | static 4754../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4755 304 | void startSession(const std::vector<nix::StorePath> & paths)4756 | ^4757 | static 4758../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error]4759 6 | #include <algorithm>4760 | ^~~~~~~~~~~4761../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4762 201 | auto getReference() const -> StoreReference override {4763 | ^4764 | [[nodiscard]] 4765../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4766 212 | auto openStore() const -> ref<Store> override;4767 | ^4768 | [[nodiscard]] 4769../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4770 256 | auto connectHint(const std::string & msg) const -> std::string4771 | ^4772 | [[nodiscard]] 4773../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4774 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message()));4775 | ^4776/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4777 365 | #define printError(args...) printMsg(lvlError, args)4778 | ^4779/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4780 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4781 | ^4782/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4783 357 | do { \4784 | ^4785../src/client/store.hh:352:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4786 348 | std::shared_ptr<Store> evalStore;4787 | 4788 | {}4789 349 | ref<Builder> inner;4790 350 | 4791 351 | public:4792 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr<Store> evalStore,4793 | ^4794../src/client/store.hh:410:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4795 405 | std::string text;4796 | 4797 | {}4798 406 | std::vector<Logger::Field> fields;4799 | 4800 | {}4801 407 | std::optional<Activity> act;4802 | 4803 | {}4804 408 | 4805 409 | public:4806 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4807 | ^4808../src/client/store.hh:410:24: error: 2 adjacent parameters of 'BuildLogActivity' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]4809 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4810 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4811../src/client/store.hh:410:36: note: the first parameter in the range is 'text'4812 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4813 | ^~~~4814../src/client/store.hh:410:69: note: the last parameter in the range is 'fields'4815 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4816 | ^~~~~~4817../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]4818 420 | if (msg.has_log_line()) {4819 | ^4820../src/client/store.hh:422:11: note: else branch starts here4821 422 | } else {4822 | ^4823../src/client/store.hh:466:12: error: constructor does not initialize these fields: dependants, inputs, failedInput, result, workerAddr, redirectAddr, unplaceableSince, unplaceableReason [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4824 466 | struct Job {4825 | ^4826 467 | StorePath drvPath;4827 468 | BasicDerivation drv;4828 469 | std::vector<Job *> dependants;4829 | 4830 | {}4831 470 | std::vector<Job *> inputs;4832 | 4833 | {}4834 471 | size_t waiting = 0;4835 472 | uint64_t cpHintMs = 0;4836 473 | unsigned bounced = 0;4837 474 | std::optional<StorePath> failedInput;4838 | 4839 | {}4840 475 | std::optional<BuildResult> result;4841 | 4842 | {}4843 476 | // Set by the reader thread, consumed by a build thread.4844 477 | std::string workerAddr;4845 | 4846 | {}4847 478 | uint64_t assignId = 0;4848 479 | // A second Assigned while building: the scheduler moved the drv to a4849 480 | // worker that was already at it. Followed when the current one bounces.4850 481 | std::string redirectAddr;4851 | 4852 | {}4853../src/client/store.hh:557:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4854 557 | struct Connection : RemoteStore::Connection4855 | ^4856 558 | {4857 559 | private:4858 560 | friend struct GrpcStore;4859 561 | 4860 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the4861 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the4862 564 | // blocking, ordered semantics the worker protocol relies on without4863 565 | // reimplementing Source/Sink on top of gRPC.4864 566 | grpc::ClientContext ctx;4865 567 | std::unique_ptr<GrpcStream> stream;4866 | 4867 | {}4868 568 | 4869 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC4870 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads4871 571 | 4872 572 | std::jthread reader;4873 | 4874 | {}4875../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4876 613 | ~GrpcStore() override4877 | ^4878../src/client/store.hh:619:24: error: rvalue reference parameter 'pathsToCopy' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved,-warnings-as-errors]4879 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override4880 | ^4881../src/client/store.hh:633:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4882 629 | std::unique_ptr<Source> upstream;4883 | 4884 | {}4885 630 | AutoCloseFD fd;4886 631 | bool complete = false;4887 632 | 4888 633 | explicit ReplayableNar(std::unique_ptr<Source> src)4889 | ^4890../src/client/store.hh:645:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4891 645 | LambdaSink tee([&](std::string_view data) -> void {4892 | ^4893 | const 4894../src/client/store.hh:652:23: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors]4895 652 | } catch (...) {4896 | ^4897../src/client/store.hh:667:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4898 667 | FdSource replay(fd.get());4899 | ^4900 | const 4901../src/nix-compat.hh:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4902 279 | bool dynamic = false;4903 | ^4904 | const 4905../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4906 282 | nix::StorePathSet srcs;4907 | ^ 4908 | = 04909../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4910 24 | nix::StringSink sink;4911 | ^4912 | const 4913../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]4914 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4915 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4916../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'4917 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4918 | ^~~~~~~~4919../src/pump.hh:65:57: note: the last parameter in the range is 'buf'4920 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4921 | ^~~4922../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4923 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);4924 | ^ 4925 | = 04926../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]4927 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4928 | ^4929../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]4930 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4931 | ^4932../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]4933 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch4934 | ^4935../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]4936 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4937 | ^4938../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]4939 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4940 | ^4941../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]4942 97 | return static_cast<ssize_t>(got);4943 | ^4944>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/coordinator.cc4945/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found4946/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found4947Error while processing /build/source/src/daemon/coordinator.cc.4948../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4949 66 | struct BuildEvent4950 | ^4951 67 | {4952 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;4953 69 | std::string text;4954 | 4955 | {}4956../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]4957 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;4958 | ^4959../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4960 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}4961 | ^4962../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4963 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}4964 | ^4965 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)4966 64 | -> grpc::experimental::Interceptor * override {4967 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it4968 66 | }4969 67 | private:4970 68 | std::shared_ptr<const Headers> headers;4971 | 4972 | {}4973../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4974 77 | std::string path;4975 | 4976 | {}4977 78 | 4978 79 | public:4979 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}4980 | ^4981../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4982 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,4983 | ^4984 | static 4985../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]4986 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {4987 | ^4988 | const 4989../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]4990 22 | enum class Role : std::uint8_t {4991 | ^4992../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4993 51 | class Acl4994 | ^4995 52 | {4996 53 | struct Rule4997 54 | {4998 55 | std::string pattern;4999 56 | Role role;5000 57 | };5001 58 | 5002 59 | std::vector<Rule> rules;5003 | 5004 | {}5005 60 | // Separate from the glob rules so '*' cannot grant anonymous access.5006 61 | std::optional<Role> anonRole;5007 | 5008 | {}5009../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5010 53 | struct Rule5011 | ^5012 54 | {5013 55 | std::string pattern;5014 | 5015 | {}5016../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5017 70 | void addRule(std::string_view spec)5018 | ^5019 | static 5020../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5021 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>5022 | ^ ~~~~~5023 | static 5024../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5025 19 | struct Caller5026 | ^5027 20 | {5028 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5029 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics5030 23 | std::optional<Role> role;5031 | 5032 | {}5033../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]5034 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5035 | ^5036../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5037 53 | struct Backends5038 | ^5039 54 | {5040 55 | std::string socketPath;5041 | 5042 | {}5043../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5044 82 | if (event.kind == BuildEvent::Kind::phase) {5045 | ^5046../src/daemon/backend.hh:84:7: note: else branch starts here5047 84 | } else {5048 | ^5049../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5050 40 | std::optional<Remote> remote;5051 | 5052 | {}5053 41 | 5054 42 | public:5055 43 | explicit Cache(const Niks3Config & cfg)5056 | ^5057../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5058 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>5059 | ^5060 | static 5061../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5062 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5063 | ^5064 | static 5065../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]5066 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5067 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5068../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'5069 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5070 | ^~~~~5071../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'5072 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5073 | ^~~~~~~~~5074../src/daemon/cache.hh:103:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5075 103 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const5076 | ^ ~~~~~5077 | static 5078../src/daemon/coordinator.cc:25:1: error: included header create_channel.h is not used directly [misc-include-cleaner,-warnings-as-errors]5079 25 | #include <grpcpp/create_channel.h>5080 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5081 26 | #include <grpcpp/health_check_service_interface.h>5082../src/daemon/coordinator.cc:27:1: error: included header credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]5083 27 | #include <grpcpp/security/credentials.h>5084 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5085 28 | #include <grpcpp/security/tls_certificate_provider.h>5086../src/daemon/coordinator.cc:28:1: error: included header tls_certificate_provider.h is not used directly [misc-include-cleaner,-warnings-as-errors]5087 28 | #include <grpcpp/security/tls_certificate_provider.h>5088 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5089 29 | #include <grpcpp/security/tls_credentials_options.h>5090../src/daemon/coordinator.cc:34:1: error: included header status.h is not used directly [misc-include-cleaner,-warnings-as-errors]5091 34 | #include <grpcpp/support/status.h>5092 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5093 35 | #include <grpcpp/support/sync_stream.h>5094../src/daemon/coordinator.cc:35:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors]5095 35 | #include <grpcpp/support/sync_stream.h>5096 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5097 36 | 5098../src/daemon/coordinator.cc:38:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5099 38 | #include <nix/util/file-system.hh>5100 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5101 39 | 5102../src/daemon/coordinator.cc:43:1: error: included header cache.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5103 43 | #include "cache.hh"5104 | ^~~~~~~~~~~~~~~~~~~5105 44 | #include "client/channel.hh"5106../src/daemon/coordinator.cc:44:1: error: included header channel.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5107 44 | #include "client/channel.hh"5108 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5109 45 | #include "logfmt.hh"5110../src/daemon/coordinator.cc:47:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]5111 47 | #include "nix_remote.grpc.pb.h"5112 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5113 48 | #include "nix_remote.pb.h"5114../src/daemon/coordinator.cc:70:1: error: constructor does not initialize these fields: state, sendFn [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5115 70 | Builder::Builder(const Options & options, Metrics & metrics)5116 | ^5117../src/daemon/coordinator.cc:91:15: error: method 'onRevoke' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5118 91 | void Builder::onRevoke(const nix::remote::Revoke & rev)5119 | ^5120../src/daemon/coordinator.cc:112:15: error: method 'admit' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5121 112 | auto Builder::admit(const std::string & drvPath) -> std::optional<Admission>5122 | ^5123 | static 5124../src/daemon/coordinator.cc:125:15: error: method 'finished' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5125 125 | void Builder::finished(5126 | ^5127 | static 5128../src/daemon/coordinator.cc:128:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5129 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs,5130 | ^5131 | /*unused*/5132../src/daemon/coordinator.cc:152:5: error: 2 adjacent parameters of 'sendDone' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5133 152 | const std::string & drvPath,5134 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5135 153 | uint64_t assignId,5136 | ~~~~~~~~~~~~~~~~~5137../src/daemon/coordinator.cc:152:25: note: the first parameter in the range is 'drvPath'5138 152 | const std::string & drvPath,5139 | ^~~~~~~5140../src/daemon/coordinator.cc:153:14: note: the last parameter in the range is 'assignId'5141 153 | uint64_t assignId,5142 | ^~~~~~~~5143../src/daemon/coordinator.cc:152:5: note: 5144 152 | const std::string & drvPath,5145 | ^5146../src/daemon/coordinator.cc:153:5: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5147 153 | uint64_t assignId,5148 | ^5149../src/daemon/coordinator.cc:153: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')5150../src/daemon/coordinator.cc:155:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5151 155 | const std::vector<std::pair<std::string, uint64_t>> & outputs)5152 | ^5153 | /*unused*/5154../src/daemon/coordinator.cc:195:15: error: method 'setDraining' can be made const [readability-make-member-function-const,-warnings-as-errors]5155 195 | void Builder::setDraining(bool draining)5156 | ^ 5157 | const5158../src/daemon/coordinator.cc:210:15: error: method 'send' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5159 210 | auto Builder::send(const WorkerMsg & msg) const -> bool5160 | ^ ~~~~~5161../src/daemon/coordinator.cc:216:15: error: method 'tick' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5162 216 | void Builder::tick()5163 | ^5164../src/daemon/coordinator.cc:292:5: error: variable 'tls' of type 'grpc::experimental::TlsChannelCredentialsOptions' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5165 292 | grpc::experimental::TlsChannelCredentialsOptions tls;5166 | ^5167 | const 5168../src/daemon/coordinator.cc:296:24: error: no header providing "nix::Error" is directly included [misc-include-cleaner,-warnings-as-errors]5169 47 | throw nix::Error("loading CA certificates: %s", status.ToString());5170 | ^5171../src/daemon/coordinator.cc:321:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5172 321 | if (active) {5173 | ^5174../src/daemon/coordinator.cc:323:7: note: else branch starts here5175 323 | } else {5176 | ^5177../src/daemon/coordinator.cc:340:1: error: constructor does not initialize these fields: builder, dispatcher, scheduler, sessionThread, elector [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5178 340 | Coordinator::Coordinator(const Options & options, Auth & auth, Metrics & metrics)5179 | ^5180../src/daemon/coordinator.cc:406:20: error: variable 'elect' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5181 406 | const bool elect = options.niks3.enabled() && (!builder || !options.schedulerAddr.empty());5182 | ^ 5183 | = false5184../src/daemon/coordinator.cc:415:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5185 415 | if (options.schedulerAddr.empty()) {5186 | ^5187../src/daemon/coordinator.cc:417:7: note: else branch starts here5188 417 | } else {5189 | ^5190../src/daemon/coordinator.cc:455:9: error: variable 'restarting' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5191 455 | bool restarting = false;5192 | ^5193 | const 5194/build/source/build/../src/daemon/coordinator.hh:5:10: error: 'atomic' file not found [clang-diagnostic-error]5195 5 | #include <atomic>5196 | ^~~~~~~~5197/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]5198 45 | struct Expected5199 | ^5200 46 | {5201 47 | uint64_t assignId = 0;5202 48 | Clock::time_point since;5203 | 5204 | {}5205/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]5206 52 | struct Shared5207 | ^5208 53 | {5209 54 | std::mutex mutex;5210 | 5211 | {}5212 55 | std::condition_variable cv;5213 | 5214 | {}5215 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along5216 57 | std::atomic<unsigned> attached{0}; // callers waiting in attach(); the build outlives its first caller for them5217 58 | bool finished = false;5218 59 | std::string resultWire; // BuildDerivationDone serialised5219 | 5220 | {}5221/build/source/build/../src/daemon/coordinator.hh:80:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5222 80 | struct Admission5223 | ^5224 81 | {5225 82 | std::shared_ptr<Expected::Shared> shared;5226 | 5227 | {}5228/build/source/build/../src/daemon/coordinator.hh:91: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]5229 91 | const std::vector<std::pair<std::string, uint64_t>> & outputs,5230 | ^~~~~5231/build/source/build/../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5232 95 | auto hello() const -> nix::remote::WorkerMsg;5233 | ^5234 | [[nodiscard]] 5235/build/source/build/../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5236 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;5237 | ^5238 | [[nodiscard]] 5239/build/source/build/../src/daemon/coordinator.hh:111:21: error: member 'options' of type 'const Options &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]5240 111 | const Options & options;5241 | ^5242/build/source/build/../src/daemon/coordinator.hh:112:15: error: member 'metrics' of type 'Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]5243 112 | Metrics & metrics;5244 | ^5245/build/source/build/../src/daemon/coordinator.hh:114:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5246 114 | struct State5247 | ^5248 115 | {5249 116 | std::unordered_map<std::string, Expected> expected;5250 | 5251 | {}5252/build/source/build/../src/daemon/coordinator.hh:128: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]5253 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs);5254 | ^~~~~5255../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5256 45 | struct Config5257 | ^5258 46 | {5259 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system5260 | 5261 | {}5262 48 | PresentFn present; // unset: nothing is ever Cached5263 | 5264 | {}5265../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5266 64 | struct Client5267 | ^5268 65 | {5269 66 | sched::ClientId id = 0;5270 67 | ClientSend send;5271 | 5272 | {}5273../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5274 80 | struct Worker5275 | ^5276 81 | {5277 82 | WorkerSend send;5278 | 5279 | {}5280 83 | std::optional<sched::WorkerId> id;5281 | 5282 | {}5283../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5284 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &5285 | ^5286 | [[nodiscard]] 5287/nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'5288 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))5289 | ^5290../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5291 71 | std::string method;5292 | 5293 | {}5294 72 | prometheus::Histogram * hist = nullptr;5295 73 | std::chrono::steady_clock::time_point start;5296 | 5297 | {}5298 74 | 5299 75 | public:5300 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.5301 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)5302 | ^5303../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5304 145 | void buildInfo(5305 | ^5306 | static 5307../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]5308 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5309 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5310../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'5311 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5312 | ^~~~~~~5313../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'5314 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5315 | ^~~~~~~~5316../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5317 156 | void buildSlots(unsigned count)5318 | ^5319 | static 5320../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]5321 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5322 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5323../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'5324 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5325 | ^~~~~~5326../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'5327 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5328 | ^~~~~5329../src/daemon/metrics.hh:186:36: note: 5330 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5331 | ^5332../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values5333 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5334 | ^5335../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')5336../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5337 21 | explicit Metrics(const std::string & listen)5338 | ^5339../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]5340 213 | void countRpc(const std::string & method, const std::string & commonName)5341 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5342../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'5343 213 | void countRpc(const std::string & method, const std::string & commonName)5344 | ^~~~~~5345../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'5346 213 | void countRpc(const std::string & method, const std::string & commonName)5347 | ^~~~~~~~~~5348../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]5349 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5350 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5351../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'5352 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5353 | ^~~~~~~~~~5354../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'5355 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5356 | ^~~~~~~~5357../src/daemon/metrics.hh:218:27: note: 5358 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5359 | ^5360../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5361 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5362 | ^5363../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')5364../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]5365 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5366 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5367../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'5368 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5369 | ^~~~~~~~~5370../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'5371 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5372 | ^~~~~5373../src/daemon/metrics.hh:224:24: note: 5374 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5375 | ^5376../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5377 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5378 | ^5379../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')5380../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]5381 17 | struct Niks3Config5382 | ^5383 18 | {5384 19 | std::string url;5385 | 5386 | {}5387 20 | std::string tokenFile; // bearer, optional5388 | 5389 | {}5390 21 | std::string clientCert; // mTLS, optional5391 | 5392 | {}5393 22 | std::string clientKey;5394 | 5395 | {}5396 23 | PushProcess::Argv pushArgv;5397 | 5398 | {}5399../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]5400 34 | std::string baseUrl;5401 | 5402 | {}5403 35 | std::shared_ptr<TokenFile> bearer;5404 | 5405 | {}5406 36 | std::string clientCert;5407 | 5408 | {}5409 37 | std::string clientKey;5410 | 5411 | {}5412 38 | 5413 39 | public:5414 40 | explicit Niks3Client(const Niks3Config & cfg)5415 | ^5416../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5417 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5418 | ^ ~~~~~5419 | static 5420../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]5421 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5422 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5423../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'5424 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5425 | ^~~~5426../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'5427 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5428 | ^~~~5429../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values5430 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5431 | ^5432../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5433 60 | struct Identity5434 | ^5435 61 | {5436 62 | std::string subject; // "oidc:<provider>:<sub>"5437 | 5438 | {}5439 63 | std::optional<Role> role; // nullopt: verified but no rule matched5440 | 5441 | {}5442../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]5443 76 | } catch (...) {5444 | ^5445../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]5446 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5447 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5448../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'5449 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5450 | ^~~~5451../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'5452 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5453 | ^~~~5454../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]5455 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5456 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5457../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'5458 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5459 | ^~~~~~5460../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'5461 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5462 | ^~~~5463../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5464 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5465 | ^5466../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]5467 251 | struct Jwk5468 | ^5469 252 | {5470 253 | std::string kid;5471 | 5472 | {}5473 254 | std::string kty;5474 | 5475 | {}5476 255 | std::string crv;5477 | 5478 | {}5479 256 | std::string pem;5480 | 5481 | {}5482../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]5483 286 | if (jwk.kty == "RSA") {5484 | ^5485../src/daemon/oidc.hh:288:10: note: end of the original5486 288 | } else if (jwk.kty == "EC") {5487 | ^5488../src/daemon/oidc.hh:288:37: note: clone 1 starts here5489 288 | } else if (jwk.kty == "EC") {5490 | ^5491../src/daemon/oidc.hh:290:62: note: clone 2 starts here5492 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {5493 | ^5494../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]5495 294 | } catch (...) {5496 | ^5497../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5498 300 | struct FixedClock5499 | ^5500 301 | {5501 302 | std::chrono::system_clock::time_point at;5502 | 5503 | {}5504../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5505 347 | struct Result5506 | ^5507 348 | {5508 349 | std::optional<Identity> identity;5509 | 5510 | {}5511 350 | std::string error; // for logs, not for the client5512 | 5513 | {}5514../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5515 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)5516 | ^5517../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5518 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5519 | ^5520 | static 5521../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]5522 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5523 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5524../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'5525 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5526 | ^~~~~5527../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'5528 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5529 | ^~~5530../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values5531 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5532 | ^5533../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5534 377 | struct KeySet5535 | ^5536 378 | {5537 379 | std::mutex lock;5538 | 5539 | {}5540 380 | std::vector<Jwk> keys;5541 | 5542 | {}5543 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".5544 382 | std::optional<std::chrono::steady_clock::time_point> fetched;5545 | 5546 | {}5547../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5548 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json5549 | ^ ~~~~~5550 | static 5551../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5552 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>5553 | ^ ~~~~~5554 | static 5555../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]5556 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5557 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5558 443 | std::chrono::steady_clock::time_point now,5559 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5560../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'5561 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5562 | ^~~~~~~5563../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'5564 443 | std::chrono::steady_clock::time_point now,5565 | ^~~5566../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5567 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5568 | ^5569 | static 5570../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]5571 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5572 | ^~~~~~~~~~~~~~~~~~~~~~5573 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5574 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5575../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'5576 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5577 | ^~~~~5578../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'5579 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5580 | ^~~5581../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values5582 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5583 | ^5584../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5585 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5586 | ^5587 | static 5588../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]5589 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5590 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5591../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'5592 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5593 | ^~~~~5594../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'5595 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5596 | ^~~5597../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5598 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5599 | ^5600../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]5601 21 | struct Options5602 | ^5603 22 | {5604 23 | std::string listen = "0.0.0.0:50051";5605 24 | std::optional<std::chrono::seconds> idleTimeout;5606 | 5607 | {}5608 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";5609 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.5610 27 | std::string storeUri;5611 | 5612 | {}5613 28 | std::string tlsCert;5614 | 5615 | {}5616 29 | std::string tlsKey;5617 | 5618 | {}5619 30 | std::string clientCA;5620 | 5621 | {}5622 31 | std::string metricsListen;5623 | 5624 | {}5625 32 | std::string workerName;5626 | 5627 | {}5628 33 | LogLevel logLevel = LogLevel::info;5629 34 | Acl acl;5630 35 | xfcc::TrustedProxies proxies;5631 36 | std::string oidcConfig;5632 | 5633 | {}5634../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]5635 60 | explicit PushProcess(Argv argv)5636 | ^5637../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5638 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5639 | ^5640 | static 5641../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]5642 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5643 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5644../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'5645 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5646 | ^~~~~5647../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'5648 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)5649 | ^~~~~~~~~5650../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5651 120 | explicit Pending(size_t count)5652 | ^5653../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5654 126 | auto ack(const std::string & status, const std::string & message) -> bool5655 | ^5656 | static 5657../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]5658 126 | auto ack(const std::string & status, const std::string & message) -> bool5659 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5660../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'5661 126 | auto ack(const std::string & status, const std::string & message) -> bool5662 | ^~~~~~5663../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'5664 126 | auto ack(const std::string & status, const std::string & message) -> bool5665 | ^~~~~~~5666../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5667 141 | void fail(const std::string & message)5668 | ^5669 | static 5670../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5671 149 | auto wait(const Cancelled & cancelled) -> Result5672 | ^5673 | static 5674../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5675 162 | struct Inner5676 | ^5677 163 | {5678 164 | size_t left;5679 | 5680 | {}5681../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5682 171 | struct State5683 | ^5684 172 | {5685 173 | nix::Pid pid;5686 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;5687 | 5688 | {}5689../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5690 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)5691 | ^5692 | static 5693../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5694 215 | void readAcks(int acksFd)5695 | ^5696 | static 5697../src/daemon/sched-reactor.hh:28:8: error: constructor does not initialize these fields: queue [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5698 28 | struct SendQueue5699 | ^5700 29 | {5701 30 | // About a minute of Expects at full rate. Beyond it the peer is stuck.5702 31 | static constexpr size_t limit = 1U << 16U;5703 32 | // Messages per Write.5704 33 | static constexpr int maxBatch = 1024;5705 34 | 5706 35 | // Leaf lock, may be taken inside Dispatcher::mutex.5707 36 | absl::Mutex mutex;5708 37 | std::deque<Msg> queue ABSL_GUARDED_BY(mutex);5709 | {}5710../src/daemon/sched-reactor.hh:58:5: error: constructor does not initialize these fields: sendq [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5711 58 | explicit SchedReactorBase(grpc::CallbackServerContext * ctx)5712 | ^5713../src/daemon/sched-reactor.hh:69:13: error: variable 'kick' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5714 69 | bool kick = false;5715 | ^5716 | const 5717../src/daemon/sched-reactor.hh:153:9: error: variable 'have' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5718 153 | bool have = false;5719 | ^5720 | const 5721../src/daemon/sched-reactor.hh:183:9: error: variable 'fin' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5722 183 | bool fin = false;5723 | ^5724 | const 5725../src/daemon/sched-reactor.hh:206:5: error: constructor does not initialize these fields: client [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5726 206 | ScheduleReactor(grpc::CallbackServerContext * ctx, Dispatcher & disp)5727 | ^5728../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]5729 226 | Dispatcher & disp;5730 | ^5731../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]5732 255 | Dispatcher & disp;5733 | ^5734../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5735 65 | class IndexedHeap5736 | ^5737 66 | {5738 67 | std::vector<std::pair<double, DrvId>> heap;5739 68 | std::vector<uint32_t> pos;5740 | 5741 | {}5742../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]5743 71 | void place(size_t idx, std::pair<double, DrvId> item)5744 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5745../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'5746 71 | void place(size_t idx, std::pair<double, DrvId> item)5747 | ^~~5748../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'5749 71 | void place(size_t idx, std::pair<double, DrvId> item)5750 | ^~~~5751../src/daemon/scheduler.hh:71:16: note: 5752 71 | void place(size_t idx, std::pair<double, DrvId> item)5753 | ^5754../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')5755 71 | void place(size_t idx, std::pair<double, DrvId> item)5756 | ^5757../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5758 77 | void siftUp(size_t idx)5759 | ^5760 | static 5761../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5762 91 | void siftDown(size_t idx)5763 | ^5764 | static 5765../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5766 94 | const size_t len = heap.size();5767 | ^ 5768 | = 05769../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]5770 131 | void set(DrvId drv, double key)5771 | ^~~~~~~~~~~~~~~~~~~~~5772../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'5773 131 | void set(DrvId drv, double key)5774 | ^~~5775../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'5776 131 | void set(DrvId drv, double key)5777 | ^~~5778../src/daemon/scheduler.hh:131:14: note: 5779 131 | void set(DrvId drv, double key)5780 | ^5781../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')5782 131 | void set(DrvId drv, double key)5783 | ^5784../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5785 174 | class FreeIndex5786 | ^5787 175 | {5788 176 | public:5789 177 | static constexpr int32_t maxSlots = 63;5790 178 | 5791 179 | private:5792 180 | std::vector<int32_t> free; // may go negative (draining below running)5793 | 5794 | {}5795 181 | std::vector<uint32_t> pos;5796 | 5797 | {}5798 182 | std::vector<bool> tracked;5799 | 5800 | {}5801../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5802 191 | void check(WorkerId wid) const5803 | ^ ~~~~~5804 | static 5805../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]5806 221 | void set(WorkerId wid, int32_t val)5807 | ^~~~~~~~~~~~~~~~~~~~~~~~~5808../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'5809 221 | void set(WorkerId wid, int32_t val)5810 | ^~~5811../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'5812 221 | void set(WorkerId wid, int32_t val)5813 | ^~~5814../src/daemon/scheduler.hh:221:14: note: 5815 221 | void set(WorkerId wid, int32_t val)5816 | ^5817../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')5818 221 | void set(WorkerId wid, int32_t val)5819 | ^5820../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5821 272 | struct Assign5822 | ^5823 273 | {5824 274 | DrvId drv = 0;5825 275 | WorkerId worker = 0;5826 276 | uint64_t assignId = 0;5827 277 | std::vector<ClientId> clients;5828 | 5829 | {}5830../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]5831 280 | struct Entry5832 | ^5833 281 | {5834 282 | std::string drvPath;5835 | 5836 | {}5837 283 | std::vector<PathKey> inputs; // for locality only5838 | 5839 | {}5840 284 | std::string system;5841 | 5842 | {}5843 285 | std::vector<std::string> features; // required5844 | 5845 | {}5846 286 | std::vector<ClientId> followers;5847 | 5848 | {}5849../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]5850 293 | struct Worker5851 | ^5852 294 | {5853 295 | std::string addr;5854 | 5855 | {}5856 296 | std::vector<std::string> systems;5857 | 5858 | {}5859 297 | std::vector<std::string> features;5860 | 5861 | {}5862 298 | int32_t maxJobs = 0;5863 299 | bool up = false;5864 300 | bool draining = false;5865 301 | std::vector<DrvId> running;5866 | 5867 | {}5868../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]5869 307 | explicit Core(Config cfg = {})5870 | ^5871../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5872 317 | auto drvId(std::string_view path) -> DrvId5873 | ^5874 | static 5875../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]5876 323 | DrvId drv = 0;5877 | ^5878 | const 5879../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5880 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>5881 | ^ ~~~~~5882 | static 5883../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5884 344 | auto workerId(std::string_view addr) -> WorkerId5885 | ^5886 | static 5887../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5888 365 | [[nodiscard]] auto queued() const -> size_t5889 | ^ ~~~~~5890 | static 5891../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]5892 367 | size_t total = 0;5893 | ^5894 | const 5895../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]5896 385 | struct WantInfo5897 | ^5898 386 | {5899 387 | std::string_view drvPath;5900 | 5901 | {}5902 388 | std::vector<std::string_view> inputs;5903 | 5904 | {}5905 389 | std::string_view system;5906 | 5907 | {}5908 390 | std::vector<std::string> features;5909 | 5910 | {}5911../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5912 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult5913 | ^5914 | static 5915../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5916 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5917 | ^5918 | static 5919../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]5920 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5921 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5922../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'5923 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5924 | ^~~~~~5925../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'5926 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5927 | ^~~~~~~5928../src/daemon/scheduler.hh:429:17: note: 5929 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5930 | ^5931../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')5932 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5933 | ^5934../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5935 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)5936 | ^5937 | static 5938../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5939 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)5940 | ^5941 | /*unused*/5942../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5943 478 | struct HelloInfo5944 | ^5945 479 | {5946 480 | std::string_view addr;5947 | 5948 | {}5949 481 | std::vector<std::string> systems; // first is the native one5950 | 5951 | {}5952 482 | std::vector<std::string> features;5953 | 5954 | {}5955../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]5956 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5957 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5958../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'5959 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5960 | ^~~5961../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'5962 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5963 | ^~~~~~~5964../src/daemon/scheduler.hh:539:10: note: 5965 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5966 | ^5967../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')5968 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5969 | ^5970../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5971 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)5972 | ^5973 | /*unused*/5974../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5975 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool5976 | ^ ~~~~~5977 | static 5978../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5979 610 | struct StatsKey5980 | ^5981 611 | {5982 612 | std::string system;5983 | 5984 | {}5985 613 | std::string features; // sorted, comma-joined5986 | 5987 | {}5988../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5989 704 | void retire(DrvId drv)5990 | ^5991 | static 5992../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5993 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)5994 | ^5995 | static 5996../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]5997 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)5998 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5999../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'6000 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6001 | ^~~~6002../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'6003 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6004 | ^~~6005../src/daemon/scheduler.hh:716:26: note: 6006 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6007 | ^6008../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'6009 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6010 | ^6011../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6012 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t6013 | ^ ~~~~~6014 | static 6015../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6016 784 | void refreshFree(WorkerId wid)6017 | ^6018 | static 6019../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6020 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>6021 | ^ ~~~~~6022 | static 6023../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]6024 865 | return picked;6025 | ^6026../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6027 21 | struct Cached6028 | ^6029 22 | {6030 23 | std::string token;6031 | 6032 | {}6033../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6034 19 | nix::Sync<Cached> cached;6035 | 6036 | {}6037 20 | 6038 21 | static auto mtime(const struct stat & info) -> struct timespec6039 22 | {6040 23 | #ifdef __APPLE__6041 24 | return info.st_mtimespec;6042 25 | #else6043 26 | return info.st_mtim;6044 27 | #endif6045 28 | }6046 29 | 6047 30 | public:6048 31 | explicit TokenFile(std::string path_)6049 | ^6050../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6051 46 | auto get() -> std::string6052 | ^6053 | static 6054../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6055 29 | std::string_view rest;6056 | 6057 | {}6058 30 | 6059 31 | public:6060 32 | explicit Cursor(std::string_view input)6061 | ^6062../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6063 47 | auto take() -> char6064 | ^6065 | static 6066../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6067 52 | char const chr = rest.front();6068 | ^ 6069 | = 06070../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6071 58 | auto until(std::string_view stops) -> std::optional<std::string_view>6072 | ^6073 | static 6074../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6075 69 | auto remaining() -> std::string_view6076 | ^6077 | static 6078../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]6079 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>6080 | ^6081../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6082 192 | class TrustedProxies6083 | ^6084 193 | {6085 194 | std::vector<std::string> patterns;6086 | 6087 | {}6088../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6089 197 | void add(std::string_view pattern)6090 | ^6091 | static 6092../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6093 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool6094 | ^ ~~~~~6095 | static 6096../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6097 81 | void header(const std::string & line)6098 | ^6099 | static 6100../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]6101 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)6102 | ^6103../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6104 129 | auto perform() -> long6105 | ^6106 | static 6107../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6108 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds6109 | ^ ~~~~~6110 | static 6111../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]6112 23 | inline auto logfmtValue(std::string_view value) -> std::string6113 | ^6114../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]6115 52 | enum class LogLevel : std::uint8_t { info, debug };6116 | ^6117../src/nix-compat.hh:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6118 279 | bool dynamic = false;6119 | ^6120 | const 6121../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6122 282 | nix::StorePathSet srcs;6123 | ^ 6124 | = 06125>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/main.cc6126Errors encountered while running clang-tidy6127/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found6128/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found6129Error while processing /build/source/src/daemon/main.cc.6130../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6131 66 | struct BuildEvent6132 | ^6133 67 | {6134 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6135 69 | std::string text;6136 | 6137 | {}6138../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]6139 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6140 | ^6141../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]6142 22 | enum class Role : std::uint8_t {6143 | ^6144../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6145 51 | class Acl6146 | ^6147 52 | {6148 53 | struct Rule6149 54 | {6150 55 | std::string pattern;6151 56 | Role role;6152 57 | };6153 58 | 6154 59 | std::vector<Rule> rules;6155 | 6156 | {}6157 60 | // Separate from the glob rules so '*' cannot grant anonymous access.6158 61 | std::optional<Role> anonRole;6159 | 6160 | {}6161../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6162 53 | struct Rule6163 | ^6164 54 | {6165 55 | std::string pattern;6166 | 6167 | {}6168../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6169 70 | void addRule(std::string_view spec)6170 | ^6171 | static 6172../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6173 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>6174 | ^ ~~~~~6175 | static 6176../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6177 19 | struct Caller6178 | ^6179 20 | {6180 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6181 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics6182 23 | std::optional<Role> role;6183 | 6184 | {}6185../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]6186 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6187 | ^6188../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6189 53 | struct Backends6190 | ^6191 54 | {6192 55 | std::string socketPath;6193 | 6194 | {}6195../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]6196 82 | if (event.kind == BuildEvent::Kind::phase) {6197 | ^6198../src/daemon/backend.hh:84:7: note: else branch starts here6199 84 | } else {6200 | ^6201../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6202 40 | std::optional<Remote> remote;6203 | 6204 | {}6205 41 | 6206 42 | public:6207 43 | explicit Cache(const Niks3Config & cfg)6208 | ^6209../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6210 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>6211 | ^6212 | static 6213../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6214 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6215 | ^6216 | static 6217../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]6218 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6219 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6220../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'6221 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6222 | ^~~~~6223../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'6224 87 | void publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6225 | ^~~~~~~~~6226../src/daemon/cache.hh:103:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6227 103 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const6228 | ^ ~~~~~6229 | static 6230../src/daemon/coordinator.hh:45:8: error: constructor does not initialize these fields: since [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6231 45 | struct Expected6232 | ^6233 46 | {6234 47 | uint64_t assignId = 0;6235 48 | Clock::time_point since;6236 | 6237 | {}6238../src/daemon/coordinator.hh:52:12: error: constructor does not initialize these fields: mutex, cv, resultWire [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6239 52 | struct Shared6240 | ^6241 53 | {6242 54 | std::mutex mutex;6243 | 6244 | {}6245 55 | std::condition_variable cv;6246 | 6247 | {}6248 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along6249 57 | std::atomic<unsigned> attached{0}; // callers waiting in attach(); the build outlives its first caller for them6250 58 | bool finished = false;6251 59 | std::string resultWire; // BuildDerivationDone serialised6252 | 6253 | {}6254../src/daemon/coordinator.hh:80:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6255 80 | struct Admission6256 | ^6257 81 | {6258 82 | std::shared_ptr<Expected::Shared> shared;6259 | 6260 | {}6261../src/daemon/coordinator.hh:91: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]6262 91 | const std::vector<std::pair<std::string, uint64_t>> & outputs,6263 | ^~~~~6264../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6265 95 | auto hello() const -> nix::remote::WorkerMsg;6266 | ^6267 | [[nodiscard]] 6268../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6269 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;6270 | ^6271 | [[nodiscard]] 6272../src/daemon/coordinator.hh:111:21: error: member 'options' of type 'const Options &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6273 111 | const Options & options;6274 | ^6275../src/daemon/coordinator.hh:112:15: error: member 'metrics' of type 'Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6276 112 | Metrics & metrics;6277 | ^6278../src/daemon/coordinator.hh:114:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6279 114 | struct State6280 | ^6281 115 | {6282 116 | std::unordered_map<std::string, Expected> expected;6283 | 6284 | {}6285../src/daemon/coordinator.hh:128: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]6286 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs);6287 | ^~~~~6288../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6289 45 | struct Config6290 | ^6291 46 | {6292 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system6293 | 6294 | {}6295 48 | PresentFn present; // unset: nothing is ever Cached6296 | 6297 | {}6298../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6299 64 | struct Client6300 | ^6301 65 | {6302 66 | sched::ClientId id = 0;6303 67 | ClientSend send;6304 | 6305 | {}6306../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6307 80 | struct Worker6308 | ^6309 81 | {6310 82 | WorkerSend send;6311 | 6312 | {}6313 83 | std::optional<sched::WorkerId> id;6314 | 6315 | {}6316../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6317 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &6318 | ^6319 | [[nodiscard]] 6320/nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'6321 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))6322 | ^6323../src/daemon/idle.hh:41:24: error: method 'idleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6324 41 | [[nodiscard]] auto idleFor() const -> Clock::duration6325 | ^ ~~~~~6326 | static 6327../src/daemon/main.cc:9:10: error: 'algorithm' file not found [clang-diagnostic-error]6328 9 | #include <algorithm>6329 | ^~~~~~~~~~~6330../src/daemon/main.cc:45:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6331 45 | #include <nix/store/derived-path.hh>6332 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6333 46 | #include <nix/store/globals.hh>6334../src/daemon/main.cc:62:1: error: included header unix-domain-socket.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6335 62 | #include <nix/util/unix-domain-socket.hh>6336 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6337 63 | #include <nix/util/util.hh>6338../src/daemon/main.cc:76:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6339 76 | #include "oidc.hh"6340 | ^~~~~~~~~~~~~~~~~~6341 77 | #include "path-info-wire.hh"6342../src/daemon/main.cc:77:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6343 77 | #include "path-info-wire.hh"6344 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~6345 78 | #include "metrics.hh"6346../src/daemon/main.cc:91: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]6347 91 | volatile std::sig_atomic_t nixgrpc::stopSignal = 0;6348 | ^6349 | static 6350../src/daemon/main.cc:100:24: error: member 'metrics' of type 'nixgrpc::Metrics &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6351 100 | nixgrpc::Metrics & metrics;6352 | ^6353../src/daemon/main.cc:101:28: error: member 'idle' of type 'nixgrpc::IdleTracker &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6354 101 | nixgrpc::IdleTracker & idle;6355 | ^6356../src/daemon/main.cc:103:21: error: member 'auth' of type 'nixgrpc::Auth &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6357 103 | nixgrpc::Auth & auth;6358 | ^6359../src/daemon/main.cc:105:28: error: member 'coord' of type 'nixgrpc::Coordinator &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors]6360 105 | nixgrpc::Coordinator & coord;6361 | ^6362../src/daemon/main.cc:112:10: error: method 'getStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6363 112 | auto getStore() -> nix::ref<nix::Store>6364 | ^6365 | static 6366../src/daemon/main.cc:123:10: error: method 'localDaemonGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6367 123 | auto localDaemonGone(const std::exception & err) -> bool6368 | ^6369 | static 6370../src/daemon/main.cc:126:20: error: variable 'gone' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6371 126 | bool const gone = dynamic_cast<const nix::EndOfFile *>(&err) != nullptr6372 | ^6373 127 | || (sys != nullptr && (sys->errNo == EPIPE || sys->errNo == ECONNRESET));6374 | 6375 | = false6376../src/daemon/main.cc:136:10: error: method 'openScopedStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6377 136 | auto openScopedStore() -> nix::ref<nix::Store>6378 | ^6379 | static 6380../src/daemon/main.cc:156:23: error: forwarding reference parameter 'func' is never forwarded inside the function body [cppcoreguidelines-missing-std-forward,-warnings-as-errors]6381 156 | auto guarded(F && func) -> grpc::Status6382 | ^6383../src/daemon/main.cc:178:81: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6384 178 | void logDebug(std::initializer_list<std::pair<std::string_view, std::string>> fields)6385 | ^6386 | /*unused*/6387../src/daemon/main.cc:188:12: error: constructor does not initialize these fields: context, method [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6388 188 | struct Rpc6389 | ^6390 189 | {6391 190 | grpc::ServerContext * context;6392 | 6393 | {}6394 191 | std::string_view method;6395 | 6396 | {}6397../src/daemon/main.cc:195:14: error: method 'done' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6398 195 | void done(const Fields & extra) const6399 | ^ ~~~~~6400 | static 6401../src/daemon/main.cc:223:5: error: constructor does not initialize these fields: storeUri, workerName, storeMutex, store [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6402 98 | NixRemoteService(6403 | ^6404../src/daemon/main.cc:224:9: error: 3 adjacent parameters of 'NixRemoteService' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6405 224 | std::string socketPath,6406 | ^~~~~~~~~~~~~~~~~~~~~~~6407 225 | std::string storeUri,6408 | ~~~~~~~~~~~~~~~~~~~~~6409 226 | std::string workerName,6410 | ~~~~~~~~~~~~~~~~~~~~~~6411../src/daemon/main.cc:224:21: note: the first parameter in the range is 'socketPath'6412 224 | std::string socketPath,6413 | ^~~~~~~~~~6414../src/daemon/main.cc:226:21: note: the last parameter in the range is 'workerName'6415 226 | std::string workerName,6416 | ^~~~~~~~~~6417../src/daemon/main.cc:290:31: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6418 290 | nix::StorePathSet paths;6419 | ^ 6420 | = 06421../src/daemon/main.cc:584:9: error: 2 adjacent parameters of 'buildExpected' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6422 584 | const nixgrpc::BuildEventSink & log,6423 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6424 585 | const std::map<std::string, nix::StorePath> & outPaths,6425 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6426../src/daemon/main.cc:584:41: note: the first parameter in the range is 'log'6427 584 | const nixgrpc::BuildEventSink & log,6428 | ^~~6429../src/daemon/main.cc:585:55: note: the last parameter in the range is 'outPaths'6430 585 | const std::map<std::string, nix::StorePath> & outPaths,6431 | ^~~~~~~~6432../src/daemon/main.cc:588:53: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6433 588 | std::vector<std::pair<std::string, uint64_t>> & outputs) -> grpc::Status6434 | ^6435 | /*unused*/6436../src/daemon/main.cc:724:13: error: variable 'counting' of type 'nix::LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6437 724 | nix::LambdaSink counting([&](std::string_view data) -> void {6438 | ^6439 | const 6440../src/daemon/main.cc:789:6: error: an exception may be thrown in function 'main' which should not throw exceptions [bugprone-exception-escape,-warnings-as-errors]6441 789 | auto main(int argc, char ** argv) -> int6442 | ^6443../src/daemon/main.cc:812:9: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'main' here6444 812 | throw nix::Error("--idle-timeout requires systemd socket activation");6445 | ^6446../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6447 71 | std::string method;6448 | 6449 | {}6450 72 | prometheus::Histogram * hist = nullptr;6451 73 | std::chrono::steady_clock::time_point start;6452 | 6453 | {}6454 74 | 6455 75 | public:6456 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.6457 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)6458 | ^6459../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6460 145 | void buildInfo(6461 | ^6462 | static 6463../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]6464 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6465 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6466../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'6467 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6468 | ^~~~~~~6469../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'6470 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6471 | ^~~~~~~~6472../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6473 156 | void buildSlots(unsigned count)6474 | ^6475 | static 6476../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]6477 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6478 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6479../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'6480 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6481 | ^~~~~~6482../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'6483 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6484 | ^~~~~6485../src/daemon/metrics.hh:186:36: note: 6486 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6487 | ^6488../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values6489 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6490 | ^6491../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')6492../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6493 21 | explicit Metrics(const std::string & listen)6494 | ^6495../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]6496 213 | void countRpc(const std::string & method, const std::string & commonName)6497 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6498../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'6499 213 | void countRpc(const std::string & method, const std::string & commonName)6500 | ^~~~~~6501../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'6502 213 | void countRpc(const std::string & method, const std::string & commonName)6503 | ^~~~~~~~~~6504../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]6505 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6506 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6507../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'6508 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6509 | ^~~~~~~~~~6510../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'6511 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6512 | ^~~~~~~~6513../src/daemon/metrics.hh:218:27: note: 6514 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6515 | ^6516../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6517 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6518 | ^6519../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')6520../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]6521 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6522 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6523../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'6524 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6525 | ^~~~~~~~~6526../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'6527 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6528 | ^~~~~6529../src/daemon/metrics.hh:224:24: note: 6530 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6531 | ^6532../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6533 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6534 | ^6535../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')6536../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]6537 17 | struct Niks3Config6538 | ^6539 18 | {6540 19 | std::string url;6541 | 6542 | {}6543 20 | std::string tokenFile; // bearer, optional6544 | 6545 | {}6546 21 | std::string clientCert; // mTLS, optional6547 | 6548 | {}6549 22 | std::string clientKey;6550 | 6551 | {}6552 23 | PushProcess::Argv pushArgv;6553 | 6554 | {}6555../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]6556 34 | std::string baseUrl;6557 | 6558 | {}6559 35 | std::shared_ptr<TokenFile> bearer;6560 | 6561 | {}6562 36 | std::string clientCert;6563 | 6564 | {}6565 37 | std::string clientKey;6566 | 6567 | {}6568 38 | 6569 39 | public:6570 40 | explicit Niks3Client(const Niks3Config & cfg)6571 | ^6572../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6573 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6574 | ^ ~~~~~6575 | static 6576../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]6577 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6578 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6579../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'6580 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6581 | ^~~~6582../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'6583 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6584 | ^~~~6585../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values6586 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6587 | ^6588../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6589 60 | struct Identity6590 | ^6591 61 | {6592 62 | std::string subject; // "oidc:<provider>:<sub>"6593 | 6594 | {}6595 63 | std::optional<Role> role; // nullopt: verified but no rule matched6596 | 6597 | {}6598../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]6599 76 | } catch (...) {6600 | ^6601../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]6602 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6603 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6604../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'6605 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6606 | ^~~~6607../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'6608 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6609 | ^~~~6610../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]6611 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6612 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6613../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'6614 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6615 | ^~~~~~6616../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'6617 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6618 | ^~~~6619../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values6620 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6621 | ^6622../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]6623 251 | struct Jwk6624 | ^6625 252 | {6626 253 | std::string kid;6627 | 6628 | {}6629 254 | std::string kty;6630 | 6631 | {}6632 255 | std::string crv;6633 | 6634 | {}6635 256 | std::string pem;6636 | 6637 | {}6638../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]6639 286 | if (jwk.kty == "RSA") {6640 | ^6641../src/daemon/oidc.hh:288:10: note: end of the original6642 288 | } else if (jwk.kty == "EC") {6643 | ^6644../src/daemon/oidc.hh:288:37: note: clone 1 starts here6645 288 | } else if (jwk.kty == "EC") {6646 | ^6647../src/daemon/oidc.hh:290:62: note: clone 2 starts here6648 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {6649 | ^6650../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]6651 294 | } catch (...) {6652 | ^6653../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6654 300 | struct FixedClock6655 | ^6656 301 | {6657 302 | std::chrono::system_clock::time_point at;6658 | 6659 | {}6660../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6661 347 | struct Result6662 | ^6663 348 | {6664 349 | std::optional<Identity> identity;6665 | 6666 | {}6667 350 | std::string error; // for logs, not for the client6668 | 6669 | {}6670../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6671 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)6672 | ^6673../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6674 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6675 | ^6676 | static 6677../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]6678 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6679 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6680../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'6681 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6682 | ^~~~~6683../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'6684 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6685 | ^~~6686../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values6687 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6688 | ^6689../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6690 377 | struct KeySet6691 | ^6692 378 | {6693 379 | std::mutex lock;6694 | 6695 | {}6696 380 | std::vector<Jwk> keys;6697 | 6698 | {}6699 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".6700 382 | std::optional<std::chrono::steady_clock::time_point> fetched;6701 | 6702 | {}6703../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6704 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json6705 | ^ ~~~~~6706 | static 6707../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6708 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>6709 | ^ ~~~~~6710 | static 6711../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]6712 442 | std::optional<std::chrono::steady_clock::time_point> fetched,6713 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6714 443 | std::chrono::steady_clock::time_point now,6715 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6716../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'6717 442 | std::optional<std::chrono::steady_clock::time_point> fetched,6718 | ^~~~~~~6719../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'6720 443 | std::chrono::steady_clock::time_point now,6721 | ^~~6722../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6723 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6724 | ^6725 | static 6726../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]6727 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6728 | ^~~~~~~~~~~~~~~~~~~~~~6729 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6730 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6731../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'6732 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6733 | ^~~~~6734../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'6735 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6736 | ^~~6737../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values6738 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6739 | ^6740../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6741 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6742 | ^6743 | static 6744../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]6745 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6746 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6747../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'6748 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6749 | ^~~~~6750../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'6751 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6752 | ^~~6753../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values6754 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6755 | ^6756../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]6757 21 | struct Options6758 | ^6759 22 | {6760 23 | std::string listen = "0.0.0.0:50051";6761 24 | std::optional<std::chrono::seconds> idleTimeout;6762 | 6763 | {}6764 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";6765 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.6766 27 | std::string storeUri;6767 | 6768 | {}6769 28 | std::string tlsCert;6770 | 6771 | {}6772 29 | std::string tlsKey;6773 | 6774 | {}6775 30 | std::string clientCA;6776 | 6777 | {}6778 31 | std::string metricsListen;6779 | 6780 | {}6781 32 | std::string workerName;6782 | 6783 | {}6784 33 | LogLevel logLevel = LogLevel::info;6785 34 | Acl acl;6786 35 | xfcc::TrustedProxies proxies;6787 36 | std::string oidcConfig;6788 | 6789 | {}6790../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]6791 60 | explicit PushProcess(Argv argv)6792 | ^6793../src/daemon/push.hh:82:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6794 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6795 | ^6796 | static 6797../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]6798 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6799 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6800../src/daemon/push.hh:82:52: note: the first parameter in the range is 'paths'6801 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6802 | ^~~~~6803../src/daemon/push.hh:82:77: note: the last parameter in the range is 'cancelled'6804 82 | void pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never)6805 | ^~~~~~~~~6806../src/daemon/push.hh:120:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6807 120 | explicit Pending(size_t count)6808 | ^6809../src/daemon/push.hh:126:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6810 126 | auto ack(const std::string & status, const std::string & message) -> bool6811 | ^6812 | static 6813../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]6814 126 | auto ack(const std::string & status, const std::string & message) -> bool6815 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6816../src/daemon/push.hh:126:38: note: the first parameter in the range is 'status'6817 126 | auto ack(const std::string & status, const std::string & message) -> bool6818 | ^~~~~~6819../src/daemon/push.hh:126:66: note: the last parameter in the range is 'message'6820 126 | auto ack(const std::string & status, const std::string & message) -> bool6821 | ^~~~~~~6822../src/daemon/push.hh:141:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6823 141 | void fail(const std::string & message)6824 | ^6825 | static 6826../src/daemon/push.hh:149:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6827 149 | auto wait(const Cancelled & cancelled) -> Result6828 | ^6829 | static 6830../src/daemon/push.hh:162:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6831 162 | struct Inner6832 | ^6833 163 | {6834 164 | size_t left;6835 | 6836 | {}6837../src/daemon/push.hh:171:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6838 171 | struct State6839 | ^6840 172 | {6841 173 | nix::Pid pid;6842 174 | std::shared_ptr<nix::AutoCloseFD> stdinFd;6843 | 6844 | {}6845../src/daemon/push.hh:184:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6846 184 | void ensureChild(nix::Sync<State>::WriteLock & lck)6847 | ^6848 | static 6849../src/daemon/push.hh:215:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6850 215 | void readAcks(int acksFd)6851 | ^6852 | static 6853../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]6854 234 | } catch (nix::EndOfFile &) {6855 | ^6856../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]6857 236 | } catch (std::exception & err) {6858 | ^6859../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6860 65 | class IndexedHeap6861 | ^6862 66 | {6863 67 | std::vector<std::pair<double, DrvId>> heap;6864 68 | std::vector<uint32_t> pos;6865 | 6866 | {}6867../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]6868 71 | void place(size_t idx, std::pair<double, DrvId> item)6869 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6870../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'6871 71 | void place(size_t idx, std::pair<double, DrvId> item)6872 | ^~~6873../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'6874 71 | void place(size_t idx, std::pair<double, DrvId> item)6875 | ^~~~6876../src/daemon/scheduler.hh:71:16: note: 6877 71 | void place(size_t idx, std::pair<double, DrvId> item)6878 | ^6879../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')6880 71 | void place(size_t idx, std::pair<double, DrvId> item)6881 | ^6882../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6883 77 | void siftUp(size_t idx)6884 | ^6885 | static 6886../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6887 91 | void siftDown(size_t idx)6888 | ^6889 | static 6890../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6891 94 | const size_t len = heap.size();6892 | ^ 6893 | = 06894../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]6895 131 | void set(DrvId drv, double key)6896 | ^~~~~~~~~~~~~~~~~~~~~6897../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'6898 131 | void set(DrvId drv, double key)6899 | ^~~6900../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'6901 131 | void set(DrvId drv, double key)6902 | ^~~6903../src/daemon/scheduler.hh:131:14: note: 6904 131 | void set(DrvId drv, double key)6905 | ^6906../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')6907 131 | void set(DrvId drv, double key)6908 | ^6909../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6910 174 | class FreeIndex6911 | ^6912 175 | {6913 176 | public:6914 177 | static constexpr int32_t maxSlots = 63;6915 178 | 6916 179 | private:6917 180 | std::vector<int32_t> free; // may go negative (draining below running)6918 | 6919 | {}6920 181 | std::vector<uint32_t> pos;6921 | 6922 | {}6923 182 | std::vector<bool> tracked;6924 | 6925 | {}6926../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6927 191 | void check(WorkerId wid) const6928 | ^ ~~~~~6929 | static 6930../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]6931 221 | void set(WorkerId wid, int32_t val)6932 | ^~~~~~~~~~~~~~~~~~~~~~~~~6933../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'6934 221 | void set(WorkerId wid, int32_t val)6935 | ^~~6936../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'6937 221 | void set(WorkerId wid, int32_t val)6938 | ^~~6939../src/daemon/scheduler.hh:221:14: note: 6940 221 | void set(WorkerId wid, int32_t val)6941 | ^6942../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')6943 221 | void set(WorkerId wid, int32_t val)6944 | ^6945../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6946 272 | struct Assign6947 | ^6948 273 | {6949 274 | DrvId drv = 0;6950 275 | WorkerId worker = 0;6951 276 | uint64_t assignId = 0;6952 277 | std::vector<ClientId> clients;6953 | 6954 | {}6955../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]6956 280 | struct Entry6957 | ^6958 281 | {6959 282 | std::string drvPath;6960 | 6961 | {}6962 283 | std::vector<PathKey> inputs; // for locality only6963 | 6964 | {}6965 284 | std::string system;6966 | 6967 | {}6968 285 | std::vector<std::string> features; // required6969 | 6970 | {}6971 286 | std::vector<ClientId> followers;6972 | 6973 | {}6974../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]6975 293 | struct Worker6976 | ^6977 294 | {6978 295 | std::string addr;6979 | 6980 | {}6981 296 | std::vector<std::string> systems;6982 | 6983 | {}6984 297 | std::vector<std::string> features;6985 | 6986 | {}6987 298 | int32_t maxJobs = 0;6988 299 | bool up = false;6989 300 | bool draining = false;6990 301 | std::vector<DrvId> running;6991 | 6992 | {}6993../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]6994 307 | explicit Core(Config cfg = {})6995 | ^6996../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6997 317 | auto drvId(std::string_view path) -> DrvId6998 | ^6999 | static 7000../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]7001 323 | DrvId drv = 0;7002 | ^7003 | const 7004../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7005 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>7006 | ^ ~~~~~7007 | static 7008../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7009 344 | auto workerId(std::string_view addr) -> WorkerId7010 | ^7011 | static 7012../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7013 365 | [[nodiscard]] auto queued() const -> size_t7014 | ^ ~~~~~7015 | static 7016../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]7017 367 | size_t total = 0;7018 | ^7019 | const 7020../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]7021 385 | struct WantInfo7022 | ^7023 386 | {7024 387 | std::string_view drvPath;7025 | 7026 | {}7027 388 | std::vector<std::string_view> inputs;7028 | 7029 | {}7030 389 | std::string_view system;7031 | 7032 | {}7033 390 | std::vector<std::string> features;7034 | 7035 | {}7036../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7037 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult7038 | ^7039 | static 7040../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7041 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7042 | ^7043 | static 7044../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]7045 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7046 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7047../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'7048 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7049 | ^~~~~~7050../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'7051 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7052 | ^~~~~~~7053../src/daemon/scheduler.hh:429:17: note: 7054 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7055 | ^7056../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')7057 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7058 | ^7059../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7060 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7061 | ^7062 | static 7063../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7064 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7065 | ^7066 | /*unused*/7067../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7068 478 | struct HelloInfo7069 | ^7070 479 | {7071 480 | std::string_view addr;7072 | 7073 | {}7074 481 | std::vector<std::string> systems; // first is the native one7075 | 7076 | {}7077 482 | std::vector<std::string> features;7078 | 7079 | {}7080../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]7081 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7082 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7083../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'7084 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7085 | ^~~7086../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'7087 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7088 | ^~~~~~~7089../src/daemon/scheduler.hh:539:10: note: 7090 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7091 | ^7092../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')7093 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7094 | ^7095../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7096 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7097 | ^7098 | /*unused*/7099../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7100 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool7101 | ^ ~~~~~7102 | static 7103../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7104 610 | struct StatsKey7105 | ^7106 611 | {7107 612 | std::string system;7108 | 7109 | {}7110 613 | std::string features; // sorted, comma-joined7111 | 7112 | {}7113../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7114 704 | void retire(DrvId drv)7115 | ^7116 | static 7117../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7118 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7119 | ^7120 | static 7121../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]7122 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7123 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7124../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'7125 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7126 | ^~~~7127../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'7128 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7129 | ^~~7130../src/daemon/scheduler.hh:716:26: note: 7131 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7132 | ^7133../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'7134 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7135 | ^7136../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7137 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t7138 | ^ ~~~~~7139 | static 7140../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7141 784 | void refreshFree(WorkerId wid)7142 | ^7143 | static 7144../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7145 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>7146 | ^ ~~~~~7147 | static 7148../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]7149 865 | return picked;7150 | ^7151../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]7152 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7153 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7154../src/daemon/socket-activation.hh:90:37: note: the first parameter in the range is 'listenFds'7155 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7156 | ^~~~~~~~~7157../src/daemon/socket-activation.hh:90:120: note: the last parameter in the range is 'acceptor'7158 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)7159 | ^~~~~~~~7160../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7161 21 | struct Cached7162 | ^7163 22 | {7164 23 | std::string token;7165 | 7166 | {}7167../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7168 19 | nix::Sync<Cached> cached;7169 | 7170 | {}7171 20 | 7172 21 | static auto mtime(const struct stat & info) -> struct timespec7173 22 | {7174 23 | #ifdef __APPLE__7175 24 | return info.st_mtimespec;7176 25 | #else7177 26 | return info.st_mtim;7178 27 | #endif7179 28 | }7180 29 | 7181 30 | public:7182 31 | explicit TokenFile(std::string path_)7183 | ^7184../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7185 46 | auto get() -> std::string7186 | ^7187 | static 7188../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7189 29 | std::string_view rest;7190 | 7191 | {}7192 30 | 7193 31 | public:7194 32 | explicit Cursor(std::string_view input)7195 | ^7196../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7197 47 | auto take() -> char7198 | ^7199 | static 7200../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7201 52 | char const chr = rest.front();7202 | ^ 7203 | = 07204../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7205 58 | auto until(std::string_view stops) -> std::optional<std::string_view>7206 | ^7207 | static 7208../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7209 69 | auto remaining() -> std::string_view7210 | ^7211 | static 7212../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]7213 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>7214 | ^7215../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7216 192 | class TrustedProxies7217 | ^7218 193 | {7219 194 | std::vector<std::string> patterns;7220 | 7221 | {}7222../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7223 197 | void add(std::string_view pattern)7224 | ^7225 | static 7226../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7227 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool7228 | ^ ~~~~~7229 | static 7230../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7231 81 | void header(const std::string & line)7232 | ^7233 | static 7234../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]7235 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)7236 | ^7237../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7238 129 | auto perform() -> long7239 | ^7240 | static 7241../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7242 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds7243 | ^ ~~~~~7244 | static 7245../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]7246 23 | inline auto logfmtValue(std::string_view value) -> std::string7247 | ^7248../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]7249 52 | enum class LogLevel : std::uint8_t { info, debug };7250 | ^7251../src/nix-compat.hh:279:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7252 279 | bool dynamic = false;7253 | ^7254 | const 7255../src/nix-compat.hh:282:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7256 282 | nix::StorePathSet srcs;7257 | ^ 7258 | = 07259../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7260 24 | nix::StringSink sink;7261 | ^7262 | const 7263../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]7264 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7265 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7266../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'7267 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7268 | ^~~~~~~~7269../src/pump.hh:65:57: note: the last parameter in the range is 'buf'7270 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t7271 | ^~~7272../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7273 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);7274 | ^ 7275 | = 07276../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]7277 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;7278 | ^7279../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]7280 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;7281 | ^7282../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]7283 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch7284 | ^7285../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]7286 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;7287 | ^7288../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]7289 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;7290 | ^7291../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]7292 97 | return static_cast<ssize_t>(got);7293 | ^7294FAILED: [code=1] meson-internal__clang-tidy 7295/nix/store/jaa89dphx07w3r26y7gh79a7b1mld5p4-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always7296ninja: build stopped: subcommand failed.