Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to format/lint *.td/*.mlir files #3

Open
gglin001 opened this issue Aug 12, 2022 · 2 comments
Open

how to format/lint *.td/*.mlir files #3

gglin001 opened this issue Aug 12, 2022 · 2 comments

Comments

@gglin001
Copy link

gglin001 commented Aug 12, 2022

Hi, not sure if it's the right place, but I'm wondering how to format *.td and *.mlir files, is there a tool like clang-format to do this? Sorry, I didn't find anything helpful after searching

@lenary
Copy link
Member

lenary commented Aug 16, 2022

You can run tablegen files through clang-format, but I'm not sure how well-maintained its tablegen formatter is.

If this is the expected way to format tablegen files, then it would be nice to expose that in the extension.

@bondhugula
Copy link

There is some discussion here on formatting tablegen files: https://discourse.llvm.org/t/formating-mlir-tablegen-code/60767
Region-based formatting within editors (driven by clang-format) in certain situations should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants