Clang-tidy file for mlir-hlo?

I notice that the tensorflow repo doesn’t have a .clang-tidy file anywhere in its tree. Does anyone have a .clang-tidy file that conforms or nearly conforms to the TF coding style? I specifically need it for the mlir-hlo sub-tree (tensorflow/compiler/mlir/).

Note that the mlir-hlo subtree follows the LLVM coding style in theory (in practice it is a bit of a mix).

I don’t know about .clang-tidy, but for .clang-format TF just uses the Google style otherwise
.

Please check the semi-disclosure but old thread in:

/cc @mihaimaruseac @angerson

Thanks - I went through the thread, but I couldn’t still find a reference .clang-tidy to reuse.

Right. I’m aware of the .clang-format for mlir-hlo. But clang-tidy has a different role to play – for eg. in-editor warnings on variable naming style deviations via clangd. (clangd will read a .clang-tidy if there is one.)

The specific comment was:

Also you can see @Mehdi_AMINI commit at:

If your read both the links they have a clang-tidy pass in the internal repository but It was not exposed on the open source one.

I have no access to the internal repo but I suppose that for mlir-hlo they are using something like:

I have on my roadmap to add clang-tidy OSS for TF, but no ETA in sight, not high priority at the moment

1 Like

We can track this probably in: