nix-grpc-store-clang-tidy-0.1.0-beta.1
checks.x86_64-linux.clang-tidy
· build #496
· raw
1tribuchet: building on jamie
unpackPhase
2unpacking source archive /nix/store/3kkwqmd1mcjxg12w5kgfdw4dqsmrxsa0-source3source root is sourceconfigurePhase
4mesonConfigurePhase flags: --prefix=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1 --libdir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib --libexecdir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec --bindir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin --sbindir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin --includedir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/include --mandir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man --infodir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info --localedir=/nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-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/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin51 buildtype : plain52 includedir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/include53 infodir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info54 libdir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/lib55 libexecdir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/libexec56 localedir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/locale57 mandir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man58 prefix : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.159 sbindir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-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\ buildingbuildPhase
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 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures97 | ^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 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures101 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~102../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'103 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures104 | ^~~~~105../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'106 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures107 | ^~~~~~~~~108../src/daemon/cache.hh:97:38: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]109 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)110 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~111../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths'112 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)113 | ^~~~~114../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled'115 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)116 | ^~~~~~~~~117../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]118 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const119 | ^ ~~~~~120 | static 121../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]122 17 | struct Niks3Config123 | ^124 18 | {125 19 | std::string url;126 | 127 | {}128 20 | std::string tokenFile; // bearer, optional129 | 130 | {}131 21 | std::string clientCert; // mTLS, optional132 | 133 | {}134 22 | std::string clientKey;135 | 136 | {}137 23 | PushProcess::Argv pushArgv;138 | 139 | {}140../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]141 34 | std::string baseUrl;142 | 143 | {}144 35 | std::shared_ptr<TokenFile> bearer;145 | 146 | {}147 36 | std::string clientCert;148 | 149 | {}150 37 | std::string clientKey;151 | 152 | {}153 38 | 154 39 | public:155 40 | explicit Niks3Client(const Niks3Config & cfg)156 | ^157../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]158 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>159 | ^ ~~~~~160 | static 161../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]162 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>163 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~164../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'165 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>166 | ^~~~167../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'168 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>169 | ^~~~170../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values171 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>172 | ^173../src/daemon/push.hh:61:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]174 61 | explicit PushProcess(Argv argv)175 | ^176../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]177 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures178 | ^179 | static 180../src/daemon/push.hh:86:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]181 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures182 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~183../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths'184 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures185 | ^~~~~186../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled'187 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures188 | ^~~~~~~~~189../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]190 123 | struct Result191 | ^192 124 | {193 125 | std::string status = "ok";194 126 | std::string message;195 | 196 | {}197 127 | Signatures signatures;198 | 199 | {}200../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]201 130 | explicit Pending(size_t count)202 | ^203../src/daemon/push.hh:136:16: error: constructor does not initialize these fields: status, message, path, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]204 136 | struct Ack205 | ^206 137 | {207 138 | std::string status;208 | 209 | {}210 139 | std::string message;211 | 212 | {}213 140 | std::string path;214 | 215 | {}216 141 | std::set<std::string> signatures;217 | 218 | {}219../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]220 144 | auto ack(Ack msg) -> bool221 | ^222 | static 223../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]224 147 | if (msg.status != "ok") {225 | ^226../src/daemon/push.hh:150:14: note: end of the original227 150 | } else if (!msg.signatures.empty()) {228 | ^229../src/daemon/push.hh:150:49: note: clone 1 starts here230 150 | } else if (!msg.signatures.empty()) {231 | ^232../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]233 162 | void fail(const std::string & message)234 | ^235 | static 236../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]237 171 | auto wait(const Cancelled & cancelled) -> Result238 | ^239 | static 240../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]241 184 | struct Inner242 | ^243 185 | {244 186 | size_t left;245 | 246 | {}247../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]248 193 | struct State249 | ^250 194 | {251 195 | nix::Pid pid;252 196 | std::shared_ptr<nix::AutoCloseFD> stdinFd;253 | 254 | {}255../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]256 206 | void ensureChild(nix::Sync<State>::WriteLock & lck)257 | ^258 | static 259../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]260 237 | void readAcks(int acksFd)261 | ^262 | static 263../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]264 21 | struct Cached265 | ^266 22 | {267 23 | std::string token;268 | 269 | {}270../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]271 19 | nix::Sync<Cached> cached;272 | 273 | {}274 20 | 275 21 | static auto mtime(const struct stat & info) -> struct timespec276 22 | {277 23 | #ifdef __APPLE__278 24 | return info.st_mtimespec;279 25 | #else280 26 | return info.st_mtim;281 27 | #endif282 28 | }283 29 | 284 30 | public:285 31 | explicit TokenFile(std::string path_)286 | ^287../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]288 46 | auto get() -> std::string289 | ^290 | static 291../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]292 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t293 | ^~~~~~~~~~~~~~~~~~~~~~~~~294../src/http.hh:71:45: note: the first parameter in the range is 'size'295 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t296 | ^~~~297../src/http.hh:71:58: note: the last parameter in the range is 'nmemb'298 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t299 | ^~~~~300../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]301 81 | void header(const std::string & line)302 | ^303 | static 304../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]305 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)306 | ^307../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]308 129 | auto perform() -> long309 | ^310 | static 311../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]312 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds313 | ^ ~~~~~314 | static 315../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]316 23 | inline auto logfmtValue(std::string_view value) -> std::string317 | ^318../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]319 52 | enum class LogLevel : std::uint8_t { info, debug };320 | ^321../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]322 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {323 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~324../src/nix-compat.hh:72:49: note: the first parameter in the range is 'major'325 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {326 | ^~~~~327../src/nix-compat.hh:72:64: note: the last parameter in the range is 'minor'328 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {329 | ^~~~~330../src/nix-compat.hh:72:56: note: 'unsigned int' and 'int' may be implicitly converted331 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V {332 | ^333../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]334 293 | bool dynamic = false;335 | ^336 | const 337../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]338 296 | nix::StorePathSet srcs;339 | ^ 340 | = 0341../tests/farm-client-test.cc:3:10: error: 'chrono' file not found [clang-diagnostic-error]342 3 | #include <chrono>343 | ^~~~~~~~344../tests/farm-client-test.cc:17:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]345 17 | #include <nlohmann/json_fwd.hpp>346 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~347 18 | 348../tests/farm-client-test.cc:23:1: error: included header niks3-client.hh is not used directly [misc-include-cleaner,-warnings-as-errors]349 23 | #include "niks3-client.hh"350 | ^~~~~~~~~~~~~~~~~~~~~~~~~~351 24 | #include "http.hh"352../tests/farm-client-test.cc:37:5: error: constructor does not initialize these fields: base [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]353 33 | std::string base;354 | 355 | {}356 34 | int failures = 0;357 35 | 358 36 | public:359 37 | explicit Suite(std::string base)360 | ^361../tests/farm-client-test.cc:53:24: error: method 'log' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]362 53 | [[nodiscard]] auto log() const -> nlohmann::json363 | ^ ~~~~~364 | static 365../tests/farm-client-test.cc:62:9: error: variable 'found' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]366 62 | int found = 0;367 | ^368 | const 369../tests/farm-client-test.cc:148:29: error: 2 adjacent parameters of 'testCache' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]370 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock)371 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~372../tests/farm-client-test.cc:148:49: note: the first parameter in the range is 'base'373 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock)374 | ^~~~375../tests/farm-client-test.cc:148:75: note: the last parameter in the range is 'mock'376 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock)377 | ^~~~378>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/scheduler-test.cc379/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found380/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found381Error while processing /build/source/tests/scheduler-test.cc.382../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]383 71 | void place(size_t idx, std::pair<double, DrvId> item)384 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~385../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'386 71 | void place(size_t idx, std::pair<double, DrvId> item)387 | ^~~388../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'389 71 | void place(size_t idx, std::pair<double, DrvId> item)390 | ^~~~391../src/daemon/scheduler.hh:71:16: note: 392 71 | void place(size_t idx, std::pair<double, DrvId> item)393 | ^394../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')395 71 | void place(size_t idx, std::pair<double, DrvId> item)396 | ^397../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]398 77 | void siftUp(size_t idx)399 | ^400 | static 401../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]402 91 | void siftDown(size_t idx)403 | ^404 | static 405../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]406 94 | const size_t len = heap.size();407 | ^ 408 | = 0409../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]410 131 | void set(DrvId drv, double key)411 | ^~~~~~~~~~~~~~~~~~~~~412../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'413 131 | void set(DrvId drv, double key)414 | ^~~415../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'416 131 | void set(DrvId drv, double key)417 | ^~~418../src/daemon/scheduler.hh:131:14: note: 419 131 | void set(DrvId drv, double key)420 | ^421../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')422 131 | void set(DrvId drv, double key)423 | ^424../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]425 191 | void check(WorkerId wid) const426 | ^ ~~~~~427 | static 428../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]429 221 | void set(WorkerId wid, int32_t val)430 | ^~~~~~~~~~~~~~~~~~~~~~~~~431../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'432 221 | void set(WorkerId wid, int32_t val)433 | ^~~434../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'435 221 | void set(WorkerId wid, int32_t val)436 | ^~~437../src/daemon/scheduler.hh:221:14: note: 438 221 | void set(WorkerId wid, int32_t val)439 | ^440../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')441 221 | void set(WorkerId wid, int32_t val)442 | ^443../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]444 272 | struct Assign445 | ^446 273 | {447 274 | DrvId drv = 0;448 275 | WorkerId worker = 0;449 276 | uint64_t assignId = 0;450 277 | std::vector<ClientId> clients;451 | 452 | {}453../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]454 280 | struct Entry455 | ^456 281 | {457 282 | std::string drvPath;458 | 459 | {}460 283 | std::vector<PathKey> inputs; // for locality only461 | 462 | {}463 284 | std::string system;464 | 465 | {}466 285 | std::vector<std::string> features; // required467 | 468 | {}469 286 | std::vector<ClientId> followers;470 | 471 | {}472../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]473 293 | struct Worker474 | ^475 294 | {476 295 | std::string addr;477 | 478 | {}479 296 | std::vector<std::string> systems;480 | 481 | {}482 297 | std::vector<std::string> features;483 | 484 | {}485 298 | int32_t maxJobs = 0;486 299 | bool up = false;487 300 | bool draining = false;488 301 | std::vector<DrvId> running;489 | 490 | {}491../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]492 307 | explicit Core(Config cfg = {})493 | ^494../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]495 317 | auto drvId(std::string_view path) -> DrvId496 | ^497 | static 498../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]499 323 | DrvId drv = 0;500 | ^501 | const 502../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]503 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>504 | ^ ~~~~~505 | static 506../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]507 344 | auto workerId(std::string_view addr) -> WorkerId508 | ^509 | static 510../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]511 365 | [[nodiscard]] auto queued() const -> size_t512 | ^ ~~~~~513 | static 514../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]515 367 | size_t total = 0;516 | ^517 | const 518../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]519 385 | struct WantInfo520 | ^521 386 | {522 387 | std::string_view drvPath;523 | 524 | {}525 388 | std::vector<std::string_view> inputs;526 | 527 | {}528 389 | std::string_view system;529 | 530 | {}531 390 | std::vector<std::string> features;532 | 533 | {}534../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]535 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult536 | ^537 | static 538../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]539 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>540 | ^541 | static 542../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]543 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>544 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~545../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'546 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>547 | ^~~~~~548../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'549 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>550 | ^~~~~~~551../src/daemon/scheduler.hh:429:17: note: 552 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>553 | ^554../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')555 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>556 | ^557../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]558 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)559 | ^560 | static 561../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]562 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)563 | ^564 | /*unused*/565../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]566 478 | struct HelloInfo567 | ^568 479 | {569 480 | std::string_view addr;570 | 571 | {}572 481 | std::vector<std::string> systems; // first is the native one573 | 574 | {}575 482 | std::vector<std::string> features;576 | 577 | {}578../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]579 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)580 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~581../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'582 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)583 | ^~~584../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'585 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)586 | ^~~~~~~587../src/daemon/scheduler.hh:539:10: note: 588 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)589 | ^590../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')591 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)592 | ^593../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]594 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)595 | ^596 | /*unused*/597../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]598 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool599 | ^ ~~~~~600 | static 601../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]602 610 | struct StatsKey603 | ^604 611 | {605 612 | std::string system;606 | 607 | {}608 613 | std::string features; // sorted, comma-joined609 | 610 | {}611../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]612 704 | void retire(DrvId drv)613 | ^614 | static 615../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]616 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)617 | ^618 | static 619../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]620 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)621 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~622../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'623 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)624 | ^~~~625../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'626 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)627 | ^~~628../src/daemon/scheduler.hh:716:26: note: 629 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)630 | ^631../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'632 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)633 | ^634../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]635 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t636 | ^ ~~~~~637 | static 638../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]639 784 | void refreshFree(WorkerId wid)640 | ^641 | static 642../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]643 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>644 | ^ ~~~~~645 | static 646../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]647 865 | return picked;648 | ^649../tests/scheduler-test.cc:3:10: error: 'algorithm' file not found [clang-diagnostic-error]650 3 | #include <algorithm>651 | ^~~~~~~~~~~652../tests/scheduler-test.cc:46:20: error: variable 'minKey' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]653 3 | double minKey = ref.begin()->second;654 | ^ 655 | = NAN656../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]657 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) -> WorkerId658 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~659../tests/scheduler-test.cc:75:43: note: the first parameter in the range is 'addr'660 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) -> WorkerId661 | ^~~~662../tests/scheduler-test.cc:75:141: note: the last parameter in the range is 'features'663 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) -> WorkerId664 | ^~~~~~~~665../tests/scheduler-test.cc:75:26: note: 666 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) -> WorkerId667 | ^668../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'669 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) -> WorkerId670 | ^671../tests/scheduler-test.cc:75:64: note: 'int' and 'const int &' parameters accept and bind the same kind of values672 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) -> WorkerId673 | ^674../tests/scheduler-test.cc:75:49: note: 675 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) -> WorkerId676 | ^677../tests/scheduler-test.cc:75:64: note: 'uint32_t' and 'const int &' parameters accept and bind the same kind of values678 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) -> WorkerId679 | ^680../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')681../tests/scheduler-test.cc:88:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]682 88 | Core shard;683 | ^684 | const 685../tests/scheduler-test.cc:106:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]686 106 | Core shard;687 | ^688 | const 689../tests/scheduler-test.cc:123:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]690 123 | Core shard;691 | ^692 | const 693../tests/scheduler-test.cc:157:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]694 157 | Core shard;695 | ^696 | const 697../tests/scheduler-test.cc:177:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]698 177 | Core shard;699 | ^700 | const 701../tests/scheduler-test.cc:199:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors]702 199 | Core shard;703 | ^704 | const 705../tests/scheduler-test.cc:291:5: error: variable 'onBoth' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors]706 291 | int onBoth = 0;707 | ^708 | const 709../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]710 335 | auto main() -> int711 | ^712../src/daemon/scheduler.hh:134:13: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'set' here713 134 | throw nix::Error("IndexedHeap: id out of range");714 | ^715../tests/scheduler-test.cc:35:13: note: frame #1: function 'testHeapAgainstMap' calls function 'set' here716 35 | heap.set(id, key);717 | ^718../tests/scheduler-test.cc:337:5: note: frame #2: function 'main' calls function 'testHeapAgainstMap' here719 337 | testHeapAgainstMap();720 | ^721>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/xfcc-test.cc722/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found723/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found724Error while processing /build/source/tests/xfcc-test.cc.725../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]726 29 | std::string_view rest;727 | 728 | {}729 30 | 730 31 | public:731 32 | explicit Cursor(std::string_view input)732 | ^733../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]734 47 | auto take() -> char735 | ^736 | static 737../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]738 52 | char const chr = rest.front();739 | ^ 740 | = 0741../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]742 58 | auto until(std::string_view stops) -> std::optional<std::string_view>743 | ^744 | static 745../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]746 69 | auto remaining() -> std::string_view747 | ^748 | static 749../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]750 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>751 | ^752../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]753 197 | void add(std::string_view pattern)754 | ^755 | static 756../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]757 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool758 | ^ ~~~~~759 | static 760../tests/xfcc-test.cc:1:10: error: 'cassert' file not found [clang-diagnostic-error]761 1 | #include <cassert>762 | ^~~~~~~~~763>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/elector.cc764/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found765/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found766Error while processing /build/source/src/daemon/elector.cc.767../src/daemon/elector.cc:16:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]768 16 | #include <nlohmann/json_fwd.hpp>769 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~770 17 | #include <nlohmann/json.hpp>771../src/daemon/elector.cc:17:1: error: included header json.hpp is not used directly [misc-include-cleaner,-warnings-as-errors]772 17 | #include <nlohmann/json.hpp>773 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~774 18 | 775../src/daemon/elector.cc:19:1: error: included header http.hh is not used directly [misc-include-cleaner,-warnings-as-errors]776 19 | #include "http.hh"777 | ^~~~~~~~~~~~~~~~~~778 20 | #include "logfmt.hh"779../src/daemon/elector.cc:30:8: error: constructor does not initialize these fields: stop, lead, buf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]780 30 | struct Reader781 | ^782 31 | {783 32 | std::stop_token stop;784 | 785 | {}786 33 | std::function<void(bool)> lead;787 | 788 | {}789 34 | std::string buf;790 | 791 | {}792../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]793 43 | for (size_t eol = 0; (eol = reader.buf.find('\n')) != std::string::npos;) {794 | ^795 | const 796../src/daemon/elector.cc:63:1: error: constructor does not initialize these fields: onChange, thread [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]797 63 | Elector::Elector(const Niks3Client & niks3_, std::function<void(bool)> onChange_)798 | ^799../src/daemon/elector.cc:70:10: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]800 70 | Elector::~Elector()801 | ^802/build/source/build/../src/daemon/elector.hh:6:10: error: 'chrono' file not found [clang-diagnostic-error]803 6 | #include <chrono>804 | ^~~~~~~~805../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]806 17 | struct Niks3Config807 | ^808 18 | {809 19 | std::string url;810 | 811 | {}812 20 | std::string tokenFile; // bearer, optional813 | 814 | {}815 21 | std::string clientCert; // mTLS, optional816 | 817 | {}818 22 | std::string clientKey;819 | 820 | {}821 23 | PushProcess::Argv pushArgv;822 | 823 | {}824../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]825 34 | std::string baseUrl;826 | 827 | {}828 35 | std::shared_ptr<TokenFile> bearer;829 | 830 | {}831 36 | std::string clientCert;832 | 833 | {}834 37 | std::string clientKey;835 | 836 | {}837 38 | 838 39 | public:839 40 | explicit Niks3Client(const Niks3Config & cfg)840 | ^841../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]842 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>843 | ^ ~~~~~844 | static 845../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]846 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>847 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~848../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'849 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>850 | ^~~~851../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'852 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>853 | ^~~~854../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values855 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>856 | ^857../src/daemon/push.hh:61:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]858 61 | explicit PushProcess(Argv argv)859 | ^860../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]861 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures862 | ^863 | static 864../src/daemon/push.hh:86:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]865 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures866 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~867../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths'868 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures869 | ^~~~~870../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled'871 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures872 | ^~~~~~~~~873../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]874 123 | struct Result875 | ^876 124 | {877 125 | std::string status = "ok";878 126 | std::string message;879 | 880 | {}881 127 | Signatures signatures;882 | 883 | {}884../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]885 130 | explicit Pending(size_t count)886 | ^887../src/daemon/push.hh:136:16: error: constructor does not initialize these fields: status, message, path, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]888 136 | struct Ack889 | ^890 137 | {891 138 | std::string status;892 | 893 | {}894 139 | std::string message;895 | 896 | {}897 140 | std::string path;898 | 899 | {}900 141 | std::set<std::string> signatures;901 | 902 | {}903../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]904 144 | auto ack(Ack msg) -> bool905 | ^906 | static 907../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]908 147 | if (msg.status != "ok") {909 | ^910../src/daemon/push.hh:150:14: note: end of the original911 150 | } else if (!msg.signatures.empty()) {912 | ^913../src/daemon/push.hh:150:49: note: clone 1 starts here914 150 | } else if (!msg.signatures.empty()) {915 | ^916../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]917 162 | void fail(const std::string & message)918 | ^919 | static 920../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]921 171 | auto wait(const Cancelled & cancelled) -> Result922 | ^923 | static 924../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]925 184 | struct Inner926 | ^927 185 | {928 186 | size_t left;929 | 930 | {}931../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]932 193 | struct State933 | ^934 194 | {935 195 | nix::Pid pid;936 196 | std::shared_ptr<nix::AutoCloseFD> stdinFd;937 | 938 | {}939../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]940 206 | void ensureChild(nix::Sync<State>::WriteLock & lck)941 | ^942 | static 943../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]944 237 | void readAcks(int acksFd)945 | ^946 | static 947../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]948 21 | struct Cached949 | ^950 22 | {951 23 | std::string token;952 | 953 | {}954../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]955 19 | nix::Sync<Cached> cached;956 | 957 | {}958 20 | 959 21 | static auto mtime(const struct stat & info) -> struct timespec960 22 | {961 23 | #ifdef __APPLE__962 24 | return info.st_mtimespec;963 25 | #else964 26 | return info.st_mtim;965 27 | #endif966 28 | }967 29 | 968 30 | public:969 31 | explicit TokenFile(std::string path_)970 | ^971../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]972 46 | auto get() -> std::string973 | ^974 | static 975../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]976 81 | void header(const std::string & line)977 | ^978 | static 979../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]980 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)981 | ^982../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]983 129 | auto perform() -> long984 | ^985 | static 986../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]987 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds988 | ^ ~~~~~989 | static 990../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]991 23 | inline auto logfmtValue(std::string_view value) -> std::string992 | ^993../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]994 52 | enum class LogLevel : std::uint8_t { info, debug };995 | ^996>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/options.cc997/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found998/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found999Error while processing /build/source/src/daemon/options.cc.1000../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]1001 22 | enum class Role : std::uint8_t {1002 | ^1003../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1004 51 | class Acl1005 | ^1006 52 | {1007 53 | struct Rule1008 54 | {1009 55 | std::string pattern;1010 56 | Role role;1011 57 | };1012 58 | 1013 59 | std::vector<Rule> rules;1014 | 1015 | {}1016 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1017 61 | std::optional<Role> anonRole;1018 | 1019 | {}1020../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1021 53 | struct Rule1022 | ^1023 54 | {1024 55 | std::string pattern;1025 | 1026 | {}1027../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1028 70 | void addRule(std::string_view spec)1029 | ^1030 | static 1031../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1032 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1033 | ^ ~~~~~1034 | static 1035../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]1036 17 | struct Niks3Config1037 | ^1038 18 | {1039 19 | std::string url;1040 | 1041 | {}1042 20 | std::string tokenFile; // bearer, optional1043 | 1044 | {}1045 21 | std::string clientCert; // mTLS, optional1046 | 1047 | {}1048 22 | std::string clientKey;1049 | 1050 | {}1051 23 | PushProcess::Argv pushArgv;1052 | 1053 | {}1054../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]1055 34 | std::string baseUrl;1056 | 1057 | {}1058 35 | std::shared_ptr<TokenFile> bearer;1059 | 1060 | {}1061 36 | std::string clientCert;1062 | 1063 | {}1064 37 | std::string clientKey;1065 | 1066 | {}1067 38 | 1068 39 | public:1069 40 | explicit Niks3Client(const Niks3Config & cfg)1070 | ^1071../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1072 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1073 | ^ ~~~~~1074 | static 1075../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]1076 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1077 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1078../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'1079 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1080 | ^~~~1081../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'1082 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1083 | ^~~~1084../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values1085 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>1086 | ^1087../src/daemon/options.cc:4:1: error: included header nix-compat.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1088 4 | #include "nix-compat.hh"1089 | ^~~~~~~~~~~~~~~~~~~~~~~~1090 5 | 1091../src/daemon/options.cc:21:1: error: included header server_credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]1092 21 | #include <grpcpp/security/server_credentials.h>1093 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1094 22 | #include <grpcpp/security/tls_certificate_provider.h>1095../src/daemon/options.cc:23:1: error: included header tls_credentials_options.h is not used directly [misc-include-cleaner,-warnings-as-errors]1096 23 | #include <grpcpp/security/tls_credentials_options.h>1097 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1098 24 | 1099../src/daemon/options.cc:26:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1100 26 | #include <nix/util/file-system.hh>1101 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1102 27 | #include <nix/util/strings.hh>1103../src/daemon/options.cc:27:1: error: included header strings.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1104 27 | #include <nix/util/strings.hh>1105 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1106 28 | #include <nix/util/util.hh>1107../src/daemon/options.cc:29:1: error: included header environment-variables.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1108 29 | #include <nix/util/environment-variables.hh>1109 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1110 30 | 1111../src/daemon/options.cc:31:1: error: included header acl.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1112 31 | #include "acl.hh"1113 | ^~~~~~~~~~~~~~~~~1114 32 | #include "logfmt.hh"1115../src/daemon/options.cc:36:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1116 36 | #include "xfcc.hh"1117 | ^~~~~~~~~~~~~~~~~~1118 37 | 1119../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]1120 41 | auto parseLogLevel(std::string_view value) -> LogLevel1121 | ^1122../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]1123 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1124 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1125../src/daemon/options.cc:65:59: note: the first parameter in the range is 'tlsCert'1126 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1127 | ^~~~~~~1128../src/daemon/options.cc:65:88: note: the last parameter in the range is 'tlsKey'1129 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey)1130 | ^~~~~~1131../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]1132 92 | auto parseOptions(const std::vector<std::string_view> & args) -> Options1133 | ^1134 | static 1135../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]1136 227 | auto makeServerCredentials(const Options & options) -> std::shared_ptr<grpc::ServerCredentials>1137 | ^1138 | static 1139../src/daemon/options.hh:4:10: error: 'chrono' file not found [clang-diagnostic-error]1140 4 | #include <chrono>1141 | ^~~~~~~~1142../src/daemon/push.hh:61:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1143 61 | explicit PushProcess(Argv argv)1144 | ^1145../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1146 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures1147 | ^1148 | static 1149../src/daemon/push.hh:86:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]1150 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures1151 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1152../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths'1153 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures1154 | ^~~~~1155../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled'1156 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures1157 | ^~~~~~~~~1158../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1159 123 | struct Result1160 | ^1161 124 | {1162 125 | std::string status = "ok";1163 126 | std::string message;1164 | 1165 | {}1166 127 | Signatures signatures;1167 | 1168 | {}1169../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1170 130 | explicit Pending(size_t count)1171 | ^1172../src/daemon/push.hh:136:16: error: constructor does not initialize these fields: status, message, path, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1173 136 | struct Ack1174 | ^1175 137 | {1176 138 | std::string status;1177 | 1178 | {}1179 139 | std::string message;1180 | 1181 | {}1182 140 | std::string path;1183 | 1184 | {}1185 141 | std::set<std::string> signatures;1186 | 1187 | {}1188../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1189 144 | auto ack(Ack msg) -> bool1190 | ^1191 | static 1192../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]1193 147 | if (msg.status != "ok") {1194 | ^1195../src/daemon/push.hh:150:14: note: end of the original1196 150 | } else if (!msg.signatures.empty()) {1197 | ^1198../src/daemon/push.hh:150:49: note: clone 1 starts here1199 150 | } else if (!msg.signatures.empty()) {1200 | ^1201../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1202 162 | void fail(const std::string & message)1203 | ^1204 | static 1205../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1206 171 | auto wait(const Cancelled & cancelled) -> Result1207 | ^1208 | static 1209../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1210 184 | struct Inner1211 | ^1212 185 | {1213 186 | size_t left;1214 | 1215 | {}1216../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1217 193 | struct State1218 | ^1219 194 | {1220 195 | nix::Pid pid;1221 196 | std::shared_ptr<nix::AutoCloseFD> stdinFd;1222 | 1223 | {}1224../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1225 206 | void ensureChild(nix::Sync<State>::WriteLock & lck)1226 | ^1227 | static 1228../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1229 237 | void readAcks(int acksFd)1230 | ^1231 | static 1232../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1233 65 | class IndexedHeap1234 | ^1235 66 | {1236 67 | std::vector<std::pair<double, DrvId>> heap;1237 68 | std::vector<uint32_t> pos;1238 | 1239 | {}1240../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]1241 71 | void place(size_t idx, std::pair<double, DrvId> item)1242 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1243../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'1244 71 | void place(size_t idx, std::pair<double, DrvId> item)1245 | ^~~1246../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'1247 71 | void place(size_t idx, std::pair<double, DrvId> item)1248 | ^~~~1249../src/daemon/scheduler.hh:71:16: note: 1250 71 | void place(size_t idx, std::pair<double, DrvId> item)1251 | ^1252../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')1253 71 | void place(size_t idx, std::pair<double, DrvId> item)1254 | ^1255../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1256 77 | void siftUp(size_t idx)1257 | ^1258 | static 1259../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1260 91 | void siftDown(size_t idx)1261 | ^1262 | static 1263../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1264 94 | const size_t len = heap.size();1265 | ^ 1266 | = 01267../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]1268 131 | void set(DrvId drv, double key)1269 | ^~~~~~~~~~~~~~~~~~~~~1270../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'1271 131 | void set(DrvId drv, double key)1272 | ^~~1273../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'1274 131 | void set(DrvId drv, double key)1275 | ^~~1276../src/daemon/scheduler.hh:131:14: note: 1277 131 | void set(DrvId drv, double key)1278 | ^1279../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')1280 131 | void set(DrvId drv, double key)1281 | ^1282../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1283 174 | class FreeIndex1284 | ^1285 175 | {1286 176 | public:1287 177 | static constexpr int32_t maxSlots = 63;1288 178 | 1289 179 | private:1290 180 | std::vector<int32_t> free; // may go negative (draining below running)1291 | 1292 | {}1293 181 | std::vector<uint32_t> pos;1294 | 1295 | {}1296 182 | std::vector<bool> tracked;1297 | 1298 | {}1299../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1300 191 | void check(WorkerId wid) const1301 | ^ ~~~~~1302 | static 1303../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]1304 221 | void set(WorkerId wid, int32_t val)1305 | ^~~~~~~~~~~~~~~~~~~~~~~~~1306../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'1307 221 | void set(WorkerId wid, int32_t val)1308 | ^~~1309../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'1310 221 | void set(WorkerId wid, int32_t val)1311 | ^~~1312../src/daemon/scheduler.hh:221:14: note: 1313 221 | void set(WorkerId wid, int32_t val)1314 | ^1315../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')1316 221 | void set(WorkerId wid, int32_t val)1317 | ^1318../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1319 272 | struct Assign1320 | ^1321 273 | {1322 274 | DrvId drv = 0;1323 275 | WorkerId worker = 0;1324 276 | uint64_t assignId = 0;1325 277 | std::vector<ClientId> clients;1326 | 1327 | {}1328../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]1329 280 | struct Entry1330 | ^1331 281 | {1332 282 | std::string drvPath;1333 | 1334 | {}1335 283 | std::vector<PathKey> inputs; // for locality only1336 | 1337 | {}1338 284 | std::string system;1339 | 1340 | {}1341 285 | std::vector<std::string> features; // required1342 | 1343 | {}1344 286 | std::vector<ClientId> followers;1345 | 1346 | {}1347../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]1348 293 | struct Worker1349 | ^1350 294 | {1351 295 | std::string addr;1352 | 1353 | {}1354 296 | std::vector<std::string> systems;1355 | 1356 | {}1357 297 | std::vector<std::string> features;1358 | 1359 | {}1360 298 | int32_t maxJobs = 0;1361 299 | bool up = false;1362 300 | bool draining = false;1363 301 | std::vector<DrvId> running;1364 | 1365 | {}1366../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]1367 307 | explicit Core(Config cfg = {})1368 | ^1369../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1370 317 | auto drvId(std::string_view path) -> DrvId1371 | ^1372 | static 1373../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]1374 323 | DrvId drv = 0;1375 | ^1376 | const 1377../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1378 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>1379 | ^ ~~~~~1380 | static 1381../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1382 344 | auto workerId(std::string_view addr) -> WorkerId1383 | ^1384 | static 1385../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1386 365 | [[nodiscard]] auto queued() const -> size_t1387 | ^ ~~~~~1388 | static 1389../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]1390 367 | size_t total = 0;1391 | ^1392 | const 1393../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]1394 385 | struct WantInfo1395 | ^1396 386 | {1397 387 | std::string_view drvPath;1398 | 1399 | {}1400 388 | std::vector<std::string_view> inputs;1401 | 1402 | {}1403 389 | std::string_view system;1404 | 1405 | {}1406 390 | std::vector<std::string> features;1407 | 1408 | {}1409../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1410 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult1411 | ^1412 | static 1413../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1414 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1415 | ^1416 | static 1417../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]1418 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1419 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1420../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'1421 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1422 | ^~~~~~1423../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'1424 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1425 | ^~~~~~~1426../src/daemon/scheduler.hh:429:17: note: 1427 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1428 | ^1429../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')1430 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>1431 | ^1432../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1433 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1434 | ^1435 | static 1436../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1437 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)1438 | ^1439 | /*unused*/1440../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1441 478 | struct HelloInfo1442 | ^1443 479 | {1444 480 | std::string_view addr;1445 | 1446 | {}1447 481 | std::vector<std::string> systems; // first is the native one1448 | 1449 | {}1450 482 | std::vector<std::string> features;1451 | 1452 | {}1453../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]1454 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1455 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1456../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'1457 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1458 | ^~~1459../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'1460 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1461 | ^~~~~~~1462../src/daemon/scheduler.hh:539:10: note: 1463 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1464 | ^1465../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')1466 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1467 | ^1468../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]1469 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)1470 | ^1471 | /*unused*/1472../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1473 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool1474 | ^ ~~~~~1475 | static 1476../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1477 610 | struct StatsKey1478 | ^1479 611 | {1480 612 | std::string system;1481 | 1482 | {}1483 613 | std::string features; // sorted, comma-joined1484 | 1485 | {}1486../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1487 704 | void retire(DrvId drv)1488 | ^1489 | static 1490../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1491 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1492 | ^1493 | static 1494../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]1495 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1496 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1497../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'1498 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1499 | ^~~~1500../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'1501 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1502 | ^~~1503../src/daemon/scheduler.hh:716:26: note: 1504 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1505 | ^1506../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'1507 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)1508 | ^1509../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1510 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t1511 | ^ ~~~~~1512 | static 1513../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1514 784 | void refreshFree(WorkerId wid)1515 | ^1516 | static 1517../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1518 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>1519 | ^ ~~~~~1520 | static 1521../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]1522 865 | return picked;1523 | ^1524../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1525 21 | struct Cached1526 | ^1527 22 | {1528 23 | std::string token;1529 | 1530 | {}1531../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1532 19 | nix::Sync<Cached> cached;1533 | 1534 | {}1535 20 | 1536 21 | static auto mtime(const struct stat & info) -> struct timespec1537 22 | {1538 23 | #ifdef __APPLE__1539 24 | return info.st_mtimespec;1540 25 | #else1541 26 | return info.st_mtim;1542 27 | #endif1543 28 | }1544 29 | 1545 30 | public:1546 31 | explicit TokenFile(std::string path_)1547 | ^1548../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1549 46 | auto get() -> std::string1550 | ^1551 | static 1552../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1553 29 | std::string_view rest;1554 | 1555 | {}1556 30 | 1557 31 | public:1558 32 | explicit Cursor(std::string_view input)1559 | ^1560../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1561 47 | auto take() -> char1562 | ^1563 | static 1564../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1565 52 | char const chr = rest.front();1566 | ^ 1567 | = 01568../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1569 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1570 | ^1571 | static 1572../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1573 69 | auto remaining() -> std::string_view1574 | ^1575 | static 1576../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]1577 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1578 | ^1579../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1580 192 | class TrustedProxies1581 | ^1582 193 | {1583 194 | std::vector<std::string> patterns;1584 | 1585 | {}1586../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1587 197 | void add(std::string_view pattern)1588 | ^1589 | static 1590../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1591 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1592 | ^ ~~~~~1593 | static 1594../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1595 81 | void header(const std::string & line)1596 | ^1597 | static 1598../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]1599 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1600 | ^1601../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1602 129 | auto perform() -> long1603 | ^1604 | static 1605../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1606 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1607 | ^ ~~~~~1608 | static 1609../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]1610 23 | inline auto logfmtValue(std::string_view value) -> std::string1611 | ^1612../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]1613 52 | enum class LogLevel : std::uint8_t { info, debug };1614 | ^1615../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]1616 293 | bool dynamic = false;1617 | ^1618 | const 1619../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1620 296 | nix::StorePathSet srcs;1621 | ^ 1622 | = 01623>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/auth.cc1624/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found1625/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found1626Error while processing /build/source/src/daemon/auth.cc.1627../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]1628 22 | enum class Role : std::uint8_t {1629 | ^1630../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1631 51 | class Acl1632 | ^1633 52 | {1634 53 | struct Rule1635 54 | {1636 55 | std::string pattern;1637 56 | Role role;1638 57 | };1639 58 | 1640 59 | std::vector<Rule> rules;1641 | 1642 | {}1643 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1644 61 | std::optional<Role> anonRole;1645 | 1646 | {}1647../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1648 53 | struct Rule1649 | ^1650 54 | {1651 55 | std::string pattern;1652 | 1653 | {}1654../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1655 70 | void addRule(std::string_view spec)1656 | ^1657 | static 1658../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1659 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1660 | ^ ~~~~~1661 | static 1662../src/daemon/auth.cc:17:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1663 17 | #include "oidc.hh"1664 | ^~~~~~~~~~~~~~~~~~1665 18 | #include "xfcc.hh"1666../src/daemon/auth.cc:18:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]1667 18 | #include "xfcc.hh"1668 | ^~~~~~~~~~~~~~~~~~1669 19 | 1670../src/daemon/auth.cc:25:12: error: method 'identify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1671 25 | auto Auth::identify(const grpc::ServerContextBase & context) const -> Caller1672 | ^ ~~~~~1673../src/daemon/auth.cc:50:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1674 50 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole) -> grpc::Status1675 | ^1676 | static 1677../src/daemon/auth.cc:78:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1678 78 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole, uint32_t buildMode) -> grpc::Status1679 | ^1680 | static 1681/build/source/build/../src/daemon/auth.hh:5:10: error: 'cstdint' file not found [clang-diagnostic-error]1682 5 | #include <cstdint>1683 | ^~~~~~~~~1684/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]1685 19 | struct Caller1686 | ^1687 20 | {1688 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1689 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics1690 23 | std::optional<Role> role;1691 | 1692 | {}1693/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]1694 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };1695 | ^1696../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1697 60 | struct Identity1698 | ^1699 61 | {1700 62 | std::string subject; // "oidc:<provider>:<sub>"1701 | 1702 | {}1703 63 | std::optional<Role> role; // nullopt: verified but no rule matched1704 | 1705 | {}1706../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]1707 76 | } catch (...) {1708 | ^1709../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]1710 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1711 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1712../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1713 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1714 | ^~~~1715../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1716 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1717 | ^~~~1718../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]1719 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1720 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1721../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1722 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1723 | ^~~~~~1724../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1725 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1726 | ^~~~1727../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1728 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1729 | ^1730../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]1731 251 | struct Jwk1732 | ^1733 252 | {1734 253 | std::string kid;1735 | 1736 | {}1737 254 | std::string kty;1738 | 1739 | {}1740 255 | std::string crv;1741 | 1742 | {}1743 256 | std::string pem;1744 | 1745 | {}1746../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]1747 286 | if (jwk.kty == "RSA") {1748 | ^1749../src/daemon/oidc.hh:288:10: note: end of the original1750 288 | } else if (jwk.kty == "EC") {1751 | ^1752../src/daemon/oidc.hh:288:37: note: clone 1 starts here1753 288 | } else if (jwk.kty == "EC") {1754 | ^1755../src/daemon/oidc.hh:290:62: note: clone 2 starts here1756 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {1757 | ^1758../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]1759 294 | } catch (...) {1760 | ^1761../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1762 300 | struct FixedClock1763 | ^1764 301 | {1765 302 | std::chrono::system_clock::time_point at;1766 | 1767 | {}1768../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1769 347 | struct Result1770 | ^1771 348 | {1772 349 | std::optional<Identity> identity;1773 | 1774 | {}1775 350 | std::string error; // for logs, not for the client1776 | 1777 | {}1778../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1779 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)1780 | ^1781../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1782 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1783 | ^1784 | static 1785../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]1786 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1787 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1788../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'1789 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1790 | ^~~~~1791../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'1792 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1793 | ^~~1794../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values1795 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result1796 | ^1797../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1798 377 | struct KeySet1799 | ^1800 378 | {1801 379 | std::mutex lock;1802 | 1803 | {}1804 380 | std::vector<Jwk> keys;1805 | 1806 | {}1807 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".1808 382 | std::optional<std::chrono::steady_clock::time_point> fetched;1809 | 1810 | {}1811../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1812 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json1813 | ^ ~~~~~1814 | static 1815../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1816 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>1817 | ^ ~~~~~1818 | static 1819../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]1820 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1821 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1822 443 | std::chrono::steady_clock::time_point now,1823 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1824../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'1825 442 | std::optional<std::chrono::steady_clock::time_point> fetched,1826 | ^~~~~~~1827../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'1828 443 | std::chrono::steady_clock::time_point now,1829 | ^~~1830../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1831 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1832 | ^1833 | static 1834../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]1835 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1836 | ^~~~~~~~~~~~~~~~~~~~~~1837 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1838 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1839../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'1840 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,1841 | ^~~~~1842../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'1843 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1844 | ^~~1845../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values1846 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder1847 | ^1848../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1849 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1850 | ^1851 | static 1852../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]1853 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1854 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1855../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'1856 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1857 | ^~~~~1858../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'1859 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1860 | ^~~1861../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1862 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result1863 | ^1864../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1865 29 | std::string_view rest;1866 | 1867 | {}1868 30 | 1869 31 | public:1870 32 | explicit Cursor(std::string_view input)1871 | ^1872../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1873 47 | auto take() -> char1874 | ^1875 | static 1876../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]1877 52 | char const chr = rest.front();1878 | ^ 1879 | = 01880../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1881 58 | auto until(std::string_view stops) -> std::optional<std::string_view>1882 | ^1883 | static 1884../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1885 69 | auto remaining() -> std::string_view1886 | ^1887 | static 1888../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]1889 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>1890 | ^1891../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1892 192 | class TrustedProxies1893 | ^1894 193 | {1895 194 | std::vector<std::string> patterns;1896 | 1897 | {}1898../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1899 197 | void add(std::string_view pattern)1900 | ^1901 | static 1902../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1903 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool1904 | ^ ~~~~~1905 | static 1906../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1907 81 | void header(const std::string & line)1908 | ^1909 | static 1910../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]1911 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)1912 | ^1913../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1914 129 | auto perform() -> long1915 | ^1916 | static 1917../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1918 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds1919 | ^ ~~~~~1920 | static 1921../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]1922 23 | inline auto logfmtValue(std::string_view value) -> std::string1923 | ^1924../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]1925 52 | enum class LogLevel : std::uint8_t { info, debug };1926 | ^1927>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/oidc-test.cc1928/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found1929/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found1930Error while processing /build/source/tests/oidc-test.cc.1931../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]1932 22 | enum class Role : std::uint8_t {1933 | ^1934../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1935 51 | class Acl1936 | ^1937 52 | {1938 53 | struct Rule1939 54 | {1940 55 | std::string pattern;1941 56 | Role role;1942 57 | };1943 58 | 1944 59 | std::vector<Rule> rules;1945 | 1946 | {}1947 60 | // Separate from the glob rules so '*' cannot grant anonymous access.1948 61 | std::optional<Role> anonRole;1949 | 1950 | {}1951../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1952 53 | struct Rule1953 | ^1954 54 | {1955 55 | std::string pattern;1956 | 1957 | {}1958../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1959 70 | void addRule(std::string_view spec)1960 | ^1961 | static 1962../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]1963 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>1964 | ^ ~~~~~1965 | static 1966../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]1967 60 | struct Identity1968 | ^1969 61 | {1970 62 | std::string subject; // "oidc:<provider>:<sub>"1971 | 1972 | {}1973 63 | std::optional<Role> role; // nullopt: verified but no rule matched1974 | 1975 | {}1976../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]1977 76 | } catch (...) {1978 | ^1979../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]1980 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1981 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1982../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'1983 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1984 | ^~~~1985../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'1986 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider1987 | ^~~~1988../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]1989 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1990 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1991../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'1992 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1993 | ^~~~~~1994../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'1995 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1996 | ^~~~1997../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values1998 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *1999 | ^2000../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]loading 2,458 hidden lines…
4459 172 | auto GrpcStore::goneAway(const grpc::Status & status) -> bool {4460 | ^4461 | static 4462/build/source/build/../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error]4463 6 | #include <algorithm>4464 | ^~~~~~~~~~~4465/build/source/build/../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4466 201 | auto getReference() const -> StoreReference override {4467 | ^4468 | [[nodiscard]] 4469/build/source/build/../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4470 212 | auto openStore() const -> ref<Store> override;4471 | ^4472 | [[nodiscard]] 4473/build/source/build/../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4474 256 | auto connectHint(const std::string & msg) const -> std::string4475 | ^4476 | [[nodiscard]] 4477/build/source/build/../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4478 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message()));4479 | ^4480/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4481 365 | #define printError(args...) printMsg(lvlError, args)4482 | ^4483/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4484 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4485 | ^4486/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4487 357 | do { \4488 | ^4489/build/source/build/../src/client/store.hh:352:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4490 348 | std::shared_ptr<Store> evalStore;4491 | 4492 | {}4493 349 | ref<Builder> inner;4494 350 | 4495 351 | public:4496 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr<Store> evalStore,4497 | ^4498/build/source/build/../src/client/store.hh:410:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4499 405 | std::string text;4500 | 4501 | {}4502 406 | std::vector<Logger::Field> fields;4503 | 4504 | {}4505 407 | std::optional<Activity> act;4506 | 4507 | {}4508 408 | 4509 409 | public:4510 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4511 | ^4512/build/source/build/../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]4513 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4514 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4515/build/source/build/../src/client/store.hh:410:36: note: the first parameter in the range is 'text'4516 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4517 | ^~~~4518/build/source/build/../src/client/store.hh:410:69: note: the last parameter in the range is 'fields'4519 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4520 | ^~~~~~4521/build/source/build/../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]4522 420 | if (msg.has_log_line()) {4523 | ^4524/build/source/build/../src/client/store.hh:422:11: note: else branch starts here4525 422 | } else {4526 | ^4527/build/source/build/../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]4528 466 | struct Job {4529 | ^4530 467 | StorePath drvPath;4531 468 | BasicDerivation drv;4532 469 | std::vector<Job *> dependants;4533 | 4534 | {}4535 470 | std::vector<Job *> inputs;4536 | 4537 | {}4538 471 | size_t waiting = 0;4539 472 | uint64_t cpHintMs = 0;4540 473 | unsigned bounced = 0;4541 474 | std::optional<StorePath> failedInput;4542 | 4543 | {}4544 475 | std::optional<BuildResult> result;4545 | 4546 | {}4547 476 | // Set by the reader thread, consumed by a build thread.4548 477 | std::string workerAddr;4549 | 4550 | {}4551 478 | uint64_t assignId = 0;4552 479 | // A second Assigned while building: the scheduler moved the drv to a4553 480 | // worker that was already at it. Followed when the current one bounces.4554 481 | std::string redirectAddr;4555 | 4556 | {}4557/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]4558 557 | struct Connection : RemoteStore::Connection4559 | ^4560 558 | {4561 559 | private:4562 560 | friend struct GrpcStore;4563 561 | 4564 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the4565 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the4566 564 | // blocking, ordered semantics the worker protocol relies on without4567 565 | // reimplementing Source/Sink on top of gRPC.4568 566 | grpc::ClientContext ctx;4569 567 | std::unique_ptr<GrpcStream> stream;4570 | 4571 | {}4572 568 | 4573 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC4574 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads4575 571 | 4576 572 | std::jthread reader;4577 | 4578 | {}4579/build/source/build/../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4580 613 | ~GrpcStore() override4581 | ^4582/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]4583 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override4584 | ^4585/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]4586 629 | std::unique_ptr<Source> upstream;4587 | 4588 | {}4589 630 | AutoCloseFD fd;4590 631 | bool complete = false;4591 632 | 4592 633 | explicit ReplayableNar(std::unique_ptr<Source> src)4593 | ^4594/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]4595 645 | LambdaSink tee([&](std::string_view data) -> void {4596 | ^4597 | const 4598/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]4599 652 | } catch (...) {4600 | ^4601/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]4602 667 | FdSource replay(fd.get());4603 | ^4604 | const 4605../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4606 293 | bool dynamic = false;4607 | ^4608 | const 4609../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4610 296 | nix::StorePathSet srcs;4611 | ^ 4612 | = 04613../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4614 24 | nix::StringSink sink;4615 | ^4616 | const 4617../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]4618 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4619 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4620../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'4621 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4622 | ^~~~~~~~4623../src/pump.hh:65:57: note: the last parameter in the range is 'buf'4624 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t4625 | ^~~4626../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4627 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);4628 | ^ 4629 | = 04630../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]4631 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4632 | ^4633../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]4634 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;4635 | ^4636../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]4637 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch4638 | ^4639../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]4640 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4641 | ^4642../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]4643 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;4644 | ^4645../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]4646 97 | return static_cast<ssize_t>(got);4647 | ^4648>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/transfer.cc4649/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found4650/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found4651Error while processing /build/source/src/client/transfer.cc.4652../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4653 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}4654 | ^4655../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4656 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}4657 | ^4658 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)4659 64 | -> grpc::experimental::Interceptor * override {4660 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it4661 66 | }4662 67 | private:4663 68 | std::shared_ptr<const Headers> headers;4664 | 4665 | {}4666../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4667 77 | std::string path;4668 | 4669 | {}4670 78 | 4671 79 | public:4672 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}4673 | ^4674../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4675 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,4676 | ^4677 | static 4678../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]4679 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {4680 | ^4681 | const 4682../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]4683 95 | } catch (std::exception & err) {4684 | ^4685../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]4686 47 | std::mutex mutex;4687 | 4688 | {}4689 48 | std::condition_variable grown;4690 | 4691 | {}4692 49 | uint64_t written = 0;4693 50 | bool eof = false;4694 51 | std::exception_ptr failure;4695 | 4696 | {}4697 52 | 4698 53 | public:4699 54 | NarSpool()4700 | ^4701../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4702 95 | void fail(const std::exception_ptr & cause)4703 | ^4704 | static 4705../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4706 142 | inline void demuxNarFrames(Reader & reader, const std::vector<std::shared_ptr<NarSpool>> & targets)4707 | ^4708 | /*unused*/4709../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]4710 172 | NarFetcher(4711 | ^4712../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]4713 173 | std::function<std::shared_ptr<grpc::Channel>()> channelFactory,4714 | ^4715 | /*unused*/4716../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4717 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4718 | ^4719 | static 4720../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]4721 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4722 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4723../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order'4724 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4725 | ^~~~~4726../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes'4727 187 | void recordOrder(std::vector<nix::StorePath> order, std::map<nix::StorePath, uint64_t> sizes)4728 | ^~~~~4729../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4730 224 | ~NarFetcher()4731 | ^4732../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]4733 233 | class Session4734 | ^4735 234 | {4736 235 | friend class NarFetcher;4737 236 | 4738 237 | std::unique_ptr<nix::remote::NixRemote::Stub> stub;4739 | 4740 | {}4741 238 | grpc::ClientContext ctx;4742 239 | std::unique_ptr<grpc::ClientReader<nix::remote::NarFrame>> reader;4743 | 4744 | {}4745 240 | std::vector<std::shared_ptr<NarSpool>> targets;4746 241 | std::jthread thread;4747 | 4748 | {}4749../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4750 243 | void run()4751 | ^4752 | static 4753../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]4754 254 | } catch (...) {4755 | ^4756../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4757 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t4758 | ^ ~~~~~4759 | static 4760../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4761 279 | void startPending()4762 | ^4763 | static 4764../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4765 304 | void startSession(const std::vector<nix::StorePath> & paths)4766 | ^4767 | static 4768../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error]4769 6 | #include <algorithm>4770 | ^~~~~~~~~~~4771../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4772 201 | auto getReference() const -> StoreReference override {4773 | ^4774 | [[nodiscard]] 4775../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4776 212 | auto openStore() const -> ref<Store> override;4777 | ^4778 | [[nodiscard]] 4779../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]4780 256 | auto connectHint(const std::string & msg) const -> std::string4781 | ^4782 | [[nodiscard]] 4783../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]4784 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message()));4785 | ^4786/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError'4787 365 | #define printError(args...) printMsg(lvlError, args)4788 | ^4789/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg'4790 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args)4791 | ^4792/nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing'4793 357 | do { \4794 | ^4795../src/client/store.hh:352:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4796 348 | std::shared_ptr<Store> evalStore;4797 | 4798 | {}4799 349 | ref<Builder> inner;4800 350 | 4801 351 | public:4802 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr<Store> evalStore,4803 | ^4804../src/client/store.hh:410:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4805 405 | std::string text;4806 | 4807 | {}4808 406 | std::vector<Logger::Field> fields;4809 | 4810 | {}4811 407 | std::optional<Activity> act;4812 | 4813 | {}4814 408 | 4815 409 | public:4816 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4817 | ^4818../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]4819 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4820 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4821../src/client/store.hh:410:36: note: the first parameter in the range is 'text'4822 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4823 | ^~~~4824../src/client/store.hh:410:69: note: the last parameter in the range is 'fields'4825 410 | BuildLogActivity(std::string text, std::vector<Logger::Field> fields)4826 | ^~~~~~4827../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]4828 420 | if (msg.has_log_line()) {4829 | ^4830../src/client/store.hh:422:11: note: else branch starts here4831 422 | } else {4832 | ^4833../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]4834 466 | struct Job {4835 | ^4836 467 | StorePath drvPath;4837 468 | BasicDerivation drv;4838 469 | std::vector<Job *> dependants;4839 | 4840 | {}4841 470 | std::vector<Job *> inputs;4842 | 4843 | {}4844 471 | size_t waiting = 0;4845 472 | uint64_t cpHintMs = 0;4846 473 | unsigned bounced = 0;4847 474 | std::optional<StorePath> failedInput;4848 | 4849 | {}4850 475 | std::optional<BuildResult> result;4851 | 4852 | {}4853 476 | // Set by the reader thread, consumed by a build thread.4854 477 | std::string workerAddr;4855 | 4856 | {}4857 478 | uint64_t assignId = 0;4858 479 | // A second Assigned while building: the scheduler moved the drv to a4859 480 | // worker that was already at it. Followed when the current one bounces.4860 481 | std::string redirectAddr;4861 | 4862 | {}4863../src/client/store.hh:557:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4864 557 | struct Connection : RemoteStore::Connection4865 | ^4866 558 | {4867 559 | private:4868 560 | friend struct GrpcStore;4869 561 | 4870 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the4871 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the4872 564 | // blocking, ordered semantics the worker protocol relies on without4873 565 | // reimplementing Source/Sink on top of gRPC.4874 566 | grpc::ClientContext ctx;4875 567 | std::unique_ptr<GrpcStream> stream;4876 | 4877 | {}4878 568 | 4879 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC4880 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads4881 571 | 4882 572 | std::jthread reader;4883 | 4884 | {}4885../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]4886 613 | ~GrpcStore() override4887 | ^4888../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]4889 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override4890 | ^4891../src/client/store.hh:633:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]4892 629 | std::unique_ptr<Source> upstream;4893 | 4894 | {}4895 630 | AutoCloseFD fd;4896 631 | bool complete = false;4897 632 | 4898 633 | explicit ReplayableNar(std::unique_ptr<Source> src)4899 | ^4900../src/client/store.hh:645:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4901 645 | LambdaSink tee([&](std::string_view data) -> void {4902 | ^4903 | const 4904../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]4905 652 | } catch (...) {4906 | ^4907../src/client/store.hh:667:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4908 667 | FdSource replay(fd.get());4909 | ^4910 | const 4911../src/client/transfer.cc:21:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors]4912 21 | #include <grpcpp/support/sync_stream.h>4913 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4914 22 | 4915../src/client/transfer.cc:24:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4916 24 | #include <nix/store/derived-path.hh>4917 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4918 25 | #include <nix/store/path-info.hh>4919../src/client/transfer.cc:28:1: error: included header worker-protocol.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4920 28 | #include <nix/store/worker-protocol.hh>4921 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4922 29 | #include <nix/util/error.hh>4923../src/client/transfer.cc:29:1: error: included header error.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4924 29 | #include <nix/util/error.hh>4925 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~4926 30 | #include <nix/util/logging.hh>4927../src/client/transfer.cc:32:1: error: included header serialise.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4928 32 | #include <nix/util/serialise.hh>4929 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4930 33 | #include <nix/util/util.hh>4931../src/client/transfer.cc:33:1: error: included header util.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4932 33 | #include <nix/util/util.hh>4933 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~4934 34 | 4935../src/client/transfer.cc:36:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]4936 36 | #include "nix_remote.grpc.pb.h"4937 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4938 37 | #include "nix_remote.pb.h"4939../src/client/transfer.cc:38:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4940 38 | #include "path-info-wire.hh"4941 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~4942 39 | #include "pump.hh"4943../src/client/transfer.cc:39:1: error: included header pump.hh is not used directly [misc-include-cleaner,-warnings-as-errors]4944 39 | #include "pump.hh"4945 | ^~~~~~~~~~~~~~~~~~4946 40 | 4947../src/client/transfer.cc:43:17: error: method 'queryValidPathsRouted' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4948 43 | auto GrpcStore::queryValidPathsRouted(const StorePathSet & paths, SubstituteFlag maybeSubstitute,4949 | ^4950 | static 4951../src/client/transfer.cc:57:16: error: variable 'res' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4952 57 | StorePathSet res;4953 | ^ 4954 | = 04955../src/client/transfer.cc:64:17: error: method 'queryMissing' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4956 64 | auto GrpcStore::queryMissing(const std::vector<DerivedPath> & targets)4957 | ^4958 | static 4959../src/client/transfer.cc:73:5: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4960 73 | grpc::ClientContext ctx;4961 | ^4962 | const 4963../src/client/transfer.cc:100:17: error: method 'queryPathInfosNative' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4964 100 | auto GrpcStore::queryPathInfosNative(const StorePathSet &paths) -> PathInfoMap {4965 | ^4966 | static 4967../src/client/transfer.cc:107:5: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4968 107 | grpc::ClientContext ctx;4969 | ^4970 | const 4971../src/client/transfer.cc:141:17: error: method 'runInfoBatches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4972 141 | void GrpcStore::runInfoBatches(const std::stop_token & stop)4973 | ^4974 | static 4975../src/client/transfer.cc:152:22: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4976 152 | StorePathSet paths;4977 | ^ 4978 | = 04979../src/client/transfer.cc:177:17: error: method 'queryPathInfoUncached' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4980 177 | void GrpcStore::queryPathInfoUncached(const StorePath & path, InfoCallback callback) noexcept {4981 | ^4982 | static 4983../src/client/transfer.cc:203:17: error: method 'addMultipleToStoreRouted' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]4984 203 | void GrpcStore::addMultipleToStoreRouted(4985 | ^4986 | static 4987../src/client/transfer.cc:216:17: error: variable 'addMultipleToStoreOnce' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors]4988 216 | auto GrpcStore::addMultipleToStoreOnce(4989 | ^4990 | static 4991../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]4992 293 | bool dynamic = false;4993 | ^4994 | const 4995../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]4996 296 | nix::StorePathSet srcs;4997 | ^ 4998 | = 04999../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5000 24 | nix::StringSink sink;5001 | ^5002 | const 5003../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]5004 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5005 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5006../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'5007 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5008 | ^~~~~~~~5009../src/pump.hh:65:57: note: the last parameter in the range is 'buf'5010 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t5011 | ^~~5012../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5013 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);5014 | ^ 5015 | = 05016../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]5017 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;5018 | ^5019../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]5020 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;5021 | ^5022../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]5023 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch5024 | ^5025../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]5026 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;5027 | ^5028../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]5029 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;5030 | ^5031../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]5032 97 | return static_cast<ssize_t>(got);5033 | ^5034>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/main.cc5035/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found5036/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found5037Error while processing /build/source/src/daemon/main.cc.5038../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5039 66 | struct BuildEvent5040 | ^5041 67 | {5042 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;5043 69 | std::string text;5044 | 5045 | {}5046../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]5047 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;5048 | ^5049../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]5050 22 | enum class Role : std::uint8_t {5051 | ^5052../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5053 51 | class Acl5054 | ^5055 52 | {5056 53 | struct Rule5057 54 | {5058 55 | std::string pattern;5059 56 | Role role;5060 57 | };5061 58 | 5062 59 | std::vector<Rule> rules;5063 | 5064 | {}5065 60 | // Separate from the glob rules so '*' cannot grant anonymous access.5066 61 | std::optional<Role> anonRole;5067 | 5068 | {}5069../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5070 53 | struct Rule5071 | ^5072 54 | {5073 55 | std::string pattern;5074 | 5075 | {}5076../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5077 70 | void addRule(std::string_view spec)5078 | ^5079 | static 5080../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5081 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>5082 | ^ ~~~~~5083 | static 5084../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5085 19 | struct Caller5086 | ^5087 20 | {5088 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5089 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics5090 23 | std::optional<Role> role;5091 | 5092 | {}5093../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]5094 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };5095 | ^5096../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5097 53 | struct Backends5098 | ^5099 54 | {5100 55 | std::string socketPath;5101 | 5102 | {}5103../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]5104 82 | if (event.kind == BuildEvent::Kind::phase) {5105 | ^5106../src/daemon/backend.hh:84:7: note: else branch starts here5107 84 | } else {5108 | ^5109../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5110 40 | std::optional<Remote> remote;5111 | 5112 | {}5113 41 | 5114 42 | public:5115 43 | explicit Cache(const Niks3Config & cfg)5116 | ^5117../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5118 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>5119 | ^5120 | static 5121../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5122 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures5123 | ^5124 | static 5125../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]5126 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures5127 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5128../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'5129 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures5130 | ^~~~~5131../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'5132 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures5133 | ^~~~~~~~~5134../src/daemon/cache.hh:97:38: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5135 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)5136 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5137../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths'5138 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)5139 | ^~~~~5140../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled'5141 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)5142 | ^~~~~~~~~5143../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5144 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const5145 | ^ ~~~~~5146 | static 5147../src/daemon/coordinator.hh:45:8: error: constructor does not initialize these fields: since [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5148 45 | struct Expected5149 | ^5150 46 | {5151 47 | uint64_t assignId = 0;5152 48 | Clock::time_point since;5153 | 5154 | {}5155../src/daemon/coordinator.hh:52:12: error: constructor does not initialize these fields: mutex, cv, resultWire [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5156 52 | struct Shared5157 | ^5158 53 | {5159 54 | std::mutex mutex;5160 | 5161 | {}5162 55 | std::condition_variable cv;5163 | 5164 | {}5165 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along5166 57 | std::atomic<unsigned> attached{0}; // callers waiting in attach(); the build outlives its first caller for them5167 58 | bool finished = false;5168 59 | std::string resultWire; // BuildDerivationDone serialised5169 | 5170 | {}5171../src/daemon/coordinator.hh:80:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5172 80 | struct Admission5173 | ^5174 81 | {5175 82 | std::shared_ptr<Expected::Shared> shared;5176 | 5177 | {}5178../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]5179 91 | const std::vector<std::pair<std::string, uint64_t>> & outputs,5180 | ^~~~~5181../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5182 95 | auto hello() const -> nix::remote::WorkerMsg;5183 | ^5184 | [[nodiscard]] 5185../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5186 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;5187 | ^5188 | [[nodiscard]] 5189../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]5190 111 | const Options & options;5191 | ^5192../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]5193 112 | Metrics & metrics;5194 | ^5195../src/daemon/coordinator.hh:114:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5196 114 | struct State5197 | ^5198 115 | {5199 116 | std::unordered_map<std::string, Expected> expected;5200 | 5201 | {}5202../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]5203 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs);5204 | ^~~~~5205../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5206 45 | struct Config5207 | ^5208 46 | {5209 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system5210 | 5211 | {}5212 48 | PresentFn present; // unset: nothing is ever Cached5213 | 5214 | {}5215../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5216 64 | struct Client5217 | ^5218 65 | {5219 66 | sched::ClientId id = 0;5220 67 | ClientSend send;5221 | 5222 | {}5223../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5224 80 | struct Worker5225 | ^5226 81 | {5227 82 | WorkerSend send;5228 | 5229 | {}5230 83 | std::optional<sched::WorkerId> id;5231 | 5232 | {}5233../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]5234 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &5235 | ^5236 | [[nodiscard]] 5237/nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'5238 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))5239 | ^5240../src/daemon/idle.hh:41:24: error: method 'idleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5241 41 | [[nodiscard]] auto idleFor() const -> Clock::duration5242 | ^ ~~~~~5243 | static 5244../src/daemon/main.cc:9:10: error: 'algorithm' file not found [clang-diagnostic-error]5245 9 | #include <algorithm>5246 | ^~~~~~~~~~~5247../src/daemon/main.cc:45:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5248 45 | #include <nix/store/derived-path.hh>5249 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5250 46 | #include <nix/store/globals.hh>5251../src/daemon/main.cc:62:1: error: included header unix-domain-socket.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5252 62 | #include <nix/util/unix-domain-socket.hh>5253 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5254 63 | #include <nix/util/util.hh>5255../src/daemon/main.cc:76:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5256 76 | #include "oidc.hh"5257 | ^~~~~~~~~~~~~~~~~~5258 77 | #include "path-info-wire.hh"5259../src/daemon/main.cc:77:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors]5260 77 | #include "path-info-wire.hh"5261 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~5262 78 | #include "metrics.hh"5263../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]5264 91 | volatile std::sig_atomic_t nixgrpc::stopSignal = 0;5265 | ^5266 | static 5267../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]5268 100 | nixgrpc::Metrics & metrics;5269 | ^5270../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]5271 101 | nixgrpc::IdleTracker & idle;5272 | ^5273../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]5274 103 | nixgrpc::Auth & auth;5275 | ^5276../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]5277 105 | nixgrpc::Coordinator & coord;5278 | ^5279../src/daemon/main.cc:112:24: error: method 'openLocalStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5280 112 | [[nodiscard]] auto openLocalStore() const -> nix::ref<nix::Store>5281 | ^ ~~~~~5282 | static 5283../src/daemon/main.cc:119:10: error: method 'getStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5284 119 | auto getStore() -> nix::ref<nix::Store>5285 | ^5286 | static 5287../src/daemon/main.cc:130:10: error: method 'localDaemonGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5288 130 | auto localDaemonGone(const std::exception & err) -> bool5289 | ^5290 | static 5291../src/daemon/main.cc:133:20: error: variable 'gone' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5292 133 | bool const gone = dynamic_cast<const nix::EndOfFile *>(&err) != nullptr5293 | ^5294 134 | || (sys != nullptr && (sys->errNo == EPIPE || sys->errNo == ECONNRESET));5295 | 5296 | = false5297../src/daemon/main.cc:163:23: error: forwarding reference parameter 'func' is never forwarded inside the function body [cppcoreguidelines-missing-std-forward,-warnings-as-errors]5298 163 | auto guarded(F && func) -> grpc::Status5299 | ^5300../src/daemon/main.cc:185:81: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5301 185 | void logDebug(std::initializer_list<std::pair<std::string_view, std::string>> fields)5302 | ^5303 | /*unused*/5304../src/daemon/main.cc:195:12: error: constructor does not initialize these fields: context, method [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5305 195 | struct Rpc5306 | ^5307 196 | {5308 197 | grpc::ServerContext * context;5309 | 5310 | {}5311 198 | std::string_view method;5312 | 5313 | {}5314../src/daemon/main.cc:202:14: error: method 'done' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5315 202 | void done(const Fields & extra) const5316 | ^ ~~~~~5317 | static 5318../src/daemon/main.cc:230:5: error: constructor does not initialize these fields: storeUri, workerName, storeMutex, store [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5319 98 | NixRemoteService(5320 | ^5321../src/daemon/main.cc:231:9: error: 3 adjacent parameters of 'NixRemoteService' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5322 231 | std::string socketPath,5323 | ^~~~~~~~~~~~~~~~~~~~~~~5324 232 | std::string storeUri,5325 | ~~~~~~~~~~~~~~~~~~~~~5326 233 | std::string workerName,5327 | ~~~~~~~~~~~~~~~~~~~~~~5328../src/daemon/main.cc:231:21: note: the first parameter in the range is 'socketPath'5329 231 | std::string socketPath,5330 | ^~~~~~~~~~5331../src/daemon/main.cc:233:21: note: the last parameter in the range is 'workerName'5332 233 | std::string workerName,5333 | ^~~~~~~~~~5334../src/daemon/main.cc:297:31: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5335 297 | nix::StorePathSet paths;5336 | ^ 5337 | = 05338../src/daemon/main.cc:591:9: error: 2 adjacent parameters of 'buildExpected' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5339 591 | const nixgrpc::BuildEventSink & log,5340 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5341 592 | const std::map<std::string, nix::StorePath> & outPaths,5342 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5343../src/daemon/main.cc:591:41: note: the first parameter in the range is 'log'5344 591 | const nixgrpc::BuildEventSink & log,5345 | ^~~5346../src/daemon/main.cc:592:55: note: the last parameter in the range is 'outPaths'5347 592 | const std::map<std::string, nix::StorePath> & outPaths,5348 | ^~~~~~~~5349../src/daemon/main.cc:595:53: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]5350 595 | std::vector<std::pair<std::string, uint64_t>> & outputs) -> grpc::Status5351 | ^5352 | /*unused*/5353../src/daemon/main.cc:731:13: error: variable 'counting' of type 'nix::LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]5354 731 | nix::LambdaSink counting([&](std::string_view data) -> void {5355 | ^5356 | const 5357../src/daemon/main.cc:796:6: error: an exception may be thrown in function 'main' which should not throw exceptions [bugprone-exception-escape,-warnings-as-errors]5358 796 | auto main(int argc, char ** argv) -> int5359 | ^5360../src/daemon/main.cc:819:9: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'main' here5361 819 | throw nix::Error("--idle-timeout requires systemd socket activation");5362 | ^5363../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5364 71 | std::string method;5365 | 5366 | {}5367 72 | prometheus::Histogram * hist = nullptr;5368 73 | std::chrono::steady_clock::time_point start;5369 | 5370 | {}5371 74 | 5372 75 | public:5373 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.5374 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)5375 | ^5376../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5377 145 | void buildInfo(5378 | ^5379 | static 5380../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]5381 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5382 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5383../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'5384 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5385 | ^~~~~~~5386../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'5387 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)5388 | ^~~~~~~~5389../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5390 156 | void buildSlots(unsigned count)5391 | ^5392 | static 5393../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]5394 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5395 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5396../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'5397 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5398 | ^~~~~~5399../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'5400 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5401 | ^~~~~5402../src/daemon/metrics.hh:186:36: note: 5403 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5404 | ^5405../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values5406 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const5407 | ^5408../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')5409../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5410 21 | explicit Metrics(const std::string & listen)5411 | ^5412../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]5413 213 | void countRpc(const std::string & method, const std::string & commonName)5414 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5415../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'5416 213 | void countRpc(const std::string & method, const std::string & commonName)5417 | ^~~~~~5418../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'5419 213 | void countRpc(const std::string & method, const std::string & commonName)5420 | ^~~~~~~~~~5421../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]5422 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5423 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5424../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'5425 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5426 | ^~~~~~~~~~5427../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'5428 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5429 | ^~~~~~~~5430../src/daemon/metrics.hh:218:27: note: 5431 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5432 | ^5433../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5434 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)5435 | ^5436../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')5437../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]5438 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5439 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5440../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'5441 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5442 | ^~~~~~~~~5443../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'5444 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5445 | ^~~~~5446../src/daemon/metrics.hh:224:24: note: 5447 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5448 | ^5449../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values5450 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)5451 | ^5452../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')5453../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]5454 17 | struct Niks3Config5455 | ^5456 18 | {5457 19 | std::string url;5458 | 5459 | {}5460 20 | std::string tokenFile; // bearer, optional5461 | 5462 | {}5463 21 | std::string clientCert; // mTLS, optional5464 | 5465 | {}5466 22 | std::string clientKey;5467 | 5468 | {}5469 23 | PushProcess::Argv pushArgv;5470 | 5471 | {}5472../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]5473 34 | std::string baseUrl;5474 | 5475 | {}5476 35 | std::shared_ptr<TokenFile> bearer;5477 | 5478 | {}5479 36 | std::string clientCert;5480 | 5481 | {}5482 37 | std::string clientKey;5483 | 5484 | {}5485 38 | 5486 39 | public:5487 40 | explicit Niks3Client(const Niks3Config & cfg)5488 | ^5489../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5490 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5491 | ^ ~~~~~5492 | static 5493../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]5494 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5495 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5496../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'5497 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5498 | ^~~~5499../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'5500 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5501 | ^~~~5502../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values5503 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>5504 | ^5505../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5506 60 | struct Identity5507 | ^5508 61 | {5509 62 | std::string subject; // "oidc:<provider>:<sub>"5510 | 5511 | {}5512 63 | std::optional<Role> role; // nullopt: verified but no rule matched5513 | 5514 | {}5515../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]5516 76 | } catch (...) {5517 | ^5518../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]5519 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5520 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5521../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'5522 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5523 | ^~~~5524../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'5525 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider5526 | ^~~~5527../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]5528 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5529 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5530../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'5531 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5532 | ^~~~~~5533../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'5534 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5535 | ^~~~5536../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5537 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *5538 | ^5539../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]5540 251 | struct Jwk5541 | ^5542 252 | {5543 253 | std::string kid;5544 | 5545 | {}5546 254 | std::string kty;5547 | 5548 | {}5549 255 | std::string crv;5550 | 5551 | {}5552 256 | std::string pem;5553 | 5554 | {}5555../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]5556 286 | if (jwk.kty == "RSA") {5557 | ^5558../src/daemon/oidc.hh:288:10: note: end of the original5559 288 | } else if (jwk.kty == "EC") {5560 | ^5561../src/daemon/oidc.hh:288:37: note: clone 1 starts here5562 288 | } else if (jwk.kty == "EC") {5563 | ^5564../src/daemon/oidc.hh:290:62: note: clone 2 starts here5565 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {5566 | ^5567../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]5568 294 | } catch (...) {5569 | ^5570../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5571 300 | struct FixedClock5572 | ^5573 301 | {5574 302 | std::chrono::system_clock::time_point at;5575 | 5576 | {}5577../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5578 347 | struct Result5579 | ^5580 348 | {5581 349 | std::optional<Identity> identity;5582 | 5583 | {}5584 350 | std::string error; // for logs, not for the client5585 | 5586 | {}5587../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5588 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)5589 | ^5590../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5591 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5592 | ^5593 | static 5594../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]5595 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5596 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5597../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'5598 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5599 | ^~~~~5600../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'5601 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5602 | ^~~5603../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values5604 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result5605 | ^5606../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5607 377 | struct KeySet5608 | ^5609 378 | {5610 379 | std::mutex lock;5611 | 5612 | {}5613 380 | std::vector<Jwk> keys;5614 | 5615 | {}5616 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".5617 382 | std::optional<std::chrono::steady_clock::time_point> fetched;5618 | 5619 | {}5620../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5621 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json5622 | ^ ~~~~~5623 | static 5624../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5625 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>5626 | ^ ~~~~~5627 | static 5628../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]5629 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5630 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5631 443 | std::chrono::steady_clock::time_point now,5632 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5633../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'5634 442 | std::optional<std::chrono::steady_clock::time_point> fetched,5635 | ^~~~~~~5636../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'5637 443 | std::chrono::steady_clock::time_point now,5638 | ^~~5639../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5640 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5641 | ^5642 | static 5643../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]5644 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5645 | ^~~~~~~~~~~~~~~~~~~~~~5646 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5647 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5648../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'5649 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,5650 | ^~~~~5651../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'5652 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5653 | ^~~5654../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values5655 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder5656 | ^5657../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5658 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5659 | ^5660 | static 5661../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]5662 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5663 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5664../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'5665 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5666 | ^~~~~5667../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'5668 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5669 | ^~~5670../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values5671 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result5672 | ^5673../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]5674 21 | struct Options5675 | ^5676 22 | {5677 23 | std::string listen = "0.0.0.0:50051";5678 24 | std::optional<std::chrono::seconds> idleTimeout;5679 | 5680 | {}5681 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";5682 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.5683 27 | std::string storeUri;5684 | 5685 | {}5686 28 | std::string tlsCert;5687 | 5688 | {}5689 29 | std::string tlsKey;5690 | 5691 | {}5692 30 | std::string clientCA;5693 | 5694 | {}5695 31 | std::string metricsListen;5696 | 5697 | {}5698 32 | std::string workerName;5699 | 5700 | {}5701 33 | LogLevel logLevel = LogLevel::info;5702 34 | Acl acl;5703 35 | xfcc::TrustedProxies proxies;5704 36 | std::string oidcConfig;5705 | 5706 | {}5707../src/daemon/push.hh:61:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5708 61 | explicit PushProcess(Argv argv)5709 | ^5710../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5711 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures5712 | ^5713 | static 5714../src/daemon/push.hh:86:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]5715 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures5716 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5717../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths'5718 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures5719 | ^~~~~5720../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled'5721 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures5722 | ^~~~~~~~~5723../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5724 123 | struct Result5725 | ^5726 124 | {5727 125 | std::string status = "ok";5728 126 | std::string message;5729 | 5730 | {}5731 127 | Signatures signatures;5732 | 5733 | {}5734../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5735 130 | explicit Pending(size_t count)5736 | ^5737../src/daemon/push.hh:136:16: error: constructor does not initialize these fields: status, message, path, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5738 136 | struct Ack5739 | ^5740 137 | {5741 138 | std::string status;5742 | 5743 | {}5744 139 | std::string message;5745 | 5746 | {}5747 140 | std::string path;5748 | 5749 | {}5750 141 | std::set<std::string> signatures;5751 | 5752 | {}5753../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5754 144 | auto ack(Ack msg) -> bool5755 | ^5756 | static 5757../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]5758 147 | if (msg.status != "ok") {5759 | ^5760../src/daemon/push.hh:150:14: note: end of the original5761 150 | } else if (!msg.signatures.empty()) {5762 | ^5763../src/daemon/push.hh:150:49: note: clone 1 starts here5764 150 | } else if (!msg.signatures.empty()) {5765 | ^5766../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5767 162 | void fail(const std::string & message)5768 | ^5769 | static 5770../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5771 171 | auto wait(const Cancelled & cancelled) -> Result5772 | ^5773 | static 5774../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5775 184 | struct Inner5776 | ^5777 185 | {5778 186 | size_t left;5779 | 5780 | {}5781../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5782 193 | struct State5783 | ^5784 194 | {5785 195 | nix::Pid pid;5786 196 | std::shared_ptr<nix::AutoCloseFD> stdinFd;5787 | 5788 | {}5789../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5790 206 | void ensureChild(nix::Sync<State>::WriteLock & lck)5791 | ^5792 | static 5793../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5794 237 | void readAcks(int acksFd)5795 | ^5796 | static 5797../src/daemon/push.hh:260: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]5798 260 | } catch (nix::EndOfFile &) {5799 | ^5800../src/daemon/push.hh:262: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]5801 262 | } catch (std::exception & err) {5802 | ^5803../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5804 65 | class IndexedHeap5805 | ^5806 66 | {5807 67 | std::vector<std::pair<double, DrvId>> heap;5808 68 | std::vector<uint32_t> pos;5809 | 5810 | {}5811../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]5812 71 | void place(size_t idx, std::pair<double, DrvId> item)5813 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5814../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'5815 71 | void place(size_t idx, std::pair<double, DrvId> item)5816 | ^~~5817../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'5818 71 | void place(size_t idx, std::pair<double, DrvId> item)5819 | ^~~~5820../src/daemon/scheduler.hh:71:16: note: 5821 71 | void place(size_t idx, std::pair<double, DrvId> item)5822 | ^5823../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')5824 71 | void place(size_t idx, std::pair<double, DrvId> item)5825 | ^5826../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5827 77 | void siftUp(size_t idx)5828 | ^5829 | static 5830../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5831 91 | void siftDown(size_t idx)5832 | ^5833 | static 5834../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]5835 94 | const size_t len = heap.size();5836 | ^ 5837 | = 05838../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]5839 131 | void set(DrvId drv, double key)5840 | ^~~~~~~~~~~~~~~~~~~~~5841../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'5842 131 | void set(DrvId drv, double key)5843 | ^~~5844../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'5845 131 | void set(DrvId drv, double key)5846 | ^~~5847../src/daemon/scheduler.hh:131:14: note: 5848 131 | void set(DrvId drv, double key)5849 | ^5850../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')5851 131 | void set(DrvId drv, double key)5852 | ^5853../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5854 174 | class FreeIndex5855 | ^5856 175 | {5857 176 | public:5858 177 | static constexpr int32_t maxSlots = 63;5859 178 | 5860 179 | private:5861 180 | std::vector<int32_t> free; // may go negative (draining below running)5862 | 5863 | {}5864 181 | std::vector<uint32_t> pos;5865 | 5866 | {}5867 182 | std::vector<bool> tracked;5868 | 5869 | {}5870../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5871 191 | void check(WorkerId wid) const5872 | ^ ~~~~~5873 | static 5874../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]5875 221 | void set(WorkerId wid, int32_t val)5876 | ^~~~~~~~~~~~~~~~~~~~~~~~~5877../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'5878 221 | void set(WorkerId wid, int32_t val)5879 | ^~~5880../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'5881 221 | void set(WorkerId wid, int32_t val)5882 | ^~~5883../src/daemon/scheduler.hh:221:14: note: 5884 221 | void set(WorkerId wid, int32_t val)5885 | ^5886../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')5887 221 | void set(WorkerId wid, int32_t val)5888 | ^5889../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]5890 272 | struct Assign5891 | ^5892 273 | {5893 274 | DrvId drv = 0;5894 275 | WorkerId worker = 0;5895 276 | uint64_t assignId = 0;5896 277 | std::vector<ClientId> clients;5897 | 5898 | {}5899../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]5900 280 | struct Entry5901 | ^5902 281 | {5903 282 | std::string drvPath;5904 | 5905 | {}5906 283 | std::vector<PathKey> inputs; // for locality only5907 | 5908 | {}5909 284 | std::string system;5910 | 5911 | {}5912 285 | std::vector<std::string> features; // required5913 | 5914 | {}5915 286 | std::vector<ClientId> followers;5916 | 5917 | {}5918../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]5919 293 | struct Worker5920 | ^5921 294 | {5922 295 | std::string addr;5923 | 5924 | {}5925 296 | std::vector<std::string> systems;5926 | 5927 | {}5928 297 | std::vector<std::string> features;5929 | 5930 | {}5931 298 | int32_t maxJobs = 0;5932 299 | bool up = false;5933 300 | bool draining = false;5934 301 | std::vector<DrvId> running;5935 | 5936 | {}5937../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]5938 307 | explicit Core(Config cfg = {})5939 | ^5940../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5941 317 | auto drvId(std::string_view path) -> DrvId5942 | ^5943 | static 5944../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]5945 323 | DrvId drv = 0;5946 | ^5947 | const 5948../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5949 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>5950 | ^ ~~~~~5951 | static 5952../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5953 344 | auto workerId(std::string_view addr) -> WorkerId5954 | ^5955 | static 5956../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5957 365 | [[nodiscard]] auto queued() const -> size_t5958 | ^ ~~~~~5959 | static 5960../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]5961 367 | size_t total = 0;5962 | ^5963 | const 5964../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]5965 385 | struct WantInfo5966 | ^5967 386 | {5968 387 | std::string_view drvPath;5969 | 5970 | {}5971 388 | std::vector<std::string_view> inputs;5972 | 5973 | {}5974 389 | std::string_view system;5975 | 5976 | {}5977 390 | std::vector<std::string> features;5978 | 5979 | {}5980../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5981 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult5982 | ^5983 | static 5984../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]5985 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5986 | ^5987 | static 5988../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]5989 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5990 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5991../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'5992 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5993 | ^~~~~~5994../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'5995 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5996 | ^~~~~~~5997../src/daemon/scheduler.hh:429:17: note: 5998 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>5999 | ^6000../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')6001 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>6002 | ^6003../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6004 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)6005 | ^6006 | static 6007../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6008 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)6009 | ^6010 | /*unused*/6011../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6012 478 | struct HelloInfo6013 | ^6014 479 | {6015 480 | std::string_view addr;6016 | 6017 | {}6018 481 | std::vector<std::string> systems; // first is the native one6019 | 6020 | {}6021 482 | std::vector<std::string> features;6022 | 6023 | {}6024../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]6025 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6026 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6027../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'6028 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6029 | ^~~6030../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'6031 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6032 | ^~~~~~~6033../src/daemon/scheduler.hh:539:10: note: 6034 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6035 | ^6036../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')6037 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6038 | ^6039../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6040 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)6041 | ^6042 | /*unused*/6043../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6044 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool6045 | ^ ~~~~~6046 | static 6047../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6048 610 | struct StatsKey6049 | ^6050 611 | {6051 612 | std::string system;6052 | 6053 | {}6054 613 | std::string features; // sorted, comma-joined6055 | 6056 | {}6057../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6058 704 | void retire(DrvId drv)6059 | ^6060 | static 6061../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6062 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6063 | ^6064 | static 6065../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]6066 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6067 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6068../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'6069 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6070 | ^~~~6071../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'6072 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6073 | ^~~6074../src/daemon/scheduler.hh:716:26: note: 6075 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6076 | ^6077../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'6078 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)6079 | ^6080../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6081 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t6082 | ^ ~~~~~6083 | static 6084../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6085 784 | void refreshFree(WorkerId wid)6086 | ^6087 | static 6088../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6089 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>6090 | ^ ~~~~~6091 | static 6092../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]6093 865 | return picked;6094 | ^6095../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]6096 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)6097 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6098../src/daemon/socket-activation.hh:90:37: note: the first parameter in the range is 'listenFds'6099 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)6100 | ^~~~~~~~~6101../src/daemon/socket-activation.hh:90:120: note: the last parameter in the range is 'acceptor'6102 90 | acceptInto(const std::vector<int> & listenFds, const std::shared_ptr<grpc::experimental::ExternalConnectionAcceptor> & acceptor)6103 | ^~~~~~~~6104../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6105 21 | struct Cached6106 | ^6107 22 | {6108 23 | std::string token;6109 | 6110 | {}6111../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6112 19 | nix::Sync<Cached> cached;6113 | 6114 | {}6115 20 | 6116 21 | static auto mtime(const struct stat & info) -> struct timespec6117 22 | {6118 23 | #ifdef __APPLE__6119 24 | return info.st_mtimespec;6120 25 | #else6121 26 | return info.st_mtim;6122 27 | #endif6123 28 | }6124 29 | 6125 30 | public:6126 31 | explicit TokenFile(std::string path_)6127 | ^6128../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6129 46 | auto get() -> std::string6130 | ^6131 | static 6132../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6133 29 | std::string_view rest;6134 | 6135 | {}6136 30 | 6137 31 | public:6138 32 | explicit Cursor(std::string_view input)6139 | ^6140../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6141 47 | auto take() -> char6142 | ^6143 | static 6144../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6145 52 | char const chr = rest.front();6146 | ^ 6147 | = 06148../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6149 58 | auto until(std::string_view stops) -> std::optional<std::string_view>6150 | ^6151 | static 6152../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6153 69 | auto remaining() -> std::string_view6154 | ^6155 | static 6156../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]6157 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>6158 | ^6159../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6160 192 | class TrustedProxies6161 | ^6162 193 | {6163 194 | std::vector<std::string> patterns;6164 | 6165 | {}6166../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6167 197 | void add(std::string_view pattern)6168 | ^6169 | static 6170../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6171 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool6172 | ^ ~~~~~6173 | static 6174../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6175 81 | void header(const std::string & line)6176 | ^6177 | static 6178../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]6179 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)6180 | ^6181../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6182 129 | auto perform() -> long6183 | ^6184 | static 6185../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6186 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds6187 | ^ ~~~~~6188 | static 6189../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]6190 23 | inline auto logfmtValue(std::string_view value) -> std::string6191 | ^6192../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]6193 52 | enum class LogLevel : std::uint8_t { info, debug };6194 | ^6195../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6196 293 | bool dynamic = false;6197 | ^6198 | const 6199../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6200 296 | nix::StorePathSet srcs;6201 | ^ 6202 | = 06203../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6204 24 | nix::StringSink sink;6205 | ^6206 | const 6207../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]6208 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t6209 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6210../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd'6211 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t6212 | ^~~~~~~~6213../src/pump.hh:65:57: note: the last parameter in the range is 'buf'6214 65 | inline auto readCoalesced(int sourceFd, std::span<char> buf) -> ssize_t6215 | ^~~6216../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6217 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0);6218 | ^ 6219 | = 06220../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]6221 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;6222 | ^6223../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]6224 77 | return got != 0 ? static_cast<ssize_t>(got) : -1;6225 | ^6226../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]6227 90 | return static_cast<ssize_t>(got); // EOF; caller sees short (possibly zero) batch6228 | ^6229../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]6230 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;6231 | ^6232../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]6233 95 | return got != 0 ? static_cast<ssize_t>(got) : -1;6234 | ^6235../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]6236 97 | return static_cast<ssize_t>(got);6237 | ^6238>>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/coordinator.cc6239Errors encountered while running clang-tidy6240/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found6241/nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found6242Error while processing /build/source/src/daemon/coordinator.cc.6243../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6244 66 | struct BuildEvent6245 | ^6246 67 | {6247 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6248 69 | std::string text;6249 | 6250 | {}6251../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]6252 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line;6253 | ^6254../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6255 46 | explicit StaticHeaders(std::shared_ptr<const Headers> headers) : headers(std::move(headers)) {}6256 | ^6257../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6258 62 | explicit Factory(Headers hdrs) : headers(std::make_shared<const Headers>(std::move(hdrs))) {}6259 | ^6260 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/)6261 64 | -> grpc::experimental::Interceptor * override {6262 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it6263 66 | }6264 67 | private:6265 68 | std::shared_ptr<const Headers> headers;6266 | 6267 | {}6268../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6269 77 | std::string path;6270 | 6271 | {}6272 78 | 6273 79 | public:6274 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {}6275 | ^6276../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6277 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/,6278 | ^6279 | static 6280../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors]6281 87 | std::multimap<grpc::string, grpc::string> * metadata) -> grpc::Status override {6282 | ^6283 | const 6284../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]6285 22 | enum class Role : std::uint8_t {6286 | ^6287../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6288 51 | class Acl6289 | ^6290 52 | {6291 53 | struct Rule6292 54 | {6293 55 | std::string pattern;6294 56 | Role role;6295 57 | };6296 58 | 6297 59 | std::vector<Rule> rules;6298 | 6299 | {}6300 60 | // Separate from the glob rules so '*' cannot grant anonymous access.6301 61 | std::optional<Role> anonRole;6302 | 6303 | {}6304../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6305 53 | struct Rule6306 | ^6307 54 | {6308 55 | std::string pattern;6309 | 6310 | {}6311../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6312 70 | void addRule(std::string_view spec)6313 | ^6314 | static 6315../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6316 95 | [[nodiscard]] auto roleFor(const std::optional<std::string> & commonName) const -> std::optional<Role>6317 | ^ ~~~~~6318 | static 6319../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6320 19 | struct Caller6321 | ^6322 20 | {6323 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6324 22 | std::string name = "-"; // cert CN or oidc:<provider>:<sub>, for logs and metrics6325 23 | std::optional<Role> role;6326 | 6327 | {}6328../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]6329 21 | enum class Kind : std::uint8_t { anonymous, named, badToken };6330 | ^6331../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6332 53 | struct Backends6333 | ^6334 54 | {6335 55 | std::string socketPath;6336 | 6337 | {}6338../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]6339 82 | if (event.kind == BuildEvent::Kind::phase) {6340 | ^6341../src/daemon/backend.hh:84:7: note: else branch starts here6342 84 | } else {6343 | ^6344../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6345 40 | std::optional<Remote> remote;6346 | 6347 | {}6348 41 | 6349 42 | public:6350 43 | explicit Cache(const Niks3Config & cfg)6351 | ^6352../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6353 61 | [[nodiscard]] auto present(const std::vector<std::string> & keys) -> std::unordered_set<std::string>6354 | ^6355 | static 6356../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6357 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures6358 | ^6359 | static 6360../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]6361 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures6362 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6363../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths'6364 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures6365 | ^~~~~6366../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled'6367 87 | auto publish(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures6368 | ^~~~~~~~~6369../src/daemon/cache.hh:97:38: error: 2 adjacent parameters of 'publish' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6370 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)6371 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6372../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths'6373 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)6374 | ^~~~~6375../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled'6376 97 | void publish(nix::Store & store, const std::vector<std::string> & paths, const Cancelled & cancelled = never)6377 | ^~~~~~~~~6378../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6379 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const6380 | ^ ~~~~~6381 | static 6382../src/daemon/coordinator.cc:25:1: error: included header create_channel.h is not used directly [misc-include-cleaner,-warnings-as-errors]6383 25 | #include <grpcpp/create_channel.h>6384 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6385 26 | #include <grpcpp/health_check_service_interface.h>6386../src/daemon/coordinator.cc:27:1: error: included header credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors]6387 27 | #include <grpcpp/security/credentials.h>6388 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6389 28 | #include <grpcpp/security/tls_certificate_provider.h>6390../src/daemon/coordinator.cc:28:1: error: included header tls_certificate_provider.h is not used directly [misc-include-cleaner,-warnings-as-errors]6391 28 | #include <grpcpp/security/tls_certificate_provider.h>6392 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6393 29 | #include <grpcpp/security/tls_credentials_options.h>6394../src/daemon/coordinator.cc:34:1: error: included header status.h is not used directly [misc-include-cleaner,-warnings-as-errors]6395 34 | #include <grpcpp/support/status.h>6396 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6397 35 | #include <grpcpp/support/sync_stream.h>6398../src/daemon/coordinator.cc:35:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors]6399 35 | #include <grpcpp/support/sync_stream.h>6400 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6401 36 | 6402../src/daemon/coordinator.cc:38:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6403 38 | #include <nix/util/file-system.hh>6404 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6405 39 | 6406../src/daemon/coordinator.cc:43:1: error: included header cache.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6407 43 | #include "cache.hh"6408 | ^~~~~~~~~~~~~~~~~~~6409 44 | #include "client/channel.hh"6410../src/daemon/coordinator.cc:44:1: error: included header channel.hh is not used directly [misc-include-cleaner,-warnings-as-errors]6411 44 | #include "client/channel.hh"6412 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~6413 45 | #include "logfmt.hh"6414../src/daemon/coordinator.cc:47:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors]6415 47 | #include "nix_remote.grpc.pb.h"6416 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6417 48 | #include "nix_remote.pb.h"6418../src/daemon/coordinator.cc:70:1: error: constructor does not initialize these fields: state, sendFn [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6419 70 | Builder::Builder(const Options & options, Metrics & metrics)6420 | ^6421../src/daemon/coordinator.cc:91:15: error: method 'onRevoke' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6422 91 | void Builder::onRevoke(const nix::remote::Revoke & rev)6423 | ^6424../src/daemon/coordinator.cc:112:15: error: method 'admit' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6425 112 | auto Builder::admit(const std::string & drvPath) -> std::optional<Admission>6426 | ^6427 | static 6428../src/daemon/coordinator.cc:125:15: error: method 'finished' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6429 125 | void Builder::finished(6430 | ^6431 | static 6432../src/daemon/coordinator.cc:128:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6433 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs,6434 | ^6435 | /*unused*/6436../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]6437 152 | const std::string & drvPath,6438 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~6439 153 | uint64_t assignId,6440 | ~~~~~~~~~~~~~~~~~6441../src/daemon/coordinator.cc:152:25: note: the first parameter in the range is 'drvPath'6442 152 | const std::string & drvPath,6443 | ^~~~~~~6444../src/daemon/coordinator.cc:153:14: note: the last parameter in the range is 'assignId'6445 153 | uint64_t assignId,6446 | ^~~~~~~~6447../src/daemon/coordinator.cc:152:5: note: 6448 152 | const std::string & drvPath,6449 | ^6450../src/daemon/coordinator.cc:153:5: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6451 153 | uint64_t assignId,6452 | ^6453../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')6454../src/daemon/coordinator.cc:155:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]6455 155 | const std::vector<std::pair<std::string, uint64_t>> & outputs)6456 | ^6457 | /*unused*/6458../src/daemon/coordinator.cc:195:15: error: method 'setDraining' can be made const [readability-make-member-function-const,-warnings-as-errors]6459 195 | void Builder::setDraining(bool draining)6460 | ^ 6461 | const6462../src/daemon/coordinator.cc:210:15: error: method 'send' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6463 210 | auto Builder::send(const WorkerMsg & msg) const -> bool6464 | ^ ~~~~~6465../src/daemon/coordinator.cc:216:15: error: method 'tick' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6466 216 | void Builder::tick()6467 | ^6468../src/daemon/coordinator.cc:292:5: error: variable 'tls' of type 'grpc::experimental::TlsChannelCredentialsOptions' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6469 292 | grpc::experimental::TlsChannelCredentialsOptions tls;6470 | ^6471 | const 6472../src/daemon/coordinator.cc:296:24: error: no header providing "nix::Error" is directly included [misc-include-cleaner,-warnings-as-errors]6473 47 | throw nix::Error("loading CA certificates: %s", status.ToString());6474 | ^6475../src/daemon/coordinator.cc:321:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]6476 321 | if (active) {6477 | ^6478../src/daemon/coordinator.cc:323:7: note: else branch starts here6479 323 | } else {6480 | ^6481../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]6482 340 | Coordinator::Coordinator(const Options & options, Auth & auth, Metrics & metrics)6483 | ^6484../src/daemon/coordinator.cc:406:20: error: variable 'elect' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]6485 406 | const bool elect = options.niks3.enabled() && (!builder || !options.schedulerAddr.empty());6486 | ^ 6487 | = false6488../src/daemon/coordinator.cc:415:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors]6489 415 | if (options.schedulerAddr.empty()) {6490 | ^6491../src/daemon/coordinator.cc:417:7: note: else branch starts here6492 417 | } else {6493 | ^6494../src/daemon/coordinator.cc:455:9: error: variable 'restarting' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]6495 455 | bool restarting = false;6496 | ^6497 | const 6498/build/source/build/../src/daemon/coordinator.hh:5:10: error: 'atomic' file not found [clang-diagnostic-error]6499 5 | #include <atomic>6500 | ^~~~~~~~6501/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]6502 45 | struct Expected6503 | ^6504 46 | {6505 47 | uint64_t assignId = 0;6506 48 | Clock::time_point since;6507 | 6508 | {}6509/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]6510 52 | struct Shared6511 | ^6512 53 | {6513 54 | std::mutex mutex;6514 | 6515 | {}6516 55 | std::condition_variable cv;6517 | 6518 | {}6519 56 | std::atomic<bool> revoked{false}; // scheduler moved the drv to a worker further along6520 57 | std::atomic<unsigned> attached{0}; // callers waiting in attach(); the build outlives its first caller for them6521 58 | bool finished = false;6522 59 | std::string resultWire; // BuildDerivationDone serialised6523 | 6524 | {}6525/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]6526 80 | struct Admission6527 | ^6528 81 | {6529 82 | std::shared_ptr<Expected::Shared> shared;6530 | 6531 | {}6532/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]6533 91 | const std::vector<std::pair<std::string, uint64_t>> & outputs,6534 | ^~~~~6535/build/source/build/../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6536 95 | auto hello() const -> nix::remote::WorkerMsg;6537 | ^6538 | [[nodiscard]] 6539/build/source/build/../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6540 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool;6541 | ^6542 | [[nodiscard]] 6543/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]6544 111 | const Options & options;6545 | ^6546/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]6547 112 | Metrics & metrics;6548 | ^6549/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]6550 114 | struct State6551 | ^6552 115 | {6553 116 | std::unordered_map<std::string, Expected> expected;6554 | 6555 | {}6556/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]6557 128 | const std::vector<std::pair<std::string, uint64_t>> & outputs);6558 | ^~~~~6559../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6560 45 | struct Config6561 | ^6562 46 | {6563 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system6564 | 6565 | {}6566 48 | PresentFn present; // unset: nothing is ever Cached6567 | 6568 | {}6569../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6570 64 | struct Client6571 | ^6572 65 | {6573 66 | sched::ClientId id = 0;6574 67 | ClientSend send;6575 | 6576 | {}6577../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6578 80 | struct Worker6579 | ^6580 81 | {6581 82 | WorkerSend send;6582 | 6583 | {}6584 83 | std::optional<sched::WorkerId> id;6585 | 6586 | {}6587../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors]6588 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex &6589 | ^6590 | [[nodiscard]] 6591/nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED'6592 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x)))6593 | ^6594../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6595 71 | std::string method;6596 | 6597 | {}6598 72 | prometheus::Histogram * hist = nullptr;6599 73 | std::chrono::steady_clock::time_point start;6600 | 6601 | {}6602 74 | 6603 75 | public:6604 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase.6605 77 | Phase(Metrics & metrics, std::string method, const std::string & phase)6606 | ^6607../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6608 145 | void buildInfo(6609 | ^6610 | static 6611../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]6612 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6613 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6614../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version'6615 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6616 | ^~~~~~~6617../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features'6618 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features)6619 | ^~~~~~~~6620../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6621 156 | void buildSlots(unsigned count)6622 | ^6623 | static 6624../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]6625 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6626 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6627../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system'6628 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6629 | ^~~~~~6630../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count'6631 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6632 | ^~~~~6633../src/daemon/metrics.hh:186:36: note: 6634 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6635 | ^6636../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values6637 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const6638 | ^6639../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')6640../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6641 21 | explicit Metrics(const std::string & listen)6642 | ^6643../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]6644 213 | void countRpc(const std::string & method, const std::string & commonName)6645 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6646../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method'6647 213 | void countRpc(const std::string & method, const std::string & commonName)6648 | ^~~~~~6649../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName'6650 213 | void countRpc(const std::string & method, const std::string & commonName)6651 | ^~~~~~~~~~6652../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]6653 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6654 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6655../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName'6656 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6657 | ^~~~~~~~~~6658../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut'6659 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6660 | ^~~~~~~~6661../src/daemon/metrics.hh:218:27: note: 6662 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6663 | ^6664../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6665 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut)6666 | ^6667../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')6668../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]6669 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6670 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6671../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction'6672 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6673 | ^~~~~~~~~6674../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes'6675 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6676 | ^~~~~6677../src/daemon/metrics.hh:224:24: note: 6678 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6679 | ^6680../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values6681 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes)6682 | ^6683../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')6684../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]6685 17 | struct Niks3Config6686 | ^6687 18 | {6688 19 | std::string url;6689 | 6690 | {}6691 20 | std::string tokenFile; // bearer, optional6692 | 6693 | {}6694 21 | std::string clientCert; // mTLS, optional6695 | 6696 | {}6697 22 | std::string clientKey;6698 | 6699 | {}6700 23 | PushProcess::Argv pushArgv;6701 | 6702 | {}6703../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]6704 34 | std::string baseUrl;6705 | 6706 | {}6707 35 | std::shared_ptr<TokenFile> bearer;6708 | 6709 | {}6710 36 | std::string clientCert;6711 | 6712 | {}6713 37 | std::string clientKey;6714 | 6715 | {}6716 38 | 6717 39 | public:6718 40 | explicit Niks3Client(const Niks3Config & cfg)6719 | ^6720../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6721 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6722 | ^ ~~~~~6723 | static 6724../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]6725 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6726 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6727../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path'6728 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6729 | ^~~~6730../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body'6731 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6732 | ^~~~6733../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values6734 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr<http::Call>6735 | ^6736../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6737 60 | struct Identity6738 | ^6739 61 | {6740 62 | std::string subject; // "oidc:<provider>:<sub>"6741 | 6742 | {}6743 63 | std::optional<Role> role; // nullopt: verified but no rule matched6744 | 6745 | {}6746../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]6747 76 | } catch (...) {6748 | ^6749../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]6750 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6751 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6752../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name'6753 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6754 | ^~~~6755../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov'6756 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider6757 | ^~~~6758../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]6759 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6760 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6761../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims'6762 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6763 | ^~~~~~6764../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name'6765 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6766 | ^~~~6767../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values6768 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json *6769 | ^6770../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]6771 251 | struct Jwk6772 | ^6773 252 | {6774 253 | std::string kid;6775 | 6776 | {}6777 254 | std::string kty;6778 | 6779 | {}6780 255 | std::string crv;6781 | 6782 | {}6783 256 | std::string pem;6784 | 6785 | {}6786../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]6787 286 | if (jwk.kty == "RSA") {6788 | ^6789../src/daemon/oidc.hh:288:10: note: end of the original6790 288 | } else if (jwk.kty == "EC") {6791 | ^6792../src/daemon/oidc.hh:288:37: note: clone 1 starts here6793 288 | } else if (jwk.kty == "EC") {6794 | ^6795../src/daemon/oidc.hh:290:62: note: clone 2 starts here6796 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") {6797 | ^6798../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]6799 294 | } catch (...) {6800 | ^6801../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6802 300 | struct FixedClock6803 | ^6804 301 | {6805 302 | std::chrono::system_clock::time_point at;6806 | 6807 | {}6808../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6809 347 | struct Result6810 | ^6811 348 | {6812 349 | std::optional<Identity> identity;6813 | 6814 | {}6815 350 | std::string error; // for logs, not for the client6816 | 6817 | {}6818../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6819 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss)6820 | ^6821../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6822 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6823 | ^6824 | static 6825../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]6826 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6827 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6828../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token'6829 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6830 | ^~~~~6831../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now'6832 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6833 | ^~~6834../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values6835 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result6836 | ^6837../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6838 377 | struct KeySet6839 | ^6840 378 | {6841 379 | std::mutex lock;6842 | 6843 | {}6844 380 | std::vector<Jwk> keys;6845 | 6846 | {}6847 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago".6848 382 | std::optional<std::chrono::steady_clock::time_point> fetched;6849 | 6850 | {}6851../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6852 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json6853 | ^ ~~~~~6854 | static 6855../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6856 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector<Jwk>6857 | ^ ~~~~~6858 | static 6859../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]6860 442 | std::optional<std::chrono::steady_clock::time_point> fetched,6861 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6862 443 | std::chrono::steady_clock::time_point now,6863 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6864../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched'6865 442 | std::optional<std::chrono::steady_clock::time_point> fetched,6866 | ^~~~~~~6867../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now'6868 443 | std::chrono::steady_clock::time_point now,6869 | ^~~6870../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6871 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6872 | ^6873 | static 6874../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]6875 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6876 | ^~~~~~~~~~~~~~~~~~~~~~6877 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6878 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6879../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token'6880 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token,6881 | ^~~~~6882../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now'6883 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6884 | ^~~6885../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values6886 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder6887 | ^6888../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6889 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6890 | ^6891 | static 6892../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]6893 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6894 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6895../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token'6896 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6897 | ^~~~~6898../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now'6899 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6900 | ^~~6901../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values6902 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result6903 | ^6904../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]6905 21 | struct Options6906 | ^6907 22 | {6908 23 | std::string listen = "0.0.0.0:50051";6909 24 | std::optional<std::chrono::seconds> idleTimeout;6910 | 6911 | {}6912 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket";6913 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket.6914 27 | std::string storeUri;6915 | 6916 | {}6917 28 | std::string tlsCert;6918 | 6919 | {}6920 29 | std::string tlsKey;6921 | 6922 | {}6923 30 | std::string clientCA;6924 | 6925 | {}6926 31 | std::string metricsListen;6927 | 6928 | {}6929 32 | std::string workerName;6930 | 6931 | {}6932 33 | LogLevel logLevel = LogLevel::info;6933 34 | Acl acl;6934 35 | xfcc::TrustedProxies proxies;6935 36 | std::string oidcConfig;6936 | 6937 | {}6938../src/daemon/push.hh:61:5: error: constructor does not initialize these fields: argv, state, writeMutex, reader [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6939 61 | explicit PushProcess(Argv argv)6940 | ^6941../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6942 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures6943 | ^6944 | static 6945../src/daemon/push.hh:86:19: error: 2 adjacent parameters of 'pushWait' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors]6946 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures6947 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6948../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths'6949 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures6950 | ^~~~~6951../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled'6952 86 | auto pushWait(const std::vector<std::string> & paths, const Cancelled & cancelled = never) -> Signatures6953 | ^~~~~~~~~6954../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6955 123 | struct Result6956 | ^6957 124 | {6958 125 | std::string status = "ok";6959 126 | std::string message;6960 | 6961 | {}6962 127 | Signatures signatures;6963 | 6964 | {}6965../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6966 130 | explicit Pending(size_t count)6967 | ^6968../src/daemon/push.hh:136:16: error: constructor does not initialize these fields: status, message, path, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]6969 136 | struct Ack6970 | ^6971 137 | {6972 138 | std::string status;6973 | 6974 | {}6975 139 | std::string message;6976 | 6977 | {}6978 140 | std::string path;6979 | 6980 | {}6981 141 | std::set<std::string> signatures;6982 | 6983 | {}6984../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6985 144 | auto ack(Ack msg) -> bool6986 | ^6987 | static 6988../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]6989 147 | if (msg.status != "ok") {6990 | ^6991../src/daemon/push.hh:150:14: note: end of the original6992 150 | } else if (!msg.signatures.empty()) {6993 | ^6994../src/daemon/push.hh:150:49: note: clone 1 starts here6995 150 | } else if (!msg.signatures.empty()) {6996 | ^6997../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]6998 162 | void fail(const std::string & message)6999 | ^7000 | static 7001../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7002 171 | auto wait(const Cancelled & cancelled) -> Result7003 | ^7004 | static 7005../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7006 184 | struct Inner7007 | ^7008 185 | {7009 186 | size_t left;7010 | 7011 | {}7012../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7013 193 | struct State7014 | ^7015 194 | {7016 195 | nix::Pid pid;7017 196 | std::shared_ptr<nix::AutoCloseFD> stdinFd;7018 | 7019 | {}7020../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7021 206 | void ensureChild(nix::Sync<State>::WriteLock & lck)7022 | ^7023 | static 7024../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7025 237 | void readAcks(int acksFd)7026 | ^7027 | static 7028../src/daemon/sched-reactor.hh:28:8: error: constructor does not initialize these fields: queue [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7029 28 | struct SendQueue7030 | ^7031 29 | {7032 30 | // About a minute of Expects at full rate. Beyond it the peer is stuck.7033 31 | static constexpr size_t limit = 1U << 16U;7034 32 | // Messages per Write.7035 33 | static constexpr int maxBatch = 1024;7036 34 | 7037 35 | // Leaf lock, may be taken inside Dispatcher::mutex.7038 36 | absl::Mutex mutex;7039 37 | std::deque<Msg> queue ABSL_GUARDED_BY(mutex);7040 | {}7041../src/daemon/sched-reactor.hh:58:5: error: constructor does not initialize these fields: sendq [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7042 58 | explicit SchedReactorBase(grpc::CallbackServerContext * ctx)7043 | ^7044../src/daemon/sched-reactor.hh:69:13: error: variable 'kick' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7045 69 | bool kick = false;7046 | ^7047 | const 7048../src/daemon/sched-reactor.hh:153:9: error: variable 'have' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7049 153 | bool have = false;7050 | ^7051 | const 7052../src/daemon/sched-reactor.hh:183:9: error: variable 'fin' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7053 183 | bool fin = false;7054 | ^7055 | const 7056../src/daemon/sched-reactor.hh:206:5: error: constructor does not initialize these fields: client [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7057 206 | ScheduleReactor(grpc::CallbackServerContext * ctx, Dispatcher & disp)7058 | ^7059../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]7060 226 | Dispatcher & disp;7061 | ^7062../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]7063 255 | Dispatcher & disp;7064 | ^7065../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7066 65 | class IndexedHeap7067 | ^7068 66 | {7069 67 | std::vector<std::pair<double, DrvId>> heap;7070 68 | std::vector<uint32_t> pos;7071 | 7072 | {}7073../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]7074 71 | void place(size_t idx, std::pair<double, DrvId> item)7075 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7076../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx'7077 71 | void place(size_t idx, std::pair<double, DrvId> item)7078 | ^~~7079../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item'7080 71 | void place(size_t idx, std::pair<double, DrvId> item)7081 | ^~~~7082../src/daemon/scheduler.hh:71:16: note: 7083 71 | void place(size_t idx, std::pair<double, DrvId> item)7084 | ^7085../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')7086 71 | void place(size_t idx, std::pair<double, DrvId> item)7087 | ^7088../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7089 77 | void siftUp(size_t idx)7090 | ^7091 | static 7092../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7093 91 | void siftDown(size_t idx)7094 | ^7095 | static 7096../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7097 94 | const size_t len = heap.size();7098 | ^ 7099 | = 07100../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]7101 131 | void set(DrvId drv, double key)7102 | ^~~~~~~~~~~~~~~~~~~~~7103../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv'7104 131 | void set(DrvId drv, double key)7105 | ^~~7106../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key'7107 131 | void set(DrvId drv, double key)7108 | ^~~7109../src/daemon/scheduler.hh:131:14: note: 7110 131 | void set(DrvId drv, double key)7111 | ^7112../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int')7113 131 | void set(DrvId drv, double key)7114 | ^7115../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7116 174 | class FreeIndex7117 | ^7118 175 | {7119 176 | public:7120 177 | static constexpr int32_t maxSlots = 63;7121 178 | 7122 179 | private:7123 180 | std::vector<int32_t> free; // may go negative (draining below running)7124 | 7125 | {}7126 181 | std::vector<uint32_t> pos;7127 | 7128 | {}7129 182 | std::vector<bool> tracked;7130 | 7131 | {}7132../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7133 191 | void check(WorkerId wid) const7134 | ^ ~~~~~7135 | static 7136../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]7137 221 | void set(WorkerId wid, int32_t val)7138 | ^~~~~~~~~~~~~~~~~~~~~~~~~7139../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid'7140 221 | void set(WorkerId wid, int32_t val)7141 | ^~~7142../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val'7143 221 | void set(WorkerId wid, int32_t val)7144 | ^~~7145../src/daemon/scheduler.hh:221:14: note: 7146 221 | void set(WorkerId wid, int32_t val)7147 | ^7148../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')7149 221 | void set(WorkerId wid, int32_t val)7150 | ^7151../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7152 272 | struct Assign7153 | ^7154 273 | {7155 274 | DrvId drv = 0;7156 275 | WorkerId worker = 0;7157 276 | uint64_t assignId = 0;7158 277 | std::vector<ClientId> clients;7159 | 7160 | {}7161../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]7162 280 | struct Entry7163 | ^7164 281 | {7165 282 | std::string drvPath;7166 | 7167 | {}7168 283 | std::vector<PathKey> inputs; // for locality only7169 | 7170 | {}7171 284 | std::string system;7172 | 7173 | {}7174 285 | std::vector<std::string> features; // required7175 | 7176 | {}7177 286 | std::vector<ClientId> followers;7178 | 7179 | {}7180../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]7181 293 | struct Worker7182 | ^7183 294 | {7184 295 | std::string addr;7185 | 7186 | {}7187 296 | std::vector<std::string> systems;7188 | 7189 | {}7190 297 | std::vector<std::string> features;7191 | 7192 | {}7193 298 | int32_t maxJobs = 0;7194 299 | bool up = false;7195 300 | bool draining = false;7196 301 | std::vector<DrvId> running;7197 | 7198 | {}7199../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]7200 307 | explicit Core(Config cfg = {})7201 | ^7202../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7203 317 | auto drvId(std::string_view path) -> DrvId7204 | ^7205 | static 7206../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]7207 323 | DrvId drv = 0;7208 | ^7209 | const 7210../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7211 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional<DrvId>7212 | ^ ~~~~~7213 | static 7214../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7215 344 | auto workerId(std::string_view addr) -> WorkerId7216 | ^7217 | static 7218../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7219 365 | [[nodiscard]] auto queued() const -> size_t7220 | ^ ~~~~~7221 | static 7222../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]7223 367 | size_t total = 0;7224 | ^7225 | const 7226../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]7227 385 | struct WantInfo7228 | ^7229 386 | {7230 387 | std::string_view drvPath;7231 | 7232 | {}7233 388 | std::vector<std::string_view> inputs;7234 | 7235 | {}7236 389 | std::string_view system;7237 | 7238 | {}7239 390 | std::vector<std::string> features;7240 | 7241 | {}7242../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7243 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult7244 | ^7245 | static 7246../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7247 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7248 | ^7249 | static 7250../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]7251 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7252 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7253../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client'7254 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7255 | ^~~~~~7256../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath'7257 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7258 | ^~~~~~~7259../src/daemon/scheduler.hh:429:17: note: 7260 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7261 | ^7262../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long')7263 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional<WorkerId>7264 | ^7265../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7266 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7267 | ^7268 | static 7269../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7270 463 | void clientGone(ClientId client, std::vector<std::pair<DrvId, WorkerId>> & revokes)7271 | ^7272 | /*unused*/7273../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7274 478 | struct HelloInfo7275 | ^7276 479 | {7277 480 | std::string_view addr;7278 | 7279 | {}7280 481 | std::vector<std::string> systems; // first is the native one7281 | 7282 | {}7283 482 | std::vector<std::string> features;7284 | 7285 | {}7286../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]7287 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7288 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7289../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid'7290 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7291 | ^~~7292../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath'7293 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7294 | ^~~~~~~7295../src/daemon/scheduler.hh:539:10: note: 7296 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7297 | ^7298../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int')7299 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7300 | ^7301../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]7302 539 | done(WorkerId wid, std::string_view drvPath, const std::vector<std::pair<std::string_view, uint64_t>> & outputs)7303 | ^7304 | /*unused*/7305../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7306 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool7307 | ^ ~~~~~7308 | static 7309../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7310 610 | struct StatsKey7311 | ^7312 611 | {7313 612 | std::string system;7314 | 7315 | {}7316 613 | std::string features; // sorted, comma-joined7317 | 7318 | {}7319../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7320 704 | void retire(DrvId drv)7321 | ^7322 | static 7323../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7324 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7325 | ^7326 | static 7327../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]7328 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7329 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7330../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path'7331 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7332 | ^~~~7333../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid'7334 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7335 | ^~~7336../src/daemon/scheduler.hh:716:26: note: 7337 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7338 | ^7339../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int'7340 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size)7341 | ^7342../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7343 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t7344 | ^ ~~~~~7345 | static 7346../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7347 784 | void refreshFree(WorkerId wid)7348 | ^7349 | static 7350../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7351 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional<WorkerId>7352 | ^ ~~~~~7353 | static 7354../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]7355 865 | return picked;7356 | ^7357../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7358 21 | struct Cached7359 | ^7360 22 | {7361 23 | std::string token;7362 | 7363 | {}7364../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7365 19 | nix::Sync<Cached> cached;7366 | 7367 | {}7368 20 | 7369 21 | static auto mtime(const struct stat & info) -> struct timespec7370 22 | {7371 23 | #ifdef __APPLE__7372 24 | return info.st_mtimespec;7373 25 | #else7374 26 | return info.st_mtim;7375 27 | #endif7376 28 | }7377 29 | 7378 30 | public:7379 31 | explicit TokenFile(std::string path_)7380 | ^7381../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7382 46 | auto get() -> std::string7383 | ^7384 | static 7385../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7386 29 | std::string_view rest;7387 | 7388 | {}7389 30 | 7390 31 | public:7391 32 | explicit Cursor(std::string_view input)7392 | ^7393../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7394 47 | auto take() -> char7395 | ^7396 | static 7397../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7398 52 | char const chr = rest.front();7399 | ^ 7400 | = 07401../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7402 58 | auto until(std::string_view stops) -> std::optional<std::string_view>7403 | ^7404 | static 7405../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7406 69 | auto remaining() -> std::string_view7407 | ^7408 | static 7409../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]7410 150 | inline auto subjectCommonName(std::string_view value) -> std::optional<std::string>7411 | ^7412../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]7413 192 | class TrustedProxies7414 | ^7415 193 | {7416 194 | std::vector<std::string> patterns;7417 | 7418 | {}7419../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7420 197 | void add(std::string_view pattern)7421 | ^7422 | static 7423../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7424 210 | [[nodiscard]] auto matches(const std::optional<std::string> & peerCommonName) const -> bool7425 | ^ ~~~~~7426 | static 7427../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7428 81 | void header(const std::string & line)7429 | ^7430 | static 7431../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]7432 65 | Call(std::string url_, const std::string & bearer, const std::optional<nlohmann::json> & body)7433 | ^7434../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7435 129 | auto perform() -> long7436 | ^7437 | static 7438../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors]7439 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds7440 | ^ ~~~~~7441 | static 7442../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]7443 23 | inline auto logfmtValue(std::string_view value) -> std::string7444 | ^7445../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]7446 52 | enum class LogLevel : std::uint8_t { info, debug };7447 | ^7448../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors]7449 293 | bool dynamic = false;7450 | ^7451 | const 7452../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]7453 296 | nix::StorePathSet srcs;7454 | ^ 7455 | = 07456FAILED: [code=1] meson-internal__clang-tidy 7457/nix/store/jaa89dphx07w3r26y7gh79a7b1mld5p4-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always7458ninja: build stopped: subcommand failed.