vezel-dev / zig-sdk

An MSBuild SDK for building Zig, C, and C++ projects using the Zig compiler.

Home Page:https://docs.vezel.dev/zig-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 to WarningLevel? Or should we maybe use AnalysisLevel/AnalysisMode?
  • 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.