tribuchet: building on jamie Running phase: unpackPhase unpacking source archive /nix/store/3kkwqmd1mcjxg12w5kgfdw4dqsmrxsa0-source source root is source Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase mesonConfigurePhase 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=false The Meson build system Version: 1.10.2 Source dir: /build/source Build dir: /build/source/build Build type: native build WARNING: Project does not target a minimum version but uses feature introduced in '1.1': meson.options file. Use meson_options.txt instead Project name: nix-grpc-store Project version: 0.1.0-beta.1 C++ compiler for the host machine: clang++ (clang 22.1.8 "clang version 22.1.8") C++ linker for the host machine: clang++ ld.bfd 2.46 Host machine cpu family: x86_64 Host machine cpu: x86_64 Found pkg-config: YES (/nix/store/29d1c5xk6w3rwl7yvdfwl90whslv5h54-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2 Run-time dependency grpc++ found: YES 1.83.0 Run-time dependency protobuf found: YES 36.1.0 Run-time dependency libzstd found: YES 1.5.7 Run-time dependency threads found: YES Run-time dependency libcrypto found: YES 3.6.4 Run-time dependency prometheus-cpp-core found: YES 1.3.0 Run-time dependency prometheus-cpp-pull found: YES 1.3.0 Run-time dependency absl_flat_hash_map found: YES 20260107 Run-time dependency absl_hash found: YES 20260107 Run-time dependency absl_synchronization found: YES 20260107 Compiler for C++ supports arguments -Werror=thread-safety: YES Run-time dependency jemalloc found: YES 5.3.1_0 Run-time dependency nix-store found: YES 2.36.0pre20260920_5711f8fe Run-time dependency nix-util found: YES 2.36.0pre20260920_5711f8fe Run-time dependency libcurl found: YES 8.22.0 Run-time dependency nlohmann_json found: YES 3.12.0 Check usable header "jwt-cpp/traits/nlohmann-json/defaults.h" : YES Program protoc found: YES (/nix/store/4hdzvycn5mkg3xm1ggscp3mxz8005c3m-protobuf-36.1/bin/protoc) Program grpc_cpp_plugin found: YES (/nix/store/n81x7qakspm4bnm9q8cjdgjvvx6h691v-grpc-1.83.0/bin/grpc_cpp_plugin) Program mold found: YES (/nix/store/vfvfq1k7436b6sidk1246m72j6944kv7-mold-unwrapped-wrapper-2.42.1/bin/mold) Run-time dependency dl found: YES Program tests/farm-client-test.sh found: YES (/build/source/tests/farm-client-test.sh) Program tests/oidc-test.sh found: YES (/build/source/tests/oidc-test.sh) Build targets in project: 11 WARNING: Project specifies no minimum version but uses features which were added in versions: * 1.1: {'meson.options file'} nix-grpc-store 0.1.0-beta.1 User defined options auto_features: enabled b_pch : false bindir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/bin buildtype : plain includedir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/include infodir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/info 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 localedir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/locale mandir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/share/man prefix : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1 sbindir : /nix/store/m5g1qc4aqq6gsans1lpvlgn09q4w271z-nix-grpc-store-clang-tidy-0.1.0-beta.1/sbin wrap_mode : nodownload Found ninja-1.13.2 at /nix/store/r8a159fqvj0mpczq0dq8d3dwdd2rsz8c-ninja-1.13.2/bin/ninja mesonConfigurePhase: enabled\ parallel\ building Running phase: buildPhase [1/1] Generating nix_remote_proto with a custom command [0/1] /nix/store/jaa89dphx07w3r26y7gh79a7b1mld5p4-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/plugin-loader.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/client/plugin-loader.cc. ../src/client/plugin-loader.cc:10:10: error: 'cstdio' file not found [clang-diagnostic-error] 10 | #include | ^~~~~~~~ ../src/client/plugin-loader.cc:107:19: error: variable 'override' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 107 | if (const char *override = std::getenv("NIX_GRPC_PLUGIN_OVERRIDE")) { | ^ 108 | plugin = override; | | = nullptr >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/farm-client-test.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/farm-client-test.cc. ../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 40 | std::optional remote; | | {} 41 | 42 | public: 43 | explicit Cache(const Niks3Config & cfg) | ^ ../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 61 | [[nodiscard]] auto present(const std::vector & keys) -> std::unordered_set | ^ | static ../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^ | static ../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] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~ ../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~ ../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] 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~ ../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~ ../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const | ^ ~~~~~ | static ../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] 17 | struct Niks3Config | ^ 18 | { 19 | std::string url; | | {} 20 | std::string tokenFile; // bearer, optional | | {} 21 | std::string clientCert; // mTLS, optional | | {} 22 | std::string clientKey; | | {} 23 | PushProcess::Argv pushArgv; | | {} ../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] 34 | std::string baseUrl; | | {} 35 | std::shared_ptr bearer; | | {} 36 | std::string clientCert; | | {} 37 | std::string clientKey; | | {} 38 | 39 | public: 40 | explicit Niks3Client(const Niks3Config & cfg) | ^ ../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ~~~~~ | static ../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] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ../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] 61 | explicit PushProcess(Argv argv) | ^ ../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^ | static ../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] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~ ../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~ ../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 123 | struct Result | ^ 124 | { 125 | std::string status = "ok"; 126 | std::string message; | | {} 127 | Signatures signatures; | | {} ../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 130 | explicit Pending(size_t count) | ^ ../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] 136 | struct Ack | ^ 137 | { 138 | std::string status; | | {} 139 | std::string message; | | {} 140 | std::string path; | | {} 141 | std::set signatures; | | {} ../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 144 | auto ack(Ack msg) -> bool | ^ | static ../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 147 | if (msg.status != "ok") { | ^ ../src/daemon/push.hh:150:14: note: end of the original 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:150:49: note: clone 1 starts here 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 162 | void fail(const std::string & message) | ^ | static ../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 171 | auto wait(const Cancelled & cancelled) -> Result | ^ | static ../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 184 | struct Inner | ^ 185 | { 186 | size_t left; | | {} ../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 193 | struct State | ^ 194 | { 195 | nix::Pid pid; 196 | std::shared_ptr stdinFd; | | {} ../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 206 | void ensureChild(nix::Sync::WriteLock & lck) | ^ | static ../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 237 | void readAcks(int acksFd) | ^ | static ../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | struct Cached | ^ 22 | { 23 | std::string token; | | {} ../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | nix::Sync cached; | | {} 20 | 21 | static auto mtime(const struct stat & info) -> struct timespec 22 | { 23 | #ifdef __APPLE__ 24 | return info.st_mtimespec; 25 | #else 26 | return info.st_mtim; 27 | #endif 28 | } 29 | 30 | public: 31 | explicit TokenFile(std::string path_) | ^ ../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 46 | auto get() -> std::string | ^ | static ../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] 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/http.hh:71:45: note: the first parameter in the range is 'size' 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t | ^~~~ ../src/http.hh:71:58: note: the last parameter in the range is 'nmemb' 71 | static auto collect(char * data, size_t size, size_t nmemb, void * userp) noexcept -> size_t | ^~~~~ ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../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] 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/nix-compat.hh:72:49: note: the first parameter in the range is 'major' 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~ ../src/nix-compat.hh:72:64: note: the last parameter in the range is 'minor' 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~ ../src/nix-compat.hh:72:56: note: 'unsigned int' and 'int' may be implicitly converted 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^ ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../tests/farm-client-test.cc:3:10: error: 'chrono' file not found [clang-diagnostic-error] 3 | #include | ^~~~~~~~ ../tests/farm-client-test.cc:17:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors] 17 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | ../tests/farm-client-test.cc:23:1: error: included header niks3-client.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 23 | #include "niks3-client.hh" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | #include "http.hh" ../tests/farm-client-test.cc:37:5: error: constructor does not initialize these fields: base [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 33 | std::string base; | | {} 34 | int failures = 0; 35 | 36 | public: 37 | explicit Suite(std::string base) | ^ ../tests/farm-client-test.cc:53:24: error: method 'log' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto log() const -> nlohmann::json | ^ ~~~~~ | static ../tests/farm-client-test.cc:62:9: error: variable 'found' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 62 | int found = 0; | ^ | const ../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] 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../tests/farm-client-test.cc:148:49: note: the first parameter in the range is 'base' 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock) | ^~~~ ../tests/farm-client-test.cc:148:75: note: the last parameter in the range is 'mock' 148 | void testCache(Suite & tst, const std::string & base, const std::string & mock) | ^~~~ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/scheduler-test.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/scheduler-test.cc. ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../tests/scheduler-test.cc:3:10: error: 'algorithm' file not found [clang-diagnostic-error] 3 | #include | ^~~~~~~~~~~ ../tests/scheduler-test.cc:46:20: error: variable 'minKey' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 3 | double minKey = ref.begin()->second; | ^ | = NAN ../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] 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../tests/scheduler-test.cc:75:43: note: the first parameter in the range is 'addr' 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^~~~ ../tests/scheduler-test.cc:75:141: note: the last parameter in the range is 'features' 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^~~~~~~~ ../tests/scheduler-test.cc:75:26: note: 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^ ../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' 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^ ../tests/scheduler-test.cc:75:64: note: 'int' and 'const int &' parameters accept and bind the same kind of values 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^ ../tests/scheduler-test.cc:75:49: note: 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^ ../tests/scheduler-test.cc:75:64: note: 'uint32_t' and 'const int &' parameters accept and bind the same kind of values 75 | auto hello(Core & shard, std::string_view addr, uint32_t jobs, const std::vector & running = {}, std::vector features = {}, std::vector * superseded = nullptr) -> WorkerId | ^ ../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') ../tests/scheduler-test.cc:88:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 88 | Core shard; | ^ | const ../tests/scheduler-test.cc:106:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 106 | Core shard; | ^ | const ../tests/scheduler-test.cc:123:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 123 | Core shard; | ^ | const ../tests/scheduler-test.cc:157:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 157 | Core shard; | ^ | const ../tests/scheduler-test.cc:177:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 177 | Core shard; | ^ | const ../tests/scheduler-test.cc:199:5: error: variable 'shard' of type 'Core' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 199 | Core shard; | ^ | const ../tests/scheduler-test.cc:291:5: error: variable 'onBoth' of type 'int' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 291 | int onBoth = 0; | ^ | const ../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] 335 | auto main() -> int | ^ ../src/daemon/scheduler.hh:134:13: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'set' here 134 | throw nix::Error("IndexedHeap: id out of range"); | ^ ../tests/scheduler-test.cc:35:13: note: frame #1: function 'testHeapAgainstMap' calls function 'set' here 35 | heap.set(id, key); | ^ ../tests/scheduler-test.cc:337:5: note: frame #2: function 'main' calls function 'testHeapAgainstMap' here 337 | testHeapAgainstMap(); | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/xfcc-test.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/xfcc-test.cc. ../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 29 | std::string_view rest; | | {} 30 | 31 | public: 32 | explicit Cursor(std::string_view input) | ^ ../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 47 | auto take() -> char | ^ | static ../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 52 | char const chr = rest.front(); | ^ | = 0 ../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 58 | auto until(std::string_view stops) -> std::optional | ^ | static ../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 69 | auto remaining() -> std::string_view | ^ | static ../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] 150 | inline auto subjectCommonName(std::string_view value) -> std::optional | ^ ../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 197 | void add(std::string_view pattern) | ^ | static ../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | [[nodiscard]] auto matches(const std::optional & peerCommonName) const -> bool | ^ ~~~~~ | static ../tests/xfcc-test.cc:1:10: error: 'cassert' file not found [clang-diagnostic-error] 1 | #include | ^~~~~~~~~ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/elector.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/elector.cc. ../src/daemon/elector.cc:16:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors] 16 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17 | #include ../src/daemon/elector.cc:17:1: error: included header json.hpp is not used directly [misc-include-cleaner,-warnings-as-errors] 17 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | ../src/daemon/elector.cc:19:1: error: included header http.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 19 | #include "http.hh" | ^~~~~~~~~~~~~~~~~~ 20 | #include "logfmt.hh" ../src/daemon/elector.cc:30:8: error: constructor does not initialize these fields: stop, lead, buf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 30 | struct Reader | ^ 31 | { 32 | std::stop_token stop; | | {} 33 | std::function lead; | | {} 34 | std::string buf; | | {} ../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] 43 | for (size_t eol = 0; (eol = reader.buf.find('\n')) != std::string::npos;) { | ^ | const ../src/daemon/elector.cc:63:1: error: constructor does not initialize these fields: onChange, thread [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 63 | Elector::Elector(const Niks3Client & niks3_, std::function onChange_) | ^ ../src/daemon/elector.cc:70:10: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 70 | Elector::~Elector() | ^ /build/source/build/../src/daemon/elector.hh:6:10: error: 'chrono' file not found [clang-diagnostic-error] 6 | #include | ^~~~~~~~ ../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] 17 | struct Niks3Config | ^ 18 | { 19 | std::string url; | | {} 20 | std::string tokenFile; // bearer, optional | | {} 21 | std::string clientCert; // mTLS, optional | | {} 22 | std::string clientKey; | | {} 23 | PushProcess::Argv pushArgv; | | {} ../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] 34 | std::string baseUrl; | | {} 35 | std::shared_ptr bearer; | | {} 36 | std::string clientCert; | | {} 37 | std::string clientKey; | | {} 38 | 39 | public: 40 | explicit Niks3Client(const Niks3Config & cfg) | ^ ../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ~~~~~ | static ../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] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ../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] 61 | explicit PushProcess(Argv argv) | ^ ../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^ | static ../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] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~ ../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~ ../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 123 | struct Result | ^ 124 | { 125 | std::string status = "ok"; 126 | std::string message; | | {} 127 | Signatures signatures; | | {} ../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 130 | explicit Pending(size_t count) | ^ ../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] 136 | struct Ack | ^ 137 | { 138 | std::string status; | | {} 139 | std::string message; | | {} 140 | std::string path; | | {} 141 | std::set signatures; | | {} ../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 144 | auto ack(Ack msg) -> bool | ^ | static ../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 147 | if (msg.status != "ok") { | ^ ../src/daemon/push.hh:150:14: note: end of the original 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:150:49: note: clone 1 starts here 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 162 | void fail(const std::string & message) | ^ | static ../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 171 | auto wait(const Cancelled & cancelled) -> Result | ^ | static ../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 184 | struct Inner | ^ 185 | { 186 | size_t left; | | {} ../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 193 | struct State | ^ 194 | { 195 | nix::Pid pid; 196 | std::shared_ptr stdinFd; | | {} ../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 206 | void ensureChild(nix::Sync::WriteLock & lck) | ^ | static ../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 237 | void readAcks(int acksFd) | ^ | static ../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | struct Cached | ^ 22 | { 23 | std::string token; | | {} ../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | nix::Sync cached; | | {} 20 | 21 | static auto mtime(const struct stat & info) -> struct timespec 22 | { 23 | #ifdef __APPLE__ 24 | return info.st_mtimespec; 25 | #else 26 | return info.st_mtim; 27 | #endif 28 | } 29 | 30 | public: 31 | explicit TokenFile(std::string path_) | ^ ../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 46 | auto get() -> std::string | ^ | static ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/options.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/options.cc. ../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] 22 | enum class Role : std::uint8_t { | ^ ../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 51 | class Acl | ^ 52 | { 53 | struct Rule 54 | { 55 | std::string pattern; 56 | Role role; 57 | }; 58 | 59 | std::vector rules; | | {} 60 | // Separate from the glob rules so '*' cannot grant anonymous access. 61 | std::optional anonRole; | | {} ../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Rule | ^ 54 | { 55 | std::string pattern; | | {} ../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 70 | void addRule(std::string_view spec) | ^ | static ../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | [[nodiscard]] auto roleFor(const std::optional & commonName) const -> std::optional | ^ ~~~~~ | static ../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] 17 | struct Niks3Config | ^ 18 | { 19 | std::string url; | | {} 20 | std::string tokenFile; // bearer, optional | | {} 21 | std::string clientCert; // mTLS, optional | | {} 22 | std::string clientKey; | | {} 23 | PushProcess::Argv pushArgv; | | {} ../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] 34 | std::string baseUrl; | | {} 35 | std::shared_ptr bearer; | | {} 36 | std::string clientCert; | | {} 37 | std::string clientKey; | | {} 38 | 39 | public: 40 | explicit Niks3Client(const Niks3Config & cfg) | ^ ../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ~~~~~ | static ../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] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ../src/daemon/options.cc:4:1: error: included header nix-compat.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 4 | #include "nix-compat.hh" | ^~~~~~~~~~~~~~~~~~~~~~~~ 5 | ../src/daemon/options.cc:21:1: error: included header server_credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors] 21 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | #include ../src/daemon/options.cc:23:1: error: included header tls_credentials_options.h is not used directly [misc-include-cleaner,-warnings-as-errors] 23 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | ../src/daemon/options.cc:26:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 26 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | #include ../src/daemon/options.cc:27:1: error: included header strings.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | #include ../src/daemon/options.cc:29:1: error: included header environment-variables.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 29 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 30 | ../src/daemon/options.cc:31:1: error: included header acl.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 31 | #include "acl.hh" | ^~~~~~~~~~~~~~~~~ 32 | #include "logfmt.hh" ../src/daemon/options.cc:36:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 36 | #include "xfcc.hh" | ^~~~~~~~~~~~~~~~~~ 37 | ../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] 41 | auto parseLogLevel(std::string_view value) -> LogLevel | ^ ../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] 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/options.cc:65:59: note: the first parameter in the range is 'tlsCert' 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey) | ^~~~~~~ ../src/daemon/options.cc:65:88: note: the last parameter in the range is 'tlsKey' 65 | void finishNiks3(Niks3Config & niks3, const std::string & tlsCert, const std::string & tlsKey) | ^~~~~~ ../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] 92 | auto parseOptions(const std::vector & args) -> Options | ^ | static ../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] 227 | auto makeServerCredentials(const Options & options) -> std::shared_ptr | ^ | static ../src/daemon/options.hh:4:10: error: 'chrono' file not found [clang-diagnostic-error] 4 | #include | ^~~~~~~~ ../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] 61 | explicit PushProcess(Argv argv) | ^ ../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^ | static ../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] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~ ../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~ ../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 123 | struct Result | ^ 124 | { 125 | std::string status = "ok"; 126 | std::string message; | | {} 127 | Signatures signatures; | | {} ../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 130 | explicit Pending(size_t count) | ^ ../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] 136 | struct Ack | ^ 137 | { 138 | std::string status; | | {} 139 | std::string message; | | {} 140 | std::string path; | | {} 141 | std::set signatures; | | {} ../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 144 | auto ack(Ack msg) -> bool | ^ | static ../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 147 | if (msg.status != "ok") { | ^ ../src/daemon/push.hh:150:14: note: end of the original 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:150:49: note: clone 1 starts here 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 162 | void fail(const std::string & message) | ^ | static ../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 171 | auto wait(const Cancelled & cancelled) -> Result | ^ | static ../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 184 | struct Inner | ^ 185 | { 186 | size_t left; | | {} ../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 193 | struct State | ^ 194 | { 195 | nix::Pid pid; 196 | std::shared_ptr stdinFd; | | {} ../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 206 | void ensureChild(nix::Sync::WriteLock & lck) | ^ | static ../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 237 | void readAcks(int acksFd) | ^ | static ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | struct Cached | ^ 22 | { 23 | std::string token; | | {} ../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | nix::Sync cached; | | {} 20 | 21 | static auto mtime(const struct stat & info) -> struct timespec 22 | { 23 | #ifdef __APPLE__ 24 | return info.st_mtimespec; 25 | #else 26 | return info.st_mtim; 27 | #endif 28 | } 29 | 30 | public: 31 | explicit TokenFile(std::string path_) | ^ ../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 46 | auto get() -> std::string | ^ | static ../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 29 | std::string_view rest; | | {} 30 | 31 | public: 32 | explicit Cursor(std::string_view input) | ^ ../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 47 | auto take() -> char | ^ | static ../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 52 | char const chr = rest.front(); | ^ | = 0 ../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 58 | auto until(std::string_view stops) -> std::optional | ^ | static ../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 69 | auto remaining() -> std::string_view | ^ | static ../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] 150 | inline auto subjectCommonName(std::string_view value) -> std::optional | ^ ../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 192 | class TrustedProxies | ^ 193 | { 194 | std::vector patterns; | | {} ../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 197 | void add(std::string_view pattern) | ^ | static ../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | [[nodiscard]] auto matches(const std::optional & peerCommonName) const -> bool | ^ ~~~~~ | static ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/auth.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/auth.cc. ../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] 22 | enum class Role : std::uint8_t { | ^ ../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 51 | class Acl | ^ 52 | { 53 | struct Rule 54 | { 55 | std::string pattern; 56 | Role role; 57 | }; 58 | 59 | std::vector rules; | | {} 60 | // Separate from the glob rules so '*' cannot grant anonymous access. 61 | std::optional anonRole; | | {} ../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Rule | ^ 54 | { 55 | std::string pattern; | | {} ../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 70 | void addRule(std::string_view spec) | ^ | static ../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | [[nodiscard]] auto roleFor(const std::optional & commonName) const -> std::optional | ^ ~~~~~ | static ../src/daemon/auth.cc:17:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 17 | #include "oidc.hh" | ^~~~~~~~~~~~~~~~~~ 18 | #include "xfcc.hh" ../src/daemon/auth.cc:18:1: error: included header xfcc.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 18 | #include "xfcc.hh" | ^~~~~~~~~~~~~~~~~~ 19 | ../src/daemon/auth.cc:25:12: error: method 'identify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 25 | auto Auth::identify(const grpc::ServerContextBase & context) const -> Caller | ^ ~~~~~ ../src/daemon/auth.cc:50:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 50 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole) -> grpc::Status | ^ | static ../src/daemon/auth.cc:78:12: error: method 'authorize' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 78 | auto Auth::authorize(const Caller & caller, std::string_view method, Role minRole, uint32_t buildMode) -> grpc::Status | ^ | static /build/source/build/../src/daemon/auth.hh:5:10: error: 'cstdint' file not found [clang-diagnostic-error] 5 | #include | ^~~~~~~~~ /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] 19 | struct Caller | ^ 20 | { 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; 22 | std::string name = "-"; // cert CN or oidc::, for logs and metrics 23 | std::optional role; | | {} /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] 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; | ^ ../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 60 | struct Identity | ^ 61 | { 62 | std::string subject; // "oidc::" | | {} 63 | std::optional role; // nullopt: verified but no rule matched | | {} ../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] 76 | } catch (...) { | ^ ../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] 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../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] 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~ ../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~ ../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^ ../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] 251 | struct Jwk | ^ 252 | { 253 | std::string kid; | | {} 254 | std::string kty; | | {} 255 | std::string crv; | | {} 256 | std::string pem; | | {} ../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 286 | if (jwk.kty == "RSA") { | ^ ../src/daemon/oidc.hh:288:10: note: end of the original 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:288:37: note: clone 1 starts here 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:290:62: note: clone 2 starts here 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") { | ^ ../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] 294 | } catch (...) { | ^ ../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 300 | struct FixedClock | ^ 301 | { 302 | std::chrono::system_clock::time_point at; | | {} ../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 347 | struct Result | ^ 348 | { 349 | std::optional identity; | | {} 350 | std::string error; // for logs, not for the client | | {} ../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss) | ^ ../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ | static ../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] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~ ../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~ ../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ ../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 377 | struct KeySet | ^ 378 | { 379 | std::mutex lock; | | {} 380 | std::vector keys; | | {} 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago". 382 | std::optional fetched; | | {} ../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json | ^ ~~~~~ | static ../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector | ^ ~~~~~ | static ../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] 442 | std::optional fetched, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 443 | std::chrono::steady_clock::time_point now, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched' 442 | std::optional fetched, | ^~~~~~~ ../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now' 443 | std::chrono::steady_clock::time_point now, | ^~~ ../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^ | static ../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] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~~~~~~~~~~~~~~~~~~ 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token' 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~ ../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now' 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^~~ ../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^ ../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ | static ../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] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~ ../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~ ../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ ../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 29 | std::string_view rest; | | {} 30 | 31 | public: 32 | explicit Cursor(std::string_view input) | ^ ../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 47 | auto take() -> char | ^ | static ../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 52 | char const chr = rest.front(); | ^ | = 0 ../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 58 | auto until(std::string_view stops) -> std::optional | ^ | static ../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 69 | auto remaining() -> std::string_view | ^ | static ../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] 150 | inline auto subjectCommonName(std::string_view value) -> std::optional | ^ ../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 192 | class TrustedProxies | ^ 193 | { 194 | std::vector patterns; | | {} ../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 197 | void add(std::string_view pattern) | ^ | static ../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | [[nodiscard]] auto matches(const std::optional & peerCommonName) const -> bool | ^ ~~~~~ | static ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/oidc-test.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/oidc-test.cc. ../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] 22 | enum class Role : std::uint8_t { | ^ ../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 51 | class Acl | ^ 52 | { 53 | struct Rule 54 | { 55 | std::string pattern; 56 | Role role; 57 | }; 58 | 59 | std::vector rules; | | {} 60 | // Separate from the glob rules so '*' cannot grant anonymous access. 61 | std::optional anonRole; | | {} ../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Rule | ^ 54 | { 55 | std::string pattern; | | {} ../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 70 | void addRule(std::string_view spec) | ^ | static ../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | [[nodiscard]] auto roleFor(const std::optional & commonName) const -> std::optional | ^ ~~~~~ | static ../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 60 | struct Identity | ^ 61 | { 62 | std::string subject; // "oidc::" | | {} 63 | std::optional role; // nullopt: verified but no rule matched | | {} ../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] 76 | } catch (...) { | ^ ../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] 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../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] 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~ ../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~ ../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^ ../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] 251 | struct Jwk | ^ 252 | { 253 | std::string kid; | | {} 254 | std::string kty; | | {} 255 | std::string crv; | | {} 256 | std::string pem; | | {} ../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 286 | if (jwk.kty == "RSA") { | ^ ../src/daemon/oidc.hh:288:10: note: end of the original 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:288:37: note: clone 1 starts here 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:290:62: note: clone 2 starts here 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") { | ^ ../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] 294 | } catch (...) { | ^ ../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 300 | struct FixedClock | ^ 301 | { 302 | std::chrono::system_clock::time_point at; | | {} ../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 347 | struct Result | ^ 348 | { 349 | std::optional identity; | | {} 350 | std::string error; // for logs, not for the client | | {} ../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss) | ^ ../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ | static ../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] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~ ../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~ ../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ ../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 377 | struct KeySet | ^ 378 | { 379 | std::mutex lock; | | {} 380 | std::vector keys; | | {} 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago". 382 | std::optional fetched; | | {} ../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json | ^ ~~~~~ | static ../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector | ^ ~~~~~ | static ../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] 442 | std::optional fetched, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 443 | std::chrono::steady_clock::time_point now, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched' 442 | std::optional fetched, | ^~~~~~~ ../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now' 443 | std::chrono::steady_clock::time_point now, | ^~~ ../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^ | static ../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] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~~~~~~~~~~~~~~~~~~ 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token' 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~ ../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now' 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^~~ ../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^ ../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ | static ../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] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~ ../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~ ../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../tests/oidc-test.cc:4:10: error: 'chrono' file not found [clang-diagnostic-error] 4 | #include | ^~~~~~~~ ../tests/oidc-test.cc:25:1: error: included header json_fwd.hpp is not used directly [misc-include-cleaner,-warnings-as-errors] 25 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | ../tests/oidc-test.cc:27:1: error: included header base-n.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | #include ../tests/oidc-test.cc:84:12: 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] 84 | enum class Kind : std::uint8_t { ec, rsa, pss, ed }; | ^ ../tests/oidc-test.cc:86:8: error: constructor does not initialize these fields: pkey, kind, alg, kid [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 86 | struct Key | ^ 87 | { 88 | std::shared_ptr pkey; | | {} 89 | Kind kind; 90 | std::string alg; | | {} 91 | std::string kid; | | {} ../tests/oidc-test.cc:95:9: error: pointee of variable 'raw' of type 'EVP_PKEY *' (aka 'struct evp_pkey_st *') can be declared 'const' [misc-const-correctness,-warnings-as-errors] 95 | EVP_PKEY * raw = nullptr; | ^ | const ../tests/oidc-test.cc:131:20: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 131 | size_t len = pub.size(); | ^ | = 0 ../tests/oidc-test.cc:160:29: error: 2 adjacent parameters of 'sign' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 160 | [[nodiscard]] auto sign(const Json & claims, const std::string & headerAlg = "") const -> std::string | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../tests/oidc-test.cc:160:42: note: the first parameter in the range is 'claims' 160 | [[nodiscard]] auto sign(const Json & claims, const std::string & headerAlg = "") const -> std::string | ^~~~~~ ../tests/oidc-test.cc:160:70: note: the last parameter in the range is 'headerAlg' 160 | [[nodiscard]] auto sign(const Json & claims, const std::string & headerAlg = "") const -> std::string | ^~~~~~~~~ ../tests/oidc-test.cc:210:18: error: 2 adjacent parameters of 'writeConfig' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 210 | auto writeConfig(const std::string & dir, const std::string & base) -> void | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../tests/oidc-test.cc:210:38: note: the first parameter in the range is 'dir' 210 | auto writeConfig(const std::string & dir, const std::string & base) -> void | ^~~ ../tests/oidc-test.cc:210:63: note: the last parameter in the range is 'base' 210 | auto writeConfig(const std::string & dir, const std::string & base) -> void | ^~~~ ../tests/oidc-test.cc:233:10: error: 2 adjacent parameters of 'run' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 233 | auto run(const std::string & dir, const std::string & base) -> int | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../tests/oidc-test.cc:233:30: note: the first parameter in the range is 'dir' 233 | auto run(const std::string & dir, const std::string & base) -> int | ^~~ ../tests/oidc-test.cc:233:55: note: the last parameter in the range is 'base' 233 | auto run(const std::string & dir, const std::string & base) -> int | ^~~~ ../tests/oidc-test.cc:235:5: error: variable 'check' of type 'Checks' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 235 | Checks check; | ^ | const ../tests/oidc-test.cc:266:60: error: '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses,-warnings-as-errors] 266 | check(!Verifier::fetchDue(justBooted, justBooted + onMiss * 2, true, onMiss), "known kid uses cached keys"); | ^~~~~~~~~~~ | ( ) ../tests/oidc-test.cc:365:29: error: parameter 'argv' is unused [misc-unused-parameters,-warnings-as-errors] 365 | auto main(int argc, char ** argv) -> int | ^~~~ | /*argv*/ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/channel.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found [1/1] (1/2) Processing file /build/source/src/client/channel.cc. Error while processing /build/source/src/client/channel.cc. [1/1] (2/2) Processing file /build/source/src/client/channel.cc. Error while processing /build/source/src/client/channel.cc. ../src/client/channel.cc:16:1: error: included header bio.h is not used directly [misc-include-cleaner,-warnings-as-errors] 16 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~ 17 | #include ../src/client/channel.cc:18:1: error: included header pem.h is not used directly [misc-include-cleaner,-warnings-as-errors] 18 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~ 19 | #include ../src/client/channel.cc:24:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 24 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 | ../src/client/channel.cc:41:6: error: function 'readValidCert' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 41 | auto readValidCert(const std::string &path) -> std::string { | ^ | static ../src/client/channel.cc:64:6: error: function 'defaultCaCert' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 64 | auto defaultCaCert() -> std::string { | ^ | static ../src/client/channel.cc:76:6: error: function 'defaultClientCred' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 76 | auto defaultClientCred(const char *envVar, const std::string &fileName) -> std::string { | ^ | static ../src/client/channel.cc:81:53: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 81 | if (auto dataHome = nix::getEnv("XDG_DATA_HOME")) { | ^ ../src/client/channel.cc:83:4: note: end of the original 83 | } else if (auto home = nix::getEnv("HOME")) { | ^ ../src/client/channel.cc:83:47: note: clone 1 starts here 83 | } else if (auto home = nix::getEnv("HOME")) { | ^ ../src/client/channel.hh:5:10: error: 'exception' file not found [clang-diagnostic-error] 5 | #include | ^~~~~~~~~~~ ../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 46 | explicit StaticHeaders(std::shared_ptr headers) : headers(std::move(headers)) {} | ^ ../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 62 | explicit Factory(Headers hdrs) : headers(std::make_shared(std::move(hdrs))) {} | ^ 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/) 64 | -> grpc::experimental::Interceptor * override { 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it 66 | } 67 | private: 68 | std::shared_ptr headers; | | {} ../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 77 | std::string path; | | {} 78 | 79 | public: 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {} | ^ ../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/, | ^ | static ../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors] 87 | std::multimap * metadata) -> grpc::Status override { | ^ | const ../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] 95 | } catch (std::exception & err) { | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/dispatcher-bench.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/dispatcher-bench.cc. ../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 45 | struct Config | ^ 46 | { 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system | | {} 48 | PresentFn present; // unset: nothing is ever Cached | | {} ../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 64 | struct Client | ^ 65 | { 66 | sched::ClientId id = 0; 67 | ClientSend send; | | {} ../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Worker | ^ 81 | { 82 | WorkerSend send; | | {} 83 | std::optional id; | | {} ../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex & | ^ | [[nodiscard]] /nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED' 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) | ^ ../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 71 | std::string method; | | {} 72 | prometheus::Histogram * hist = nullptr; 73 | std::chrono::steady_clock::time_point start; | | {} 74 | 75 | public: 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase. 77 | Phase(Metrics & metrics, std::string method, const std::string & phase) | ^ ../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | void buildInfo( | ^ | static ../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] 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~ ../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~ ../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 156 | void buildSlots(unsigned count) | ^ | static ../src/daemon/metrics.hh:186:36: error: 4 adjacent parameters of 'schedSystem' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~ ../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~ ../src/daemon/metrics.hh:186:120: note: 'const int &' and 'int' parameters accept and bind the same kind of values 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | explicit Metrics(const std::string & listen) | ^ ../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] 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~ ../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:27: error: 3 adjacent parameters of 'countTunnelBytes' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~ ../src/daemon/metrics.hh:218:59: note: 'const int &' and 'int' parameters accept and bind the same kind of values 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../src/daemon/metrics.hh:224:24: error: 3 adjacent parameters of 'countNarBytes' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~ ../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~ ../src/daemon/metrics.hh:224:87: note: 'const int &' and 'int' parameters accept and bind the same kind of values 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../tests/dispatcher-bench.cc:26:10: error: 'algorithm' file not found [clang-diagnostic-error] 26 | #include | ^~~~~~~~~~~ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/dispatcher.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/dispatcher.cc. ../src/daemon/dispatcher.cc:21:1: error: included header strings.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 21 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | #include ../src/daemon/dispatcher.cc:22:1: error: included header types.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 22 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | ../src/daemon/dispatcher.cc:38:1: error: constructor does not initialize these fields: clients, workers, statsAtMs, lookupQueue, lookupThreads [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 38 | Dispatcher::Dispatcher(Config config_, Metrics & metrics) | ^ ../src/daemon/dispatcher.cc:64:9: error: variable 'job' of type 'LookupJob' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 64 | LookupJob job; | ^ | const ../src/daemon/dispatcher.cc:102:18: error: variable 'afterUnlock' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 102 | void Dispatcher::afterUnlock(std::function func) | ^ | static ../src/daemon/dispatcher.cc:112:18: error: variable 'debugLog' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 112 | void Dispatcher::debugLog(std::initializer_list fields) const | ^ | static ../src/daemon/dispatcher.cc:120:18: error: method 'systemFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 120 | auto Dispatcher::systemFor(std::string_view system) const -> std::string_view | ^ ~~~~~ | static ../src/daemon/dispatcher.cc:135:18: error: method 'lookup' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 135 | auto Dispatcher::lookup(const nix::remote::ClientMsgs & msgs) const -> std::vector | ^ ~~~~~ | static ../src/daemon/dispatcher.cc:262:18: error: method 'revokeOn' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^ | static ../src/daemon/dispatcher.cc:262:27: error: 2 adjacent parameters of 'revokeOn' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/dispatcher.cc:262:43: note: the first parameter in the range is 'wid' 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^~~ ../src/daemon/dispatcher.cc:262:68: note: the last parameter in the range is 'drvPath' 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^~~~~~~ ../src/daemon/dispatcher.cc:262:27: note: 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^ ../src/daemon/dispatcher.cc:262:48: note: 'sched::WorkerId' and 'const int &' parameters accept and bind the same kind of values 262 | void Dispatcher::revokeOn(sched::WorkerId wid, const std::string & drvPath) | ^ ../src/daemon/dispatcher.cc:262:48: note: 'sched::WorkerId' and 'const int &' may be implicitly converted: 'sched::WorkerId' (as 'unsigned int') -> 'const int &' (as 'int'), 'const int &' (as 'int') -> 'sched::WorkerId' (as 'unsigned int') ../src/daemon/dispatcher.cc:306:18: error: method 'clientMsgs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 306 | void Dispatcher::clientMsgs(const ClientPtr & client, const nix::remote::ClientMsgs & msgs) | ^ | static ../src/daemon/dispatcher.cc:308:16: error: variable 'needs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 308 | const bool needs = | ^ 309 | config.present && std::ranges::any_of(msgs.msgs(), [](const nix::remote::ClientMsg & msg) -> bool { | | = false ../src/daemon/dispatcher.cc:395:18: error: method 'onCancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | void Dispatcher::onCancel(Client & client, const nix::remote::Cancel & cancel) | ^ /build/source/build/../src/daemon/dispatcher.hh:10:10: error: 'map' file not found [clang-diagnostic-error] 10 | #include | ^~~~~ /build/source/build/../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 45 | struct Config | ^ 46 | { 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system | | {} 48 | PresentFn present; // unset: nothing is ever Cached | | {} /build/source/build/../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 64 | struct Client | ^ 65 | { 66 | sched::ClientId id = 0; 67 | ClientSend send; | | {} /build/source/build/../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Worker | ^ 81 | { 82 | WorkerSend send; | | {} 83 | std::optional id; | | {} /build/source/build/../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex & | ^ | [[nodiscard]] /nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED' 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) | ^ ../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 71 | std::string method; | | {} 72 | prometheus::Histogram * hist = nullptr; 73 | std::chrono::steady_clock::time_point start; | | {} 74 | 75 | public: 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase. 77 | Phase(Metrics & metrics, std::string method, const std::string & phase) | ^ ../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | void buildInfo( | ^ | static ../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] 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~ ../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~ ../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 156 | void buildSlots(unsigned count) | ^ | static ../src/daemon/metrics.hh:186:36: error: 4 adjacent parameters of 'schedSystem' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~ ../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~ ../src/daemon/metrics.hh:186:120: note: 'const int &' and 'int' parameters accept and bind the same kind of values 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | explicit Metrics(const std::string & listen) | ^ ../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] 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~ ../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:27: error: 3 adjacent parameters of 'countTunnelBytes' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~ ../src/daemon/metrics.hh:218:59: note: 'const int &' and 'int' parameters accept and bind the same kind of values 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../src/daemon/metrics.hh:224:24: error: 3 adjacent parameters of 'countNarBytes' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~ ../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~ ../src/daemon/metrics.hh:224:87: note: 'const int &' and 'int' parameters accept and bind the same kind of values 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/backend.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/backend.cc. ../src/build-log.hh:52:24: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 52 | if (type == 0) { | ^ ../src/build-log.hh:55:10: note: end of the original 55 | } else if (type == 1) { | ^ ../src/build-log.hh:55:31: note: clone 1 starts here 55 | } else if (type == 1) { | ^ ../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 66 | struct BuildEvent | ^ 67 | { 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; 69 | std::string text; | | {} ../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] 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; | ^ ../src/daemon/backend.cc:22:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 22 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | #include ../src/daemon/backend.cc:23:1: error: included header outputs-spec.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 23 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | #include ../src/daemon/backend.cc:31:1: error: included header file-descriptor.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 31 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 | #include ../src/daemon/backend.cc:33:1: error: included header unix-domain-socket.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 33 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 | ../src/daemon/backend.cc:77:16: error: method 'connect' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | auto Backends::connect(nix::Store & store) const -> std::unique_ptr | ^ ~~~~~ | static ../src/daemon/backend.cc:88:16: error: method 'forBuild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 88 | auto Backends::forBuild(Cancelled cancelled, nix::Store & localStore) const -> std::unique_ptr | ^ ~~~~~ | static ../src/daemon/backend.cc:120:16: error: method 'storedBuild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 120 | auto Backends::storedBuild( | ^ | static 121 | Cancelled cancelled, 122 | nix::Store & localStore, 123 | const nix::StorePath & drvPath, 124 | nix::BuildMode mode, 125 | Limits limits, 126 | const BuildEventSink & sendLogLine) const -> nix::BuildResult | ~~~~~ ../src/daemon/backend.cc:123:28: error: parameter 'drvPath' is unused [misc-unused-parameters,-warnings-as-errors] 123 | const nix::StorePath & drvPath, | ^~~~~~~ | /*drvPath*/ ../src/daemon/backend.cc:141:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 141 | nix::StringSink sink; | ^ | const ../src/daemon/backend.hh:5:10: error: 'csignal' file not found [clang-diagnostic-error] 5 | #include | ^~~~~~~~~ ../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Backends | ^ 54 | { 55 | std::string socketPath; | | {} ../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 82 | if (event.kind == BuildEvent::Kind::phase) { | ^ ../src/daemon/backend.hh:84:7: note: else branch starts here 84 | } else { | ^ ../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] 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/nix-compat.hh:72:49: note: the first parameter in the range is 'major' 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~ ../src/nix-compat.hh:72:64: note: the last parameter in the range is 'minor' 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^~~~~ ../src/nix-compat.hh:72:56: note: 'unsigned int' and 'int' may be implicitly converted 72 | constexpr auto makeProtocolVersion(unsigned int major, uint8_t minor) -> V { | ^ ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 24 | nix::StringSink sink; | ^ | const >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/tests/scheduler-grpc-bench.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/tests/scheduler-grpc-bench.cc. ../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 64 | struct Client | ^ 65 | { 66 | sched::ClientId id = 0; 67 | ClientSend send; | | {} ../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Worker | ^ 81 | { 82 | WorkerSend send; | | {} 83 | std::optional id; | | {} ../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex & | ^ | [[nodiscard]] /nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED' 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) | ^ ../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 71 | std::string method; | | {} 72 | prometheus::Histogram * hist = nullptr; 73 | std::chrono::steady_clock::time_point start; | | {} 74 | 75 | public: 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase. 77 | Phase(Metrics & metrics, std::string method, const std::string & phase) | ^ ../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | void buildInfo( | ^ | static ../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] 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~ ../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~ ../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 156 | void buildSlots(unsigned count) | ^ | static ../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] 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~ ../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~ ../src/daemon/metrics.hh:186:36: note: 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../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') ../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | explicit Metrics(const std::string & listen) | ^ ../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] 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~ ../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~ ../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] 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~ ../src/daemon/metrics.hh:218:27: note: 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../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') ../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] 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~ ../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~ ../src/daemon/metrics.hh:224:24: note: 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../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') ../src/daemon/sched-reactor.hh:28:8: error: constructor does not initialize these fields: queue [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 28 | struct SendQueue | ^ 29 | { 30 | // About a minute of Expects at full rate. Beyond it the peer is stuck. 31 | static constexpr size_t limit = 1U << 16U; 32 | // Messages per Write. 33 | static constexpr int maxBatch = 1024; 34 | 35 | // Leaf lock, may be taken inside Dispatcher::mutex. 36 | absl::Mutex mutex; 37 | std::deque queue ABSL_GUARDED_BY(mutex); | {} ../src/daemon/sched-reactor.hh:58:5: error: constructor does not initialize these fields: sendq [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 58 | explicit SchedReactorBase(grpc::CallbackServerContext * ctx) | ^ ../src/daemon/sched-reactor.hh:69:13: error: variable 'kick' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 69 | bool kick = false; | ^ | const ../src/daemon/sched-reactor.hh:153:9: error: variable 'have' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 153 | bool have = false; | ^ | const ../src/daemon/sched-reactor.hh:183:9: error: variable 'fin' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 183 | bool fin = false; | ^ | const ../src/daemon/sched-reactor.hh:206:5: error: constructor does not initialize these fields: client [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 206 | ScheduleReactor(grpc::CallbackServerContext * ctx, Dispatcher & disp) | ^ ../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] 226 | Dispatcher & disp; | ^ ../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] 255 | Dispatcher & disp; | ^ ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../tests/scheduler-grpc-bench.cc:18:10: error: 'atomic' file not found [clang-diagnostic-error] 18 | #include | ^~~~~~~~ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/build.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/client/build.cc. ../src/client/build.cc:33:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 33 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 | #include ../src/client/build.cc:37:1: error: included header store-open.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 37 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | #include ../src/client/build.cc:40:1: error: included header finally.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 40 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41 | #include ../src/client/build.cc:41:1: error: included header repair-flag.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 41 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 42 | #include ../src/client/build.cc:49:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors] 49 | #include "nix_remote.grpc.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 | #include "nix_remote.pb.h" ../src/client/build.cc:63:17: error: method 'uploadDrvClosure' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 63 | void GrpcStore::uploadDrvClosure(Store & evalStore, const StorePath & drvPath, const Metadata & headers) { | ^ | static ../src/client/build.cc:64:16: error: variable 'closure' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 64 | StorePathSet closure; | ^ | = 0 ../src/client/build.cc:67:16: error: variable 'missing' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 67 | StorePathSet missing; | ^ | = 0 ../src/client/build.cc:147:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 147 | printError("%s: %s, asking the scheduler again", job.drvPath.to_string(), firstLine(status.error_message())); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:158:17: error: method 'localEvalStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 158 | auto GrpcStore::localEvalStore(const StorePathSet & drvPaths) -> std::shared_ptr { | ^ | static ../src/client/build.cc:170:19: error: constructor does not initialize these fields: mode, mutex, cv, ready, wantable, remaining [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 170 | struct GrpcStore::Run { | ^ 171 | GrpcStore & store; 172 | BuildMode mode; 173 | Store & evalStore; 174 | std::map & jobs; 175 | 176 | std::mutex mutex; | | {} 177 | std::condition_variable cv; | | {} 178 | std::deque ready; // assigned, cached, lost or dep-failed: a thread can finish it | | {} 179 | std::deque wantable; // inputs done, Want not yet sent | | {} 180 | size_t remaining; | | {} ../src/client/build.cc:171:15: error: member 'store' of type 'GrpcStore &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors] 171 | GrpcStore & store; | ^ ../src/client/build.cc:173:11: error: member 'evalStore' of type 'Store &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors] 173 | Store & evalStore; | ^ ../src/client/build.cc:174:30: error: member 'jobs' of type 'int &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members,-warnings-as-errors] 174 | std::map & jobs; | ^ ../src/client/build.cc:185:8: error: method 'next' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 185 | auto next() -> Job * { | ^ | static ../src/client/build.cc:212:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 212 | debug("grpc: want %s", job.drvPath.to_string()); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug' 369 | #define debug(args...) printMsg(lvlDebug, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:306:9: error: empty catch statements hide issues; to handle exceptions appropriately, consider re-throwing, handling, or avoiding catch altogether [bugprone-empty-catch,-warnings-as-errors] 306 | } catch (Interrupted &) { | ^ ../src/client/build.cc:310:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 310 | printError("%s: %s", job->drvPath.to_string(), err.what()); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:336:22: error: method 'cachedResult' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 336 | [[nodiscard]] auto cachedResult(const Job & job) const -> BuildResult { | ^ ~~~~~ | static ../src/client/build.cc:347:8: error: method 'onMsgs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 347 | void onMsgs(const remote::SchedMsgs & msgs) { | ^ | static ../src/client/build.cc:358:11: error: variable 'job' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 358 | Job * job = found == byName.end() ? nullptr : found->second; | ^ | = nullptr ../src/client/build.cc:370:7: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 370 | debug("grpc: assigned %s -> %s", name, msg.assigned().worker_addr()); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug' 369 | #define debug(args...) printMsg(lvlDebug, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:498:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 498 | debug("grpc: scheduler at %s restarting, reconnecting", where); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug' 369 | #define debug(args...) printMsg(lvlDebug, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:500:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 500 | printError("scheduler at %s: %s, reconnecting", where, GrpcStore::firstLine(status.error_message())); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:507:17: error: method 'scheduleUntilDone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers, | ^ | static ../src/client/build.cc:507:46: error: 2 adjacent parameters of 'scheduleUntilDone' of similar type ('const int &') are easily swapped by mistake [bugprone-easily-swappable-parameters,-warnings-as-errors] 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers, | ^~~~~~~~~~~~~~~~~~~~~~~~~ 508 | const std::function & setCtx) -> grpc::Status { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/build.cc:507:63: note: the first parameter in the range is 'headers' 507 | auto GrpcStore::scheduleUntilDone(Run & run, const Metadata & headers, | ^~~~~~~ ../src/client/build.cc:508:86: note: the last parameter in the range is 'setCtx' 508 | const std::function & setCtx) -> grpc::Status { | ^~~~~~ ../src/client/build.cc:518:5: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 518 | debug("grpc: Schedule stream open, %d jobs", run.jobs.size()); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:369:24: note: expanded from macro 'debug' 369 | #define debug(args...) printMsg(lvlDebug, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/build.cc:539:17: error: variable 'runJobs' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 539 | void GrpcStore::runJobs(std::map & jobs, BuildMode buildMode, Store & evalStore) { | ^ | static ../src/client/build.cc:588:18: error: variable 'drvs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 588 | StorePathSet drvs; | ^ | = 0 ../src/client/build.cc:606:16: error: variable 'opaque' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 606 | StorePathSet opaque; | ^ | = 0 ../src/client/build.cc:652:17: error: method 'basicForFarm' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 652 | auto GrpcStore::basicForFarm(Store & evalStore, const StorePath & drvPath, const Derivation & full) | ^ | static ../src/client/build.cc:686:16: error: variable 'tops' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 686 | StorePathSet tops; | ^ | = 0 ../src/client/build.cc:693:16: error: variable 'outputs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 693 | StorePathSet outputs; | ^ | = 0 ../src/client/build.cc:707:16: error: variable 'valid' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 707 | StorePathSet valid; | ^ | = 0 ../src/client/build.cc:716:17: error: method 'loadJobs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void GrpcStore::loadJobs(const std::vector & reqs, Store & evalStore, | ^ | static ../src/client/build.cc:764:17: error: variable 'throwOnFailedBuilds' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage,-warnings-as-errors] 764 | void GrpcStore::throwOnFailedBuilds(std::vector & results) { | ^ | static ../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 46 | explicit StaticHeaders(std::shared_ptr headers) : headers(std::move(headers)) {} | ^ ../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 62 | explicit Factory(Headers hdrs) : headers(std::make_shared(std::move(hdrs))) {} | ^ 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/) 64 | -> grpc::experimental::Interceptor * override { 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it 66 | } 67 | private: 68 | std::shared_ptr headers; | | {} ../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 77 | std::string path; | | {} 78 | 79 | public: 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {} | ^ ../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/, | ^ | static ../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors] 87 | std::multimap * metadata) -> grpc::Status override { | ^ | const ../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] 95 | } catch (std::exception & err) { | ^ ../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] 47 | std::mutex mutex; | | {} 48 | std::condition_variable grown; | | {} 49 | uint64_t written = 0; 50 | bool eof = false; 51 | std::exception_ptr failure; | | {} 52 | 53 | public: 54 | NarSpool() | ^ ../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | void fail(const std::exception_ptr & cause) | ^ | static ../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 142 | inline void demuxNarFrames(Reader & reader, const std::vector> & targets) | ^ | /*unused*/ ../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] 172 | NarFetcher( | ^ ../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 173 | std::function()> channelFactory, | ^ | /*unused*/ ../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 187 | void recordOrder(std::vector order, std::map sizes) | ^ | static ../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] 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 224 | ~NarFetcher() | ^ ../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] 233 | class Session | ^ 234 | { 235 | friend class NarFetcher; 236 | 237 | std::unique_ptr stub; | | {} 238 | grpc::ClientContext ctx; 239 | std::unique_ptr> reader; | | {} 240 | std::vector> targets; 241 | std::jthread thread; | | {} ../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 243 | void run() | ^ | static ../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] 254 | } catch (...) { | ^ ../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t | ^ ~~~~~ | static ../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 279 | void startPending() | ^ | static ../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 304 | void startSession(const std::vector & paths) | ^ | static ../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error] 6 | #include | ^~~~~~~~~~~ ../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 201 | auto getReference() const -> StoreReference override { | ^ | [[nodiscard]] ../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 212 | auto openStore() const -> ref override; | ^ | [[nodiscard]] ../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 256 | auto connectHint(const std::string & msg) const -> std::string | ^ | [[nodiscard]] ../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message())); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/store.hh:352:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 348 | std::shared_ptr evalStore; | | {} 349 | ref inner; 350 | 351 | public: 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr evalStore, | ^ ../src/client/store.hh:410:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 405 | std::string text; | | {} 406 | std::vector fields; | | {} 407 | std::optional act; | | {} 408 | 409 | public: 410 | BuildLogActivity(std::string text, std::vector fields) | ^ ../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] 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/store.hh:410:36: note: the first parameter in the range is 'text' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~ ../src/client/store.hh:410:69: note: the last parameter in the range is 'fields' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~ ../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 420 | if (msg.has_log_line()) { | ^ ../src/client/store.hh:422:11: note: else branch starts here 422 | } else { | ^ ../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] 466 | struct Job { | ^ 467 | StorePath drvPath; 468 | BasicDerivation drv; 469 | std::vector dependants; | | {} 470 | std::vector inputs; | | {} 471 | size_t waiting = 0; 472 | uint64_t cpHintMs = 0; 473 | unsigned bounced = 0; 474 | std::optional failedInput; | | {} 475 | std::optional result; | | {} 476 | // Set by the reader thread, consumed by a build thread. 477 | std::string workerAddr; | | {} 478 | uint64_t assignId = 0; 479 | // A second Assigned while building: the scheduler moved the drv to a 480 | // worker that was already at it. Followed when the current one bounces. 481 | std::string redirectAddr; | | {} ../src/client/store.hh:557:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 557 | struct Connection : RemoteStore::Connection | ^ 558 | { 559 | private: 560 | friend struct GrpcStore; 561 | 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the 564 | // blocking, ordered semantics the worker protocol relies on without 565 | // reimplementing Source/Sink on top of gRPC. 566 | grpc::ClientContext ctx; 567 | std::unique_ptr stream; | | {} 568 | 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads 571 | 572 | std::jthread reader; | | {} ../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 613 | ~GrpcStore() override | ^ ../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] 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override | ^ ../src/client/store.hh:633:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 629 | std::unique_ptr upstream; | | {} 630 | AutoCloseFD fd; 631 | bool complete = false; 632 | 633 | explicit ReplayableNar(std::unique_ptr src) | ^ ../src/client/store.hh:645:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 645 | LambdaSink tee([&](std::string_view data) -> void { | ^ | const ../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] 652 | } catch (...) { | ^ ../src/client/store.hh:667:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 667 | FdSource replay(fd.get()); | ^ | const ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 24 | nix::StringSink sink; | ^ | const ../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] 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~ ../src/pump.hh:65:57: note: the last parameter in the range is 'buf' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~ ../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0); | ^ | = 0 ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 90 | return static_cast(got); // EOF; caller sees short (possibly zero) batch | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 97 | return static_cast(got); | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/store.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/client/store.cc. ../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 46 | explicit StaticHeaders(std::shared_ptr headers) : headers(std::move(headers)) {} | ^ ../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 62 | explicit Factory(Headers hdrs) : headers(std::make_shared(std::move(hdrs))) {} | ^ 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/) 64 | -> grpc::experimental::Interceptor * override { 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it 66 | } 67 | private: 68 | std::shared_ptr headers; | | {} ../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 77 | std::string path; | | {} 78 | 79 | public: 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {} | ^ ../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/, | ^ | static ../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors] 87 | std::multimap * metadata) -> grpc::Status override { | ^ | const ../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] 95 | } catch (std::exception & err) { | ^ ../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] 47 | std::mutex mutex; | | {} 48 | std::condition_variable grown; | | {} 49 | uint64_t written = 0; 50 | bool eof = false; 51 | std::exception_ptr failure; | | {} 52 | 53 | public: 54 | NarSpool() | ^ ../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | void fail(const std::exception_ptr & cause) | ^ | static ../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 142 | inline void demuxNarFrames(Reader & reader, const std::vector> & targets) | ^ | /*unused*/ ../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] 172 | NarFetcher( | ^ ../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 173 | std::function()> channelFactory, | ^ | /*unused*/ ../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 187 | void recordOrder(std::vector order, std::map sizes) | ^ | static ../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] 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 224 | ~NarFetcher() | ^ ../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] 233 | class Session | ^ 234 | { 235 | friend class NarFetcher; 236 | 237 | std::unique_ptr stub; | | {} 238 | grpc::ClientContext ctx; 239 | std::unique_ptr> reader; | | {} 240 | std::vector> targets; 241 | std::jthread thread; | | {} ../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 243 | void run() | ^ | static ../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] 254 | } catch (...) { | ^ ../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t | ^ ~~~~~ | static ../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 279 | void startPending() | ^ | static ../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 304 | void startSession(const std::vector & paths) | ^ | static ../src/client/store.cc:18:1: error: included header grpcpp.h is not used directly [misc-include-cleaner,-warnings-as-errors] 18 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | #include ../src/client/store.cc:21:1: error: included header client_interceptor.h is not used directly [misc-include-cleaner,-warnings-as-errors] 21 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | #include ../src/client/store.cc:23:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors] 23 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | ../src/client/store.cc:26:1: error: included header globals.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 26 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | #include ../src/client/store.cc:31:1: error: included header worker-protocol.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 31 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 | #include ../src/client/store.cc:33:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 33 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 | #include ../src/client/store.cc:37:1: error: included header util.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 37 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | ../src/client/store.cc:40:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors] 40 | #include "nix_remote.grpc.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41 | #include "nix_remote.pb.h" ../src/client/store.cc:41:1: error: included header nix_remote.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors] 41 | #include "nix_remote.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 42 | #include "pump.hh" ../src/client/store.cc:77:17: error: method 'makeChannel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | auto GrpcStore::makeChannel(bool ownConnection) -> std::shared_ptr | ^ | static ../src/client/store.cc:101:1: error: constructor does not initialize these fields: creds, stub, sched, trustedOnce, trusted, prefetchMutex, prefetchedInfos, infoBatchMutex, infoBatchWakeup, infoBatchWorker [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 101 | GrpcStore::GrpcStore(const ref &config) | ^ ../src/client/store.cc:159:17: error: method 'statusError' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 159 | auto GrpcStore::statusError(const grpc::Status & status, const char * opName) const -> Error | ^ ~~~~~ ../src/client/store.cc:172:17: error: method 'goneAway' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 172 | auto GrpcStore::goneAway(const grpc::Status & status) -> bool { | ^ | static /build/source/build/../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error] 6 | #include | ^~~~~~~~~~~ /build/source/build/../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 201 | auto getReference() const -> StoreReference override { | ^ | [[nodiscard]] /build/source/build/../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 212 | auto openStore() const -> ref override; | ^ | [[nodiscard]] /build/source/build/../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 256 | auto connectHint(const std::string & msg) const -> std::string | ^ | [[nodiscard]] /build/source/build/../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message())); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ /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] 348 | std::shared_ptr evalStore; | | {} 349 | ref inner; 350 | 351 | public: 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr evalStore, | ^ /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] 405 | std::string text; | | {} 406 | std::vector fields; | | {} 407 | std::optional act; | | {} 408 | 409 | public: 410 | BuildLogActivity(std::string text, std::vector fields) | ^ /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] 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/source/build/../src/client/store.hh:410:36: note: the first parameter in the range is 'text' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~ /build/source/build/../src/client/store.hh:410:69: note: the last parameter in the range is 'fields' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~ /build/source/build/../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 420 | if (msg.has_log_line()) { | ^ /build/source/build/../src/client/store.hh:422:11: note: else branch starts here 422 | } else { | ^ /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] 466 | struct Job { | ^ 467 | StorePath drvPath; 468 | BasicDerivation drv; 469 | std::vector dependants; | | {} 470 | std::vector inputs; | | {} 471 | size_t waiting = 0; 472 | uint64_t cpHintMs = 0; 473 | unsigned bounced = 0; 474 | std::optional failedInput; | | {} 475 | std::optional result; | | {} 476 | // Set by the reader thread, consumed by a build thread. 477 | std::string workerAddr; | | {} 478 | uint64_t assignId = 0; 479 | // A second Assigned while building: the scheduler moved the drv to a 480 | // worker that was already at it. Followed when the current one bounces. 481 | std::string redirectAddr; | | {} /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] 557 | struct Connection : RemoteStore::Connection | ^ 558 | { 559 | private: 560 | friend struct GrpcStore; 561 | 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the 564 | // blocking, ordered semantics the worker protocol relies on without 565 | // reimplementing Source/Sink on top of gRPC. 566 | grpc::ClientContext ctx; 567 | std::unique_ptr stream; | | {} 568 | 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads 571 | 572 | std::jthread reader; | | {} /build/source/build/../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 613 | ~GrpcStore() override | ^ /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] 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override | ^ /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] 629 | std::unique_ptr upstream; | | {} 630 | AutoCloseFD fd; 631 | bool complete = false; 632 | 633 | explicit ReplayableNar(std::unique_ptr src) | ^ /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] 645 | LambdaSink tee([&](std::string_view data) -> void { | ^ | const /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] 652 | } catch (...) { | ^ /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] 667 | FdSource replay(fd.get()); | ^ | const ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 24 | nix::StringSink sink; | ^ | const ../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] 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~ ../src/pump.hh:65:57: note: the last parameter in the range is 'buf' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~ ../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0); | ^ | = 0 ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 90 | return static_cast(got); // EOF; caller sees short (possibly zero) batch | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 97 | return static_cast(got); | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/client/transfer.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/client/transfer.cc. ../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 46 | explicit StaticHeaders(std::shared_ptr headers) : headers(std::move(headers)) {} | ^ ../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 62 | explicit Factory(Headers hdrs) : headers(std::make_shared(std::move(hdrs))) {} | ^ 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/) 64 | -> grpc::experimental::Interceptor * override { 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it 66 | } 67 | private: 68 | std::shared_ptr headers; | | {} ../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 77 | std::string path; | | {} 78 | 79 | public: 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {} | ^ ../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/, | ^ | static ../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors] 87 | std::multimap * metadata) -> grpc::Status override { | ^ | const ../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] 95 | } catch (std::exception & err) { | ^ ../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] 47 | std::mutex mutex; | | {} 48 | std::condition_variable grown; | | {} 49 | uint64_t written = 0; 50 | bool eof = false; 51 | std::exception_ptr failure; | | {} 52 | 53 | public: 54 | NarSpool() | ^ ../src/client/nar-fetcher.hh:95:10: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | void fail(const std::exception_ptr & cause) | ^ | static ../src/client/nar-fetcher.hh:142:88: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 142 | inline void demuxNarFrames(Reader & reader, const std::vector> & targets) | ^ | /*unused*/ ../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] 172 | NarFetcher( | ^ ../src/client/nar-fetcher.hh:173:54: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 173 | std::function()> channelFactory, | ^ | /*unused*/ ../src/client/nar-fetcher.hh:187:10: error: method 'recordOrder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 187 | void recordOrder(std::vector order, std::map sizes) | ^ | static ../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] 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/nar-fetcher.hh:187:50: note: the first parameter in the range is 'order' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:187:92: note: the last parameter in the range is 'sizes' 187 | void recordOrder(std::vector order, std::map sizes) | ^~~~~ ../src/client/nar-fetcher.hh:224:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 224 | ~NarFetcher() | ^ ../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] 233 | class Session | ^ 234 | { 235 | friend class NarFetcher; 236 | 237 | std::unique_ptr stub; | | {} 238 | grpc::ClientContext ctx; 239 | std::unique_ptr> reader; | | {} 240 | std::vector> targets; 241 | std::jthread thread; | | {} ../src/client/nar-fetcher.hh:243:14: error: method 'run' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 243 | void run() | ^ | static ../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] 254 | } catch (...) { | ^ ../src/client/nar-fetcher.hh:272:24: error: method 'narSizeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 272 | [[nodiscard]] auto narSizeOf(const nix::StorePath & path) const -> uint64_t | ^ ~~~~~ | static ../src/client/nar-fetcher.hh:279:10: error: method 'startPending' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 279 | void startPending() | ^ | static ../src/client/nar-fetcher.hh:304:10: error: method 'startSession' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 304 | void startSession(const std::vector & paths) | ^ | static ../src/client/store.hh:6:10: error: 'algorithm' file not found [clang-diagnostic-error] 6 | #include | ^~~~~~~~~~~ ../src/client/store.hh:201:5: error: function 'getReference' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 201 | auto getReference() const -> StoreReference override { | ^ | [[nodiscard]] ../src/client/store.hh:212:5: error: function 'openStore' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 212 | auto openStore() const -> ref override; | ^ | [[nodiscard]] ../src/client/store.hh:256:5: error: function 'connectHint' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 256 | auto connectHint(const std::string & msg) const -> std::string | ^ | [[nodiscard]] ../src/client/store.hh:332:9: error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors] 332 | printError("%s: %s, retrying", config->authority.to_string(), firstLine(status.error_message())); | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:365:29: note: expanded from macro 'printError' 365 | #define printError(args...) printMsg(lvlError, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:363:34: note: expanded from macro 'printMsg' 363 | #define printMsg(level, args...) printMsgUsing(logger, level, args) | ^ /nix/store/mf4hwligj10vypiz8qsz90kl69i6vrk0-nix-util-2.36.0pre20260920_5711f8fe-dev/include/nix/util/logging.hh:357:5: note: expanded from macro 'printMsgUsing' 357 | do { \ | ^ ../src/client/store.hh:352:9: error: constructor does not initialize these fields: evalStore [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 348 | std::shared_ptr evalStore; | | {} 349 | ref inner; 350 | 351 | public: 352 | GrpcBuilder(GrpcStore * store, std::shared_ptr evalStore, | ^ ../src/client/store.hh:410:7: error: constructor does not initialize these fields: text, fields, act [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 405 | std::string text; | | {} 406 | std::vector fields; | | {} 407 | std::optional act; | | {} 408 | 409 | public: 410 | BuildLogActivity(std::string text, std::vector fields) | ^ ../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] 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/client/store.hh:410:36: note: the first parameter in the range is 'text' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~ ../src/client/store.hh:410:69: note: the last parameter in the range is 'fields' 410 | BuildLogActivity(std::string text, std::vector fields) | ^~~~~~ ../src/client/store.hh:420:9: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 420 | if (msg.has_log_line()) { | ^ ../src/client/store.hh:422:11: note: else branch starts here 422 | } else { | ^ ../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] 466 | struct Job { | ^ 467 | StorePath drvPath; 468 | BasicDerivation drv; 469 | std::vector dependants; | | {} 470 | std::vector inputs; | | {} 471 | size_t waiting = 0; 472 | uint64_t cpHintMs = 0; 473 | unsigned bounced = 0; 474 | std::optional failedInput; | | {} 475 | std::optional result; | | {} 476 | // Set by the reader thread, consumed by a build thread. 477 | std::string workerAddr; | | {} 478 | uint64_t assignId = 0; 479 | // A second Assigned while building: the scheduler moved the drv to a 480 | // worker that was already at it. Followed when the current one bounces. 481 | std::string redirectAddr; | | {} ../src/client/store.hh:557:12: error: constructor does not initialize these fields: stream, reader, writer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 557 | struct Connection : RemoteStore::Connection | ^ 558 | { 559 | private: 560 | friend struct GrpcStore; 561 | 562 | // RemoteStore::Connection speaks through FdSink/FdSource, so bridge the 563 | // gRPC stream to a pair of pipes with pump threads. This keeps the 564 | // blocking, ordered semantics the worker protocol relies on without 565 | // reimplementing Source/Sink on top of gRPC. 566 | grpc::ClientContext ctx; 567 | std::unique_ptr stream; | | {} 568 | 569 | Pipe toRemote; // plugin writes → reader thread sends over gRPC 570 | Pipe fromRemote; // writer thread receives from gRPC → plugin reads 571 | 572 | std::jthread reader; | | {} ../src/client/store.hh:613:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 613 | ~GrpcStore() override | ^ ../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] 619 | PathsSource && pathsToCopy, Activity & act, RepairFlag repair, CheckSigsFlag checkSigs) override | ^ ../src/client/store.hh:633:9: error: constructor does not initialize these fields: upstream [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 629 | std::unique_ptr upstream; | | {} 630 | AutoCloseFD fd; 631 | bool complete = false; 632 | 633 | explicit ReplayableNar(std::unique_ptr src) | ^ ../src/client/store.hh:645:17: error: variable 'tee' of type 'LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 645 | LambdaSink tee([&](std::string_view data) -> void { | ^ | const ../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] 652 | } catch (...) { | ^ ../src/client/store.hh:667:13: error: variable 'replay' of type 'FdSource' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 667 | FdSource replay(fd.get()); | ^ | const ../src/client/transfer.cc:21:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors] 21 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | ../src/client/transfer.cc:24:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 24 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 | #include ../src/client/transfer.cc:28:1: error: included header worker-protocol.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 28 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 | #include ../src/client/transfer.cc:29:1: error: included header error.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 29 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 30 | #include ../src/client/transfer.cc:32:1: error: included header serialise.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 32 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 | #include ../src/client/transfer.cc:33:1: error: included header util.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 33 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 | ../src/client/transfer.cc:36:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors] 36 | #include "nix_remote.grpc.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | #include "nix_remote.pb.h" ../src/client/transfer.cc:38:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 38 | #include "path-info-wire.hh" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | #include "pump.hh" ../src/client/transfer.cc:39:1: error: included header pump.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 39 | #include "pump.hh" | ^~~~~~~~~~~~~~~~~~ 40 | ../src/client/transfer.cc:43:17: error: method 'queryValidPathsRouted' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 43 | auto GrpcStore::queryValidPathsRouted(const StorePathSet & paths, SubstituteFlag maybeSubstitute, | ^ | static ../src/client/transfer.cc:57:16: error: variable 'res' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 57 | StorePathSet res; | ^ | = 0 ../src/client/transfer.cc:64:17: error: method 'queryMissing' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 64 | auto GrpcStore::queryMissing(const std::vector & targets) | ^ | static ../src/client/transfer.cc:73:5: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 73 | grpc::ClientContext ctx; | ^ | const ../src/client/transfer.cc:100:17: error: method 'queryPathInfosNative' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 100 | auto GrpcStore::queryPathInfosNative(const StorePathSet &paths) -> PathInfoMap { | ^ | static ../src/client/transfer.cc:107:5: error: variable 'ctx' of type 'grpc::ClientContext' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 107 | grpc::ClientContext ctx; | ^ | const ../src/client/transfer.cc:141:17: error: method 'runInfoBatches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 141 | void GrpcStore::runInfoBatches(const std::stop_token & stop) | ^ | static ../src/client/transfer.cc:152:22: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 152 | StorePathSet paths; | ^ | = 0 ../src/client/transfer.cc:177:17: error: method 'queryPathInfoUncached' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 177 | void GrpcStore::queryPathInfoUncached(const StorePath & path, InfoCallback callback) noexcept { | ^ | static ../src/client/transfer.cc:203:17: error: method 'addMultipleToStoreRouted' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 203 | void GrpcStore::addMultipleToStoreRouted( | ^ | static ../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] 216 | auto GrpcStore::addMultipleToStoreOnce( | ^ | static ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 24 | nix::StringSink sink; | ^ | const ../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] 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~ ../src/pump.hh:65:57: note: the last parameter in the range is 'buf' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~ ../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0); | ^ | = 0 ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 90 | return static_cast(got); // EOF; caller sees short (possibly zero) batch | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 97 | return static_cast(got); | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/main.cc /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/main.cc. ../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 66 | struct BuildEvent | ^ 67 | { 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; 69 | std::string text; | | {} ../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] 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; | ^ ../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] 22 | enum class Role : std::uint8_t { | ^ ../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 51 | class Acl | ^ 52 | { 53 | struct Rule 54 | { 55 | std::string pattern; 56 | Role role; 57 | }; 58 | 59 | std::vector rules; | | {} 60 | // Separate from the glob rules so '*' cannot grant anonymous access. 61 | std::optional anonRole; | | {} ../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Rule | ^ 54 | { 55 | std::string pattern; | | {} ../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 70 | void addRule(std::string_view spec) | ^ | static ../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | [[nodiscard]] auto roleFor(const std::optional & commonName) const -> std::optional | ^ ~~~~~ | static ../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | struct Caller | ^ 20 | { 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; 22 | std::string name = "-"; // cert CN or oidc::, for logs and metrics 23 | std::optional role; | | {} ../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] 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; | ^ ../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Backends | ^ 54 | { 55 | std::string socketPath; | | {} ../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 82 | if (event.kind == BuildEvent::Kind::phase) { | ^ ../src/daemon/backend.hh:84:7: note: else branch starts here 84 | } else { | ^ ../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 40 | std::optional remote; | | {} 41 | 42 | public: 43 | explicit Cache(const Niks3Config & cfg) | ^ ../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 61 | [[nodiscard]] auto present(const std::vector & keys) -> std::unordered_set | ^ | static ../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^ | static ../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] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~ ../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~ ../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] 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~ ../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~ ../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const | ^ ~~~~~ | static ../src/daemon/coordinator.hh:45:8: error: constructor does not initialize these fields: since [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 45 | struct Expected | ^ 46 | { 47 | uint64_t assignId = 0; 48 | Clock::time_point since; | | {} ../src/daemon/coordinator.hh:52:12: error: constructor does not initialize these fields: mutex, cv, resultWire [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 52 | struct Shared | ^ 53 | { 54 | std::mutex mutex; | | {} 55 | std::condition_variable cv; | | {} 56 | std::atomic revoked{false}; // scheduler moved the drv to a worker further along 57 | std::atomic attached{0}; // callers waiting in attach(); the build outlives its first caller for them 58 | bool finished = false; 59 | std::string resultWire; // BuildDerivationDone serialised | | {} ../src/daemon/coordinator.hh:80:12: error: constructor does not initialize these fields: shared [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Admission | ^ 81 | { 82 | std::shared_ptr shared; | | {} ../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] 91 | const std::vector> & outputs, | ^~~~~ ../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | auto hello() const -> nix::remote::WorkerMsg; | ^ | [[nodiscard]] ../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool; | ^ | [[nodiscard]] ../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] 111 | const Options & options; | ^ ../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] 112 | Metrics & metrics; | ^ ../src/daemon/coordinator.hh:114:12: error: constructor does not initialize these fields: expected [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 114 | struct State | ^ 115 | { 116 | std::unordered_map expected; | | {} ../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] 128 | const std::vector> & outputs); | ^~~~~ ../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 45 | struct Config | ^ 46 | { 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system | | {} 48 | PresentFn present; // unset: nothing is ever Cached | | {} ../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 64 | struct Client | ^ 65 | { 66 | sched::ClientId id = 0; 67 | ClientSend send; | | {} ../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Worker | ^ 81 | { 82 | WorkerSend send; | | {} 83 | std::optional id; | | {} ../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex & | ^ | [[nodiscard]] /nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED' 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) | ^ ../src/daemon/idle.hh:41:24: error: method 'idleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 41 | [[nodiscard]] auto idleFor() const -> Clock::duration | ^ ~~~~~ | static ../src/daemon/main.cc:9:10: error: 'algorithm' file not found [clang-diagnostic-error] 9 | #include | ^~~~~~~~~~~ ../src/daemon/main.cc:45:1: error: included header derived-path.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 45 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 | #include ../src/daemon/main.cc:62:1: error: included header unix-domain-socket.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 62 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 63 | #include ../src/daemon/main.cc:76:1: error: included header oidc.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 76 | #include "oidc.hh" | ^~~~~~~~~~~~~~~~~~ 77 | #include "path-info-wire.hh" ../src/daemon/main.cc:77:1: error: included header path-info-wire.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 77 | #include "path-info-wire.hh" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 | #include "metrics.hh" ../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] 91 | volatile std::sig_atomic_t nixgrpc::stopSignal = 0; | ^ | static ../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] 100 | nixgrpc::Metrics & metrics; | ^ ../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] 101 | nixgrpc::IdleTracker & idle; | ^ ../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] 103 | nixgrpc::Auth & auth; | ^ ../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] 105 | nixgrpc::Coordinator & coord; | ^ ../src/daemon/main.cc:112:24: error: method 'openLocalStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 112 | [[nodiscard]] auto openLocalStore() const -> nix::ref | ^ ~~~~~ | static ../src/daemon/main.cc:119:10: error: method 'getStore' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 119 | auto getStore() -> nix::ref | ^ | static ../src/daemon/main.cc:130:10: error: method 'localDaemonGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 130 | auto localDaemonGone(const std::exception & err) -> bool | ^ | static ../src/daemon/main.cc:133:20: error: variable 'gone' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 133 | bool const gone = dynamic_cast(&err) != nullptr | ^ 134 | || (sys != nullptr && (sys->errNo == EPIPE || sys->errNo == ECONNRESET)); | | = false ../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] 163 | auto guarded(F && func) -> grpc::Status | ^ ../src/daemon/main.cc:185:81: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 185 | void logDebug(std::initializer_list> fields) | ^ | /*unused*/ ../src/daemon/main.cc:195:12: error: constructor does not initialize these fields: context, method [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 195 | struct Rpc | ^ 196 | { 197 | grpc::ServerContext * context; | | {} 198 | std::string_view method; | | {} ../src/daemon/main.cc:202:14: error: method 'done' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 202 | void done(const Fields & extra) const | ^ ~~~~~ | static ../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] 98 | NixRemoteService( | ^ ../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] 231 | std::string socketPath, | ^~~~~~~~~~~~~~~~~~~~~~~ 232 | std::string storeUri, | ~~~~~~~~~~~~~~~~~~~~~ 233 | std::string workerName, | ~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/main.cc:231:21: note: the first parameter in the range is 'socketPath' 231 | std::string socketPath, | ^~~~~~~~~~ ../src/daemon/main.cc:233:21: note: the last parameter in the range is 'workerName' 233 | std::string workerName, | ^~~~~~~~~~ ../src/daemon/main.cc:297:31: error: variable 'paths' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 297 | nix::StorePathSet paths; | ^ | = 0 ../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] 591 | const nixgrpc::BuildEventSink & log, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 592 | const std::map & outPaths, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/main.cc:591:41: note: the first parameter in the range is 'log' 591 | const nixgrpc::BuildEventSink & log, | ^~~ ../src/daemon/main.cc:592:55: note: the last parameter in the range is 'outPaths' 592 | const std::map & outPaths, | ^~~~~~~~ ../src/daemon/main.cc:595:53: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 595 | std::vector> & outputs) -> grpc::Status | ^ | /*unused*/ ../src/daemon/main.cc:731:13: error: variable 'counting' of type 'nix::LambdaSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 731 | nix::LambdaSink counting([&](std::string_view data) -> void { | ^ | const ../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] 796 | auto main(int argc, char ** argv) -> int | ^ ../src/daemon/main.cc:819:9: note: frame #0: unhandled exception of type 'nix::Error' may be thrown in function 'main' here 819 | throw nix::Error("--idle-timeout requires systemd socket activation"); | ^ ../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 71 | std::string method; | | {} 72 | prometheus::Histogram * hist = nullptr; 73 | std::chrono::steady_clock::time_point start; | | {} 74 | 75 | public: 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase. 77 | Phase(Metrics & metrics, std::string method, const std::string & phase) | ^ ../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | void buildInfo( | ^ | static ../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] 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~ ../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~ ../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 156 | void buildSlots(unsigned count) | ^ | static ../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] 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~ ../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~ ../src/daemon/metrics.hh:186:36: note: 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../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') ../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | explicit Metrics(const std::string & listen) | ^ ../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] 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~ ../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~ ../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] 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~ ../src/daemon/metrics.hh:218:27: note: 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../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') ../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] 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~ ../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~ ../src/daemon/metrics.hh:224:24: note: 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../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') ../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] 17 | struct Niks3Config | ^ 18 | { 19 | std::string url; | | {} 20 | std::string tokenFile; // bearer, optional | | {} 21 | std::string clientCert; // mTLS, optional | | {} 22 | std::string clientKey; | | {} 23 | PushProcess::Argv pushArgv; | | {} ../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] 34 | std::string baseUrl; | | {} 35 | std::shared_ptr bearer; | | {} 36 | std::string clientCert; | | {} 37 | std::string clientKey; | | {} 38 | 39 | public: 40 | explicit Niks3Client(const Niks3Config & cfg) | ^ ../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ~~~~~ | static ../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] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 60 | struct Identity | ^ 61 | { 62 | std::string subject; // "oidc::" | | {} 63 | std::optional role; // nullopt: verified but no rule matched | | {} ../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] 76 | } catch (...) { | ^ ../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] 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../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] 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~ ../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~ ../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^ ../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] 251 | struct Jwk | ^ 252 | { 253 | std::string kid; | | {} 254 | std::string kty; | | {} 255 | std::string crv; | | {} 256 | std::string pem; | | {} ../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 286 | if (jwk.kty == "RSA") { | ^ ../src/daemon/oidc.hh:288:10: note: end of the original 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:288:37: note: clone 1 starts here 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:290:62: note: clone 2 starts here 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") { | ^ ../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] 294 | } catch (...) { | ^ ../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 300 | struct FixedClock | ^ 301 | { 302 | std::chrono::system_clock::time_point at; | | {} ../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 347 | struct Result | ^ 348 | { 349 | std::optional identity; | | {} 350 | std::string error; // for logs, not for the client | | {} ../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss) | ^ ../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ | static ../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] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~ ../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~ ../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ ../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 377 | struct KeySet | ^ 378 | { 379 | std::mutex lock; | | {} 380 | std::vector keys; | | {} 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago". 382 | std::optional fetched; | | {} ../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json | ^ ~~~~~ | static ../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector | ^ ~~~~~ | static ../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] 442 | std::optional fetched, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 443 | std::chrono::steady_clock::time_point now, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched' 442 | std::optional fetched, | ^~~~~~~ ../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now' 443 | std::chrono::steady_clock::time_point now, | ^~~ ../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^ | static ../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] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~~~~~~~~~~~~~~~~~~ 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token' 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~ ../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now' 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^~~ ../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^ ../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ | static ../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] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~ ../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~ ../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ ../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] 21 | struct Options | ^ 22 | { 23 | std::string listen = "0.0.0.0:50051"; 24 | std::optional idleTimeout; | | {} 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket"; 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket. 27 | std::string storeUri; | | {} 28 | std::string tlsCert; | | {} 29 | std::string tlsKey; | | {} 30 | std::string clientCA; | | {} 31 | std::string metricsListen; | | {} 32 | std::string workerName; | | {} 33 | LogLevel logLevel = LogLevel::info; 34 | Acl acl; 35 | xfcc::TrustedProxies proxies; 36 | std::string oidcConfig; | | {} ../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] 61 | explicit PushProcess(Argv argv) | ^ ../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^ | static ../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] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~ ../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~ ../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 123 | struct Result | ^ 124 | { 125 | std::string status = "ok"; 126 | std::string message; | | {} 127 | Signatures signatures; | | {} ../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 130 | explicit Pending(size_t count) | ^ ../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] 136 | struct Ack | ^ 137 | { 138 | std::string status; | | {} 139 | std::string message; | | {} 140 | std::string path; | | {} 141 | std::set signatures; | | {} ../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 144 | auto ack(Ack msg) -> bool | ^ | static ../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 147 | if (msg.status != "ok") { | ^ ../src/daemon/push.hh:150:14: note: end of the original 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:150:49: note: clone 1 starts here 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 162 | void fail(const std::string & message) | ^ | static ../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 171 | auto wait(const Cancelled & cancelled) -> Result | ^ | static ../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 184 | struct Inner | ^ 185 | { 186 | size_t left; | | {} ../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 193 | struct State | ^ 194 | { 195 | nix::Pid pid; 196 | std::shared_ptr stdinFd; | | {} ../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 206 | void ensureChild(nix::Sync::WriteLock & lck) | ^ | static ../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 237 | void readAcks(int acksFd) | ^ | static ../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] 260 | } catch (nix::EndOfFile &) { | ^ ../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] 262 | } catch (std::exception & err) { | ^ ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../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] 90 | acceptInto(const std::vector & listenFds, const std::shared_ptr & acceptor) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/socket-activation.hh:90:37: note: the first parameter in the range is 'listenFds' 90 | acceptInto(const std::vector & listenFds, const std::shared_ptr & acceptor) | ^~~~~~~~~ ../src/daemon/socket-activation.hh:90:120: note: the last parameter in the range is 'acceptor' 90 | acceptInto(const std::vector & listenFds, const std::shared_ptr & acceptor) | ^~~~~~~~ ../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | struct Cached | ^ 22 | { 23 | std::string token; | | {} ../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | nix::Sync cached; | | {} 20 | 21 | static auto mtime(const struct stat & info) -> struct timespec 22 | { 23 | #ifdef __APPLE__ 24 | return info.st_mtimespec; 25 | #else 26 | return info.st_mtim; 27 | #endif 28 | } 29 | 30 | public: 31 | explicit TokenFile(std::string path_) | ^ ../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 46 | auto get() -> std::string | ^ | static ../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 29 | std::string_view rest; | | {} 30 | 31 | public: 32 | explicit Cursor(std::string_view input) | ^ ../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 47 | auto take() -> char | ^ | static ../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 52 | char const chr = rest.front(); | ^ | = 0 ../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 58 | auto until(std::string_view stops) -> std::optional | ^ | static ../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 69 | auto remaining() -> std::string_view | ^ | static ../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] 150 | inline auto subjectCommonName(std::string_view value) -> std::optional | ^ ../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 192 | class TrustedProxies | ^ 193 | { 194 | std::vector patterns; | | {} ../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 197 | void add(std::string_view pattern) | ^ | static ../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | [[nodiscard]] auto matches(const std::optional & peerCommonName) const -> bool | ^ ~~~~~ | static ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 ../src/path-info-wire.hh:24:5: error: variable 'sink' of type 'nix::StringSink' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 24 | nix::StringSink sink; | ^ | const ../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] 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/pump.hh:65:31: note: the first parameter in the range is 'sourceFd' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~~~~~~ ../src/pump.hh:65:57: note: the last parameter in the range is 'buf' 65 | inline auto readCoalesced(int sourceFd, std::span buf) -> ssize_t | ^~~ ../src/pump.hh:72:19: error: variable 'ready' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 72 | int const ready = ::poll(&pollFd, 1, got == 0 ? -1 : 0); | ^ | = 0 ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 77 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 90 | return static_cast(got); // EOF; caller sees short (possibly zero) batch | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 95 | return got != 0 ? static_cast(got) : -1; | ^ ../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] 97 | return static_cast(got); | ^ >>> /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy --use-color -quiet -p /build/source/build /build/source/src/daemon/coordinator.cc Errors encountered while running clang-tidy /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 5: 182: not found /nix/store/82lxfl0n7xgxbigbbj84w73qcy4ps0i8-clang-tools-22.1.8/bin/clang-tidy: line 23: 182: not found Error while processing /build/source/src/daemon/coordinator.cc. ../src/build-log.hh:66:8: error: constructor does not initialize these fields: text [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 66 | struct BuildEvent | ^ 67 | { 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; 69 | std::string text; | | {} ../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] 68 | enum class Kind : std::uint8_t { line, phase } kind = Kind::line; | ^ ../src/client/channel.hh:46:3: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 46 | explicit StaticHeaders(std::shared_ptr headers) : headers(std::move(headers)) {} | ^ ../src/client/channel.hh:62:5: error: constructor does not initialize these fields: headers [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 62 | explicit Factory(Headers hdrs) : headers(std::make_shared(std::move(hdrs))) {} | ^ 63 | auto CreateClientInterceptor(grpc::experimental::ClientRpcInfo * /*info*/) 64 | -> grpc::experimental::Interceptor * override { 65 | return new StaticHeaders(headers); // NOLINT(cppcoreguidelines-owning-memory): gRPC deletes it 66 | } 67 | private: 68 | std::shared_ptr headers; | | {} ../src/client/channel.hh:80:3: error: constructor does not initialize these fields: path [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 77 | std::string path; | | {} 78 | 79 | public: 80 | explicit TokenFileCredentials(std::string path) : path(std::move(path)) {} | ^ ../src/client/channel.hh:85:8: error: method 'GetMetadata' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 85 | auto GetMetadata(grpc::string_ref /*serviceUrl*/, grpc::string_ref /*methodName*/, | ^ | static ../src/client/channel.hh:87:64: error: pointer parameter 'metadata' can be pointer to const [readability-non-const-parameter,-warnings-as-errors] 87 | std::multimap * metadata) -> grpc::Status override { | ^ | const ../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] 22 | enum class Role : std::uint8_t { | ^ ../src/daemon/acl.hh:51:7: error: constructor does not initialize these fields: rules, anonRole [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 51 | class Acl | ^ 52 | { 53 | struct Rule 54 | { 55 | std::string pattern; 56 | Role role; 57 | }; 58 | 59 | std::vector rules; | | {} 60 | // Separate from the glob rules so '*' cannot grant anonymous access. 61 | std::optional anonRole; | | {} ../src/daemon/acl.hh:53:12: error: constructor does not initialize these fields: pattern, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Rule | ^ 54 | { 55 | std::string pattern; | | {} ../src/daemon/acl.hh:70:10: error: method 'addRule' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 70 | void addRule(std::string_view spec) | ^ | static ../src/daemon/acl.hh:95:24: error: method 'roleFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 95 | [[nodiscard]] auto roleFor(const std::optional & commonName) const -> std::optional | ^ ~~~~~ | static ../src/daemon/auth.hh:19:8: error: constructor does not initialize these fields: role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | struct Caller | ^ 20 | { 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; 22 | std::string name = "-"; // cert CN or oidc::, for logs and metrics 23 | std::optional role; | | {} ../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] 21 | enum class Kind : std::uint8_t { anonymous, named, badToken }; | ^ ../src/daemon/backend.hh:53:8: error: constructor does not initialize these fields: socketPath [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 53 | struct Backends | ^ 54 | { 55 | std::string socketPath; | | {} ../src/daemon/backend.hh:82:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 82 | if (event.kind == BuildEvent::Kind::phase) { | ^ ../src/daemon/backend.hh:84:7: note: else branch starts here 84 | } else { | ^ ../src/daemon/cache.hh:43:5: error: constructor does not initialize these fields: remote [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 40 | std::optional remote; | | {} 41 | 42 | public: 43 | explicit Cache(const Niks3Config & cfg) | ^ ../src/daemon/cache.hh:61:24: error: method 'present' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 61 | [[nodiscard]] auto present(const std::vector & keys) -> std::unordered_set | ^ | static ../src/daemon/cache.hh:87:10: error: method 'publish' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^ | static ../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] 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:87:51: note: the first parameter in the range is 'paths' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~ ../src/daemon/cache.hh:87:76: note: the last parameter in the range is 'cancelled' 87 | auto publish(const std::vector & paths, const Cancelled & cancelled = never) -> PushProcess::Signatures | ^~~~~~~~~ ../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] 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/cache.hh:97:71: note: the first parameter in the range is 'paths' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~ ../src/daemon/cache.hh:97:96: note: the last parameter in the range is 'cancelled' 97 | void publish(nix::Store & store, const std::vector & paths, const Cancelled & cancelled = never) | ^~~~~~~~~ ../src/daemon/cache.hh:113:10: error: method 'completeRefs' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 113 | void completeRefs(nix::Store & store, const nix::ValidPathInfo & info) const | ^ ~~~~~ | static ../src/daemon/coordinator.cc:25:1: error: included header create_channel.h is not used directly [misc-include-cleaner,-warnings-as-errors] 25 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | #include ../src/daemon/coordinator.cc:27:1: error: included header credentials.h is not used directly [misc-include-cleaner,-warnings-as-errors] 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | #include ../src/daemon/coordinator.cc:28:1: error: included header tls_certificate_provider.h is not used directly [misc-include-cleaner,-warnings-as-errors] 28 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 | #include ../src/daemon/coordinator.cc:34:1: error: included header status.h is not used directly [misc-include-cleaner,-warnings-as-errors] 34 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 | #include ../src/daemon/coordinator.cc:35:1: error: included header sync_stream.h is not used directly [misc-include-cleaner,-warnings-as-errors] 35 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 | ../src/daemon/coordinator.cc:38:1: error: included header file-system.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 38 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | ../src/daemon/coordinator.cc:43:1: error: included header cache.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 43 | #include "cache.hh" | ^~~~~~~~~~~~~~~~~~~ 44 | #include "client/channel.hh" ../src/daemon/coordinator.cc:44:1: error: included header channel.hh is not used directly [misc-include-cleaner,-warnings-as-errors] 44 | #include "client/channel.hh" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 | #include "logfmt.hh" ../src/daemon/coordinator.cc:47:1: error: included header nix_remote.grpc.pb.h is not used directly [misc-include-cleaner,-warnings-as-errors] 47 | #include "nix_remote.grpc.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 48 | #include "nix_remote.pb.h" ../src/daemon/coordinator.cc:70:1: error: constructor does not initialize these fields: state, sendFn [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 70 | Builder::Builder(const Options & options, Metrics & metrics) | ^ ../src/daemon/coordinator.cc:91:15: error: method 'onRevoke' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void Builder::onRevoke(const nix::remote::Revoke & rev) | ^ ../src/daemon/coordinator.cc:112:15: error: method 'admit' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 112 | auto Builder::admit(const std::string & drvPath) -> std::optional | ^ | static ../src/daemon/coordinator.cc:125:15: error: method 'finished' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 125 | void Builder::finished( | ^ | static ../src/daemon/coordinator.cc:128:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 128 | const std::vector> & outputs, | ^ | /*unused*/ ../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] 152 | const std::string & drvPath, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 | uint64_t assignId, | ~~~~~~~~~~~~~~~~~ ../src/daemon/coordinator.cc:152:25: note: the first parameter in the range is 'drvPath' 152 | const std::string & drvPath, | ^~~~~~~ ../src/daemon/coordinator.cc:153:14: note: the last parameter in the range is 'assignId' 153 | uint64_t assignId, | ^~~~~~~~ ../src/daemon/coordinator.cc:152:5: note: 152 | const std::string & drvPath, | ^ ../src/daemon/coordinator.cc:153:5: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 153 | uint64_t assignId, | ^ ../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') ../src/daemon/coordinator.cc:155:55: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 155 | const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/coordinator.cc:195:15: error: method 'setDraining' can be made const [readability-make-member-function-const,-warnings-as-errors] 195 | void Builder::setDraining(bool draining) | ^ | const ../src/daemon/coordinator.cc:210:15: error: method 'send' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | auto Builder::send(const WorkerMsg & msg) const -> bool | ^ ~~~~~ ../src/daemon/coordinator.cc:216:15: error: method 'tick' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 216 | void Builder::tick() | ^ ../src/daemon/coordinator.cc:292:5: error: variable 'tls' of type 'grpc::experimental::TlsChannelCredentialsOptions' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 292 | grpc::experimental::TlsChannelCredentialsOptions tls; | ^ | const ../src/daemon/coordinator.cc:296:24: error: no header providing "nix::Error" is directly included [misc-include-cleaner,-warnings-as-errors] 47 | throw nix::Error("loading CA certificates: %s", status.ToString()); | ^ ../src/daemon/coordinator.cc:321:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 321 | if (active) { | ^ ../src/daemon/coordinator.cc:323:7: note: else branch starts here 323 | } else { | ^ ../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] 340 | Coordinator::Coordinator(const Options & options, Auth & auth, Metrics & metrics) | ^ ../src/daemon/coordinator.cc:406:20: error: variable 'elect' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 406 | const bool elect = options.niks3.enabled() && (!builder || !options.schedulerAddr.empty()); | ^ | = false ../src/daemon/coordinator.cc:415:5: error: if with identical then and else branches [bugprone-branch-clone,-warnings-as-errors] 415 | if (options.schedulerAddr.empty()) { | ^ ../src/daemon/coordinator.cc:417:7: note: else branch starts here 417 | } else { | ^ ../src/daemon/coordinator.cc:455:9: error: variable 'restarting' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 455 | bool restarting = false; | ^ | const /build/source/build/../src/daemon/coordinator.hh:5:10: error: 'atomic' file not found [clang-diagnostic-error] 5 | #include | ^~~~~~~~ /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] 45 | struct Expected | ^ 46 | { 47 | uint64_t assignId = 0; 48 | Clock::time_point since; | | {} /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] 52 | struct Shared | ^ 53 | { 54 | std::mutex mutex; | | {} 55 | std::condition_variable cv; | | {} 56 | std::atomic revoked{false}; // scheduler moved the drv to a worker further along 57 | std::atomic attached{0}; // callers waiting in attach(); the build outlives its first caller for them 58 | bool finished = false; 59 | std::string resultWire; // BuildDerivationDone serialised | | {} /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] 80 | struct Admission | ^ 81 | { 82 | std::shared_ptr shared; | | {} /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] 91 | const std::vector> & outputs, | ^~~~~ /build/source/build/../src/daemon/coordinator.hh:95:5: error: function 'hello' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | auto hello() const -> nix::remote::WorkerMsg; | ^ | [[nodiscard]] /build/source/build/../src/daemon/coordinator.hh:108:5: error: function 'send' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 108 | auto send(const nix::remote::WorkerMsg & msg) const -> bool; | ^ | [[nodiscard]] /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] 111 | const Options & options; | ^ /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] 112 | Metrics & metrics; | ^ /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] 114 | struct State | ^ 115 | { 116 | std::unordered_map expected; | | {} /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] 128 | const std::vector> & outputs); | ^~~~~ ../src/daemon/dispatcher.hh:45:12: error: constructor does not initialize these fields: defaultSystem, present [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 45 | struct Config | ^ 46 | { 47 | std::string defaultSystem; // for Want/Hello with empty or "builtin" system | | {} 48 | PresentFn present; // unset: nothing is ever Cached | | {} ../src/daemon/dispatcher.hh:64:12: error: constructor does not initialize these fields: send [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 64 | struct Client | ^ 65 | { 66 | sched::ClientId id = 0; 67 | ClientSend send; | | {} ../src/daemon/dispatcher.hh:80:12: error: constructor does not initialize these fields: send, id [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 80 | struct Worker | ^ 81 | { 82 | WorkerSend send; | | {} 83 | std::optional id; | | {} ../src/daemon/dispatcher.hh:95:5: error: function 'sendLock' should be marked [[nodiscard]] [modernize-use-nodiscard,-warnings-as-errors] 95 | ABSL_LOCK_RETURNED(mutex) auto sendLock() const -> const absl::Mutex & | ^ | [[nodiscard]] /nix/store/0gyk1hdw37b47p2pra40hjf7xzl312lf-abseil-cpp-20260107.1-dev/include/absl/base/thread_annotations.h:170:31: note: expanded from macro 'ABSL_LOCK_RETURNED' 170 | #define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) | ^ ../src/daemon/metrics.hh:77:9: error: constructor does not initialize these fields: method, start [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 71 | std::string method; | | {} 72 | prometheus::Histogram * hist = nullptr; 73 | std::chrono::steady_clock::time_point start; | | {} 74 | 75 | public: 76 | // NOLINTNEXTLINE(bugprone-easily-swappable-parameters): method, then phase. 77 | Phase(Metrics & metrics, std::string method, const std::string & phase) | ^ ../src/daemon/metrics.hh:145:10: error: method 'buildInfo' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | void buildInfo( | ^ | static ../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] 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:146:29: note: the first parameter in the range is 'version' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~ ../src/daemon/metrics.hh:146:114: note: the last parameter in the range is 'features' 146 | const std::string & version, const std::string & worker, const std::string & system, const std::string & features) | ^~~~~~~~ ../src/daemon/metrics.hh:156:10: error: method 'buildSlots' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 156 | void buildSlots(unsigned count) | ^ | static ../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] 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:186:56: note: the first parameter in the range is 'system' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~~ ../src/daemon/metrics.hh:186:127: note: the last parameter in the range is 'count' 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^~~~~ ../src/daemon/metrics.hh:186:36: note: 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../src/daemon/metrics.hh:186:120: note: 'const int &' and 'size_t' parameters accept and bind the same kind of values 186 | [[nodiscard]] auto schedSystem(const std::string & system, const std::string & features, const std::string & kind, size_t count) const | ^ ../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') ../src/daemon/metrics.hh:205:5: error: constructor does not initialize these fields: exposer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | explicit Metrics(const std::string & listen) | ^ ../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] 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:213:39: note: the first parameter in the range is 'method' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~ ../src/daemon/metrics.hh:213:67: note: the last parameter in the range is 'commonName' 213 | void countRpc(const std::string & method, const std::string & commonName) | ^~~~~~~~~~ ../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] 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:218:47: note: the first parameter in the range is 'commonName' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~~~ ../src/daemon/metrics.hh:218:86: note: the last parameter in the range is 'bytesOut' 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^~~~~~~~ ../src/daemon/metrics.hh:218:27: note: 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../src/daemon/metrics.hh:218:59: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 218 | void countTunnelBytes(const std::string & commonName, uint64_t bytesIn, uint64_t bytesOut) | ^ ../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') ../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] 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/metrics.hh:224:44: note: the first parameter in the range is 'direction' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~~~~~ ../src/daemon/metrics.hh:224:96: note: the last parameter in the range is 'bytes' 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^~~~~ ../src/daemon/metrics.hh:224:24: note: 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../src/daemon/metrics.hh:224:87: note: 'const int &' and 'uint64_t' parameters accept and bind the same kind of values 224 | void countNarBytes(const std::string & direction, const std::string & commonName, uint64_t bytes) | ^ ../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') ../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] 17 | struct Niks3Config | ^ 18 | { 19 | std::string url; | | {} 20 | std::string tokenFile; // bearer, optional | | {} 21 | std::string clientCert; // mTLS, optional | | {} 22 | std::string clientKey; | | {} 23 | PushProcess::Argv pushArgv; | | {} ../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] 34 | std::string baseUrl; | | {} 35 | std::shared_ptr bearer; | | {} 36 | std::string clientCert; | | {} 37 | std::string clientKey; | | {} 38 | 39 | public: 40 | explicit Niks3Client(const Niks3Config & cfg) | ^ ../src/daemon/niks3-client.hh:53:24: error: method 'post' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ~~~~~ | static ../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] 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/niks3-client.hh:53:46: note: the first parameter in the range is 'path' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:75: note: the last parameter in the range is 'body' 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^~~~ ../src/daemon/niks3-client.hh:53:52: note: 'int' and 'const int &' parameters accept and bind the same kind of values 53 | [[nodiscard]] auto post(std::string_view path, const nlohmann::json & body) const -> std::unique_ptr | ^ ../src/daemon/oidc.hh:60:8: error: constructor does not initialize these fields: subject, role [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 60 | struct Identity | ^ 61 | { 62 | std::string subject; // "oidc::" | | {} 63 | std::optional role; // nullopt: verified but no rule matched | | {} ../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] 76 | } catch (...) { | ^ ../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] 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:123:46: note: the first parameter in the range is 'name' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../src/daemon/oidc.hh:123:65: note: the last parameter in the range is 'prov' 123 | inline auto providerFrom(const std::string & name, const Json & prov, bool allowInsecure) -> Provider | ^~~~ ../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] 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:191:38: note: the first parameter in the range is 'claims' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~~~ ../src/daemon/oidc.hh:191:63: note: the last parameter in the range is 'name' 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^~~~ ../src/daemon/oidc.hh:191:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 191 | inline auto lookupClaim(const Json & claims, std::string_view name) -> const Json * | ^ ../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] 251 | struct Jwk | ^ 252 | { 253 | std::string kid; | | {} 254 | std::string kty; | | {} 255 | std::string crv; | | {} 256 | std::string pem; | | {} ../src/daemon/oidc.hh:286:31: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 286 | if (jwk.kty == "RSA") { | ^ ../src/daemon/oidc.hh:288:10: note: end of the original 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:288:37: note: clone 1 starts here 288 | } else if (jwk.kty == "EC") { | ^ ../src/daemon/oidc.hh:290:62: note: clone 2 starts here 290 | } else if (jwk.kty == "OKP" && jwk.crv == "Ed25519") { | ^ ../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] 294 | } catch (...) { | ^ ../src/daemon/oidc.hh:300:8: error: constructor does not initialize these fields: at [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 300 | struct FixedClock | ^ 301 | { 302 | std::chrono::system_clock::time_point at; | | {} ../src/daemon/oidc.hh:347:12: error: constructor does not initialize these fields: identity, error [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 347 | struct Result | ^ 348 | { 349 | std::optional identity; | | {} 350 | std::string error; // for logs, not for the client | | {} ../src/daemon/oidc.hh:355:5: error: constructor does not initialize these fields: refetchOnMiss, keys [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 355 | explicit Verifier(Config cfg, std::chrono::seconds refetchOnMiss = defaultRefetchOnMiss) | ^ ../src/daemon/oidc.hh:363:10: error: method 'verify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ | static ../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] 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:363:37: note: the first parameter in the range is 'token' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~~~ ../src/daemon/oidc.hh:363:82: note: the last parameter in the range is 'now' 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^~~ ../src/daemon/oidc.hh:363:44: note: 'const int &' and 'int' parameters accept and bind the same kind of values 363 | auto verify(const std::string & token, std::chrono::system_clock::time_point now = std::chrono::system_clock::now()) -> Result | ^ ../src/daemon/oidc.hh:377:12: error: constructor does not initialize these fields: lock, keys, fetched [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 377 | struct KeySet | ^ 378 | { 379 | std::mutex lock; | | {} 380 | std::vector keys; | | {} 381 | // steady_clock starts at boot on Linux, so its epoch is not "long ago". 382 | std::optional fetched; | | {} ../src/daemon/oidc.hh:397:24: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 397 | [[nodiscard]] auto get(const Provider & provider, const std::string & url) const -> Json | ^ ~~~~~ | static ../src/daemon/oidc.hh:417:24: error: method 'fetchKeys' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 417 | [[nodiscard]] auto fetchKeys(const Provider & provider) const -> std::vector | ^ ~~~~~ | static ../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] 442 | std::optional fetched, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 443 | std::chrono::steady_clock::time_point now, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:442:62: note: the first parameter in the range is 'fetched' 442 | std::optional fetched, | ^~~~~~~ ../src/daemon/oidc.hh:443:47: note: the last parameter in the range is 'now' 443 | std::chrono::steady_clock::time_point now, | ^~~ ../src/daemon/oidc.hh:456:10: error: method 'candidates' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^ | static ../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] 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~~~~~~~~~~~~~~~~~~ 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:456:78: note: the first parameter in the range is 'token' 456 | auto candidates(const Provider & provider, KeySet & set, const Decoded & token, | ^~~~~ ../src/daemon/oidc.hh:457:59: note: the last parameter in the range is 'now' 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^~~ ../src/daemon/oidc.hh:457:21: note: 'const int &' and 'int' parameters accept and bind the same kind of values 457 | std::chrono::system_clock::time_point now) -> VerifierBuilder | ^ ../src/daemon/oidc.hh:493:10: error: method 'doVerify' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ | static ../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] 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/oidc.hh:493:39: note: the first parameter in the range is 'token' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~~~ ../src/daemon/oidc.hh:493:84: note: the last parameter in the range is 'now' 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^~~ ../src/daemon/oidc.hh:493:46: note: 'const int &' and 'int' parameters accept and bind the same kind of values 493 | auto doVerify(const std::string & token, std::chrono::system_clock::time_point now) -> Result | ^ ../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] 21 | struct Options | ^ 22 | { 23 | std::string listen = "0.0.0.0:50051"; 24 | std::optional idleTimeout; | | {} 25 | std::string socketPath = "/nix/var/nix/daemon-socket/socket"; 26 | // Store URI for the native bulk RPCs. Defaults to the proxy socket. 27 | std::string storeUri; | | {} 28 | std::string tlsCert; | | {} 29 | std::string tlsKey; | | {} 30 | std::string clientCA; | | {} 31 | std::string metricsListen; | | {} 32 | std::string workerName; | | {} 33 | LogLevel logLevel = LogLevel::info; 34 | Acl acl; 35 | xfcc::TrustedProxies proxies; 36 | std::string oidcConfig; | | {} ../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] 61 | explicit PushProcess(Argv argv) | ^ ../src/daemon/push.hh:86:10: error: method 'pushWait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^ | static ../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] 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/push.hh:86:52: note: the first parameter in the range is 'paths' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~ ../src/daemon/push.hh:86:77: note: the last parameter in the range is 'cancelled' 86 | auto pushWait(const std::vector & paths, const Cancelled & cancelled = never) -> Signatures | ^~~~~~~~~ ../src/daemon/push.hh:123:16: error: constructor does not initialize these fields: message, signatures [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 123 | struct Result | ^ 124 | { 125 | std::string status = "ok"; 126 | std::string message; | | {} 127 | Signatures signatures; | | {} ../src/daemon/push.hh:130:9: error: constructor does not initialize these fields: sync, done [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 130 | explicit Pending(size_t count) | ^ ../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] 136 | struct Ack | ^ 137 | { 138 | std::string status; | | {} 139 | std::string message; | | {} 140 | std::string path; | | {} 141 | std::set signatures; | | {} ../src/daemon/push.hh:144:14: error: method 'ack' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 144 | auto ack(Ack msg) -> bool | ^ | static ../src/daemon/push.hh:147:37: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors] 147 | if (msg.status != "ok") { | ^ ../src/daemon/push.hh:150:14: note: end of the original 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:150:49: note: clone 1 starts here 150 | } else if (!msg.signatures.empty()) { | ^ ../src/daemon/push.hh:162:14: error: method 'fail' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 162 | void fail(const std::string & message) | ^ | static ../src/daemon/push.hh:171:14: error: method 'wait' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 171 | auto wait(const Cancelled & cancelled) -> Result | ^ | static ../src/daemon/push.hh:184:16: error: constructor does not initialize these fields: left [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 184 | struct Inner | ^ 185 | { 186 | size_t left; | | {} ../src/daemon/push.hh:193:12: error: constructor does not initialize these fields: stdinFd [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 193 | struct State | ^ 194 | { 195 | nix::Pid pid; 196 | std::shared_ptr stdinFd; | | {} ../src/daemon/push.hh:206:10: error: method 'ensureChild' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 206 | void ensureChild(nix::Sync::WriteLock & lck) | ^ | static ../src/daemon/push.hh:237:10: error: method 'readAcks' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 237 | void readAcks(int acksFd) | ^ | static ../src/daemon/sched-reactor.hh:28:8: error: constructor does not initialize these fields: queue [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 28 | struct SendQueue | ^ 29 | { 30 | // About a minute of Expects at full rate. Beyond it the peer is stuck. 31 | static constexpr size_t limit = 1U << 16U; 32 | // Messages per Write. 33 | static constexpr int maxBatch = 1024; 34 | 35 | // Leaf lock, may be taken inside Dispatcher::mutex. 36 | absl::Mutex mutex; 37 | std::deque queue ABSL_GUARDED_BY(mutex); | {} ../src/daemon/sched-reactor.hh:58:5: error: constructor does not initialize these fields: sendq [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 58 | explicit SchedReactorBase(grpc::CallbackServerContext * ctx) | ^ ../src/daemon/sched-reactor.hh:69:13: error: variable 'kick' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 69 | bool kick = false; | ^ | const ../src/daemon/sched-reactor.hh:153:9: error: variable 'have' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 153 | bool have = false; | ^ | const ../src/daemon/sched-reactor.hh:183:9: error: variable 'fin' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 183 | bool fin = false; | ^ | const ../src/daemon/sched-reactor.hh:206:5: error: constructor does not initialize these fields: client [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 206 | ScheduleReactor(grpc::CallbackServerContext * ctx, Dispatcher & disp) | ^ ../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] 226 | Dispatcher & disp; | ^ ../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] 255 | Dispatcher & disp; | ^ ../src/daemon/scheduler.hh:65:7: error: constructor does not initialize these fields: pos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 65 | class IndexedHeap | ^ 66 | { 67 | std::vector> heap; 68 | std::vector pos; | | {} ../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] 71 | void place(size_t idx, std::pair item) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:71:23: note: the first parameter in the range is 'idx' 71 | void place(size_t idx, std::pair item) | ^~~ ../src/daemon/scheduler.hh:71:53: note: the last parameter in the range is 'item' 71 | void place(size_t idx, std::pair item) | ^~~~ ../src/daemon/scheduler.hh:71:16: note: 71 | void place(size_t idx, std::pair item) | ^ ../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') 71 | void place(size_t idx, std::pair item) | ^ ../src/daemon/scheduler.hh:77:10: error: method 'siftUp' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 77 | void siftUp(size_t idx) | ^ | static ../src/daemon/scheduler.hh:91:10: error: method 'siftDown' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 91 | void siftDown(size_t idx) | ^ | static ../src/daemon/scheduler.hh:94:22: error: variable 'len' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 94 | const size_t len = heap.size(); | ^ | = 0 ../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] 131 | void set(DrvId drv, double key) | ^~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:131:20: note: the first parameter in the range is 'drv' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:32: note: the last parameter in the range is 'key' 131 | void set(DrvId drv, double key) | ^~~ ../src/daemon/scheduler.hh:131:14: note: 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:131:25: note: 'DrvId' and 'double' may be implicitly converted: 'DrvId' (as 'unsigned int') -> 'double', 'double' -> 'DrvId' (as 'unsigned int') 131 | void set(DrvId drv, double key) | ^ ../src/daemon/scheduler.hh:174:7: error: constructor does not initialize these fields: free, pos, tracked [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 174 | class FreeIndex | ^ 175 | { 176 | public: 177 | static constexpr int32_t maxSlots = 63; 178 | 179 | private: 180 | std::vector free; // may go negative (draining below running) | | {} 181 | std::vector pos; | | {} 182 | std::vector tracked; | | {} ../src/daemon/scheduler.hh:191:10: error: method 'check' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 191 | void check(WorkerId wid) const | ^ ~~~~~ | static ../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] 221 | void set(WorkerId wid, int32_t val) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:221:23: note: the first parameter in the range is 'wid' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:36: note: the last parameter in the range is 'val' 221 | void set(WorkerId wid, int32_t val) | ^~~ ../src/daemon/scheduler.hh:221:14: note: 221 | void set(WorkerId wid, int32_t val) | ^ ../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') 221 | void set(WorkerId wid, int32_t val) | ^ ../src/daemon/scheduler.hh:272:8: error: constructor does not initialize these fields: clients [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 272 | struct Assign | ^ 273 | { 274 | DrvId drv = 0; 275 | WorkerId worker = 0; 276 | uint64_t assignId = 0; 277 | std::vector clients; | | {} ../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] 280 | struct Entry | ^ 281 | { 282 | std::string drvPath; | | {} 283 | std::vector inputs; // for locality only | | {} 284 | std::string system; | | {} 285 | std::vector features; // required | | {} 286 | std::vector followers; | | {} ../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] 293 | struct Worker | ^ 294 | { 295 | std::string addr; | | {} 296 | std::vector systems; | | {} 297 | std::vector features; | | {} 298 | int32_t maxJobs = 0; 299 | bool up = false; 300 | bool draining = false; 301 | std::vector running; | | {} ../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] 307 | explicit Core(Config cfg = {}) | ^ ../src/daemon/scheduler.hh:317:10: error: method 'drvId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 317 | auto drvId(std::string_view path) -> DrvId | ^ | static ../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] 323 | DrvId drv = 0; | ^ | const ../src/daemon/scheduler.hh:338:24: error: method 'findDrv' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 338 | [[nodiscard]] auto findDrv(std::string_view path) const -> std::optional | ^ ~~~~~ | static ../src/daemon/scheduler.hh:344:10: error: method 'workerId' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 344 | auto workerId(std::string_view addr) -> WorkerId | ^ | static ../src/daemon/scheduler.hh:365:24: error: method 'queued' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 365 | [[nodiscard]] auto queued() const -> size_t | ^ ~~~~~ | static ../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] 367 | size_t total = 0; | ^ | const ../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] 385 | struct WantInfo | ^ 386 | { 387 | std::string_view drvPath; | | {} 388 | std::vector inputs; | | {} 389 | std::string_view system; | | {} 390 | std::vector features; | | {} ../src/daemon/scheduler.hh:395:10: error: method 'want' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 395 | auto want(ClientId client, WantInfo info, double nowMs) -> WantResult | ^ | static ../src/daemon/scheduler.hh:429:10: error: method 'cancel' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ | static ../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] 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:429:26: note: the first parameter in the range is 'client' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~ ../src/daemon/scheduler.hh:429:51: note: the last parameter in the range is 'drvPath' 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^~~~~~~ ../src/daemon/scheduler.hh:429:17: note: 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:429:34: note: 'ClientId' and 'int' may be implicitly converted: 'ClientId' (as 'unsigned long') -> 'int', 'int' -> 'ClientId' (as 'unsigned long') 429 | auto cancel(ClientId client, std::string_view drvPath) -> std::optional | ^ ../src/daemon/scheduler.hh:463:10: error: method 'clientGone' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | static ../src/daemon/scheduler.hh:463:76: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 463 | void clientGone(ClientId client, std::vector> & revokes) | ^ | /*unused*/ ../src/daemon/scheduler.hh:478:12: error: constructor does not initialize these fields: addr, systems, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 478 | struct HelloInfo | ^ 479 | { 480 | std::string_view addr; | | {} 481 | std::vector systems; // first is the native one | | {} 482 | std::vector features; | | {} ../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] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:539:19: note: the first parameter in the range is 'wid' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~ ../src/daemon/scheduler.hh:539:41: note: the last parameter in the range is 'drvPath' 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^~~~~~~ ../src/daemon/scheduler.hh:539:10: note: 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:24: note: 'WorkerId' and 'int' may be implicitly converted: 'WorkerId' (as 'unsigned int') -> 'int', 'int' -> 'WorkerId' (as 'unsigned int') 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ ../src/daemon/scheduler.hh:539:105: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors] 539 | done(WorkerId wid, std::string_view drvPath, const std::vector> & outputs) | ^ | /*unused*/ ../src/daemon/scheduler.hh:604:24: error: method 'placeable' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 604 | [[nodiscard]] auto placeable(DrvId drv) const -> bool | ^ ~~~~~ | static ../src/daemon/scheduler.hh:610:12: error: constructor does not initialize these fields: system, features [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 610 | struct StatsKey | ^ 611 | { 612 | std::string system; | | {} 613 | std::string features; // sorted, comma-joined | | {} ../src/daemon/scheduler.hh:704:10: error: method 'retire' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 704 | void retire(DrvId drv) | ^ | static ../src/daemon/scheduler.hh:716:10: error: method 'rememberBuilder' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ | static ../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] 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/daemon/scheduler.hh:716:43: note: the first parameter in the range is 'path' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~~ ../src/daemon/scheduler.hh:716:58: note: the last parameter in the range is 'wid' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^~~ ../src/daemon/scheduler.hh:716:26: note: 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:716:49: note: 'int' and 'WorkerId' may be implicitly converted: 'int' -> 'WorkerId' (as 'unsigned int'), 'WorkerId' (as 'unsigned int') -> 'int' 716 | void rememberBuilder(std::string_view path, WorkerId wid, uint64_t size) | ^ ../src/daemon/scheduler.hh:774:24: error: method 'freeOf' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 774 | [[nodiscard]] auto freeOf(WorkerId wid) const -> int32_t | ^ ~~~~~ | static ../src/daemon/scheduler.hh:784:10: error: method 'refreshFree' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 784 | void refreshFree(WorkerId wid) | ^ | static ../src/daemon/scheduler.hh:810:24: error: method 'emptiestFor' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 810 | [[nodiscard]] auto emptiestFor(const Entry & ent) const -> std::optional | ^ ~~~~~ | static ../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] 865 | return picked; | ^ ../src/daemon/token-file.hh:21:12: error: constructor does not initialize these fields: token [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 21 | struct Cached | ^ 22 | { 23 | std::string token; | | {} ../src/daemon/token-file.hh:39:5: error: constructor does not initialize these fields: path, cached [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 19 | nix::Sync cached; | | {} 20 | 21 | static auto mtime(const struct stat & info) -> struct timespec 22 | { 23 | #ifdef __APPLE__ 24 | return info.st_mtimespec; 25 | #else 26 | return info.st_mtim; 27 | #endif 28 | } 29 | 30 | public: 31 | explicit TokenFile(std::string path_) | ^ ../src/daemon/token-file.hh:46:10: error: method 'get' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 46 | auto get() -> std::string | ^ | static ../src/daemon/xfcc.hh:32:5: error: constructor does not initialize these fields: rest [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 29 | std::string_view rest; | | {} 30 | 31 | public: 32 | explicit Cursor(std::string_view input) | ^ ../src/daemon/xfcc.hh:47:10: error: method 'take' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 47 | auto take() -> char | ^ | static ../src/daemon/xfcc.hh:52:20: error: variable 'chr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 52 | char const chr = rest.front(); | ^ | = 0 ../src/daemon/xfcc.hh:58:10: error: method 'until' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 58 | auto until(std::string_view stops) -> std::optional | ^ | static ../src/daemon/xfcc.hh:69:10: error: method 'remaining' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 69 | auto remaining() -> std::string_view | ^ | static ../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] 150 | inline auto subjectCommonName(std::string_view value) -> std::optional | ^ ../src/daemon/xfcc.hh:192:7: error: constructor does not initialize these fields: patterns [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] 192 | class TrustedProxies | ^ 193 | { 194 | std::vector patterns; | | {} ../src/daemon/xfcc.hh:197:10: error: method 'add' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 197 | void add(std::string_view pattern) | ^ | static ../src/daemon/xfcc.hh:210:24: error: method 'matches' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 210 | [[nodiscard]] auto matches(const std::optional & peerCommonName) const -> bool | ^ ~~~~~ | static ../src/http.hh:81:10: error: method 'header' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 81 | void header(const std::string & line) | ^ | static ../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] 65 | Call(std::string url_, const std::string & bearer, const std::optional & body) | ^ ../src/http.hh:129:10: error: method 'perform' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 129 | auto perform() -> long | ^ | static ../src/http.hh:145:24: error: method 'retryAfter' can be made static [readability-convert-member-functions-to-static,-warnings-as-errors] 145 | [[nodiscard]] auto retryAfter() const -> std::chrono::seconds | ^ ~~~~~ | static ../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] 23 | inline auto logfmtValue(std::string_view value) -> std::string | ^ ../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] 52 | enum class LogLevel : std::uint8_t { info, debug }; | ^ ../src/nix-compat.hh:293:3: error: variable 'dynamic' of type 'bool' can be declared 'const' [misc-const-correctness,-warnings-as-errors] 293 | bool dynamic = false; | ^ | const ../src/nix-compat.hh:296:23: error: variable 'srcs' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors] 296 | nix::StorePathSet srcs; | ^ | = 0 FAILED: [code=1] meson-internal__clang-tidy /nix/store/jaa89dphx07w3r26y7gh79a7b1mld5p4-meson-1.10.2/bin/meson --internal clangtidy /build/source /build/source/build --color always ninja: build stopped: subcommand failed.