Consider `clang-format` and `clang-tidy` support
alexrp opened this issue · comments
In a similar vein to:
Unfortunately, Zig does not currently ship with these tools, so we would have to require users to install them.
Questions:
- Should we mandate a specific code style like
zig fmt
or let it be configurable? - Should we try to detect the presence of these tools on disk or just go ahead and invoke them if the user asked us to?
- Should
clang-tidy
be tied toWarningLevel
? Or should we maybe useAnalysisLevel
/AnalysisMode
?
For CI, we'd need to use: https://github.com/KyleMayes/install-llvm-action
- Code style: There's too much variation in the C/C++ world. Better to let it be configurable.
- Tool detection: There's virtually no precedent for doing this in the MSBuild world, so I think users would find it surprising. We should just invoke the tools if asked to and error out appropriately if they're missing.
Need to think more about where clang-tidy
integration would fit in.