nej: fix some clang-tidy lints
these are really annoying when running `just lint` with nej enabled. Change-Id: I8d35e77fe9905fdd6c28f95361f7431459079b96
This commit is contained in:
@@ -22,8 +22,7 @@ MyArgs::MyArgs(nix::AsyncIoRoot & aio) : MixCommonArgs("nix-eval-jobs"), aio_(ai
|
||||
if (hiddenCategories.count(flag->category)) {
|
||||
continue;
|
||||
}
|
||||
printf(" --%-20s %s\n", name.c_str(),
|
||||
flag->description.c_str());
|
||||
std::cout << nix::fmt(" --%-20s %s\n", name, flag->description);
|
||||
}
|
||||
::exit(0);
|
||||
}},
|
||||
|
||||
@@ -156,8 +156,7 @@ void worker(nix::ref<nix::eval_cache::CachingEvaluator> evaluator,
|
||||
break;
|
||||
}
|
||||
if (!s.starts_with("do ")) {
|
||||
fprintf(stderr, "worker error: received invalid command '%s'\n",
|
||||
s.data());
|
||||
std::cerr << "worker error: received invalid command '" << s << "'\n";
|
||||
abort();
|
||||
}
|
||||
auto path = nix::json::parse(s.substr(3));
|
||||
@@ -230,13 +229,13 @@ void worker(nix::ref<nix::eval_cache::CachingEvaluator> evaluator,
|
||||
reply["error"] = nix::filterANSIEscapes(msg, true);
|
||||
// Don't forget to print it into the STDERR log, this is
|
||||
// what's shown in the Hydra UI.
|
||||
fprintf(stderr, "%s\n", msg.c_str());
|
||||
std::cerr << msg << "\n";
|
||||
} catch ( // NOLINT(lix-foreign-exceptions)
|
||||
const std::exception &e) { // FIXME: for some reason the catch block
|
||||
// above, doesn't trigger on macOS (?)
|
||||
auto msg = e.what();
|
||||
reply["error"] = nix::filterANSIEscapes(msg, true);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
std::cerr << msg << "\n";
|
||||
}
|
||||
|
||||
if (tryWriteLine(to.get(), reply.dump()) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user