Replies: 1 comment
-
|
The short answer is no, we don't have that tight integration with the C/C++ ecosystem. As you've discovered, you can use Please as a task runner to run commands via Another approach that might work would involve extending the C/C++ rules. Similar to how the Golang Please package driver works, we could output the compilation database info for each cc_library() rule as a sub-rule. For context, Golang has this concept of a package json file that describes something very similar i.e. all the source files in a particular translation unit which can be used by other tools to understand foreign build systems like Please. We have implemented this in the go rules by adding an internal By the way, there was a bit of discussion a while back about linters here, which you may find interesting: Nothing really happened off the back of this, but the idea was that rules would define lint actions so you'd just be able to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've liked the look of please for a while but have been working on Windows so it's not been possible to try it out. Now I'm back in the *nix world, I'm looking forward to getting my hands dirty with it.
I'm working with a very simple hello world in c++ and would like to do the following:
clang-formatand configure please to manually invoke it via a target.clang-tidyand configure please to manually invoke it via a target.cc_binarytarget.For
clang-format, I need to find all relevant files, which gives me a task a bit like this:I'd rather something like:
But that fails if there are no header files. How can I use please to recursively find all
c,cpp,cxx,h,hpp,hxx,inletc files and pass them as arguments toclang-format?Similarly, how can I do this for
clang-tidy?clang-tidyworks much better with a compilation database. CMake can generate a compilation database; is this something please is able to do or in the roadmap if not currently possible?How do I link these
sh_cmds to thecc_binarytarget as they're not tools in thetoolsfolder?Beta Was this translation helpful? Give feedback.
All reactions