Open ken-matsui opened 1 month ago
I hope it is alright if I started to implement an abstraction for std::system
(not yet complete). This is how it could be used: Command("cd").arg("poac").output()
That's great to hear, thank you for working on this!
However, we would like to avoid using malloc
family directly. Instead, let's use higher-level libraries, such as std::string
.
Sure, I have refactored it to use std::string
. I can create a draft pull request.
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pageId=87152177
We may want to implement a
Command
class to hide this complexity, like Rust'sstd::process::Command
.The only location we use
std::system
is currently the following (instead of takingstd::string_view
, let's take theCommand
class):https://github.com/poac-dev/poac/blob/7c4f62ef0902c763571cff39576c46c2bccb8827/src/Algos.cc#L44
After addressing this, we can enable
cert-env33-c
in clang-tidy:https://github.com/poac-dev/poac/blob/7c4f62ef0902c763571cff39576c46c2bccb8827/.clang-tidy#L14