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

[FR]: Add clang-tidy #112

Open
alexeagle opened this issue Jan 20, 2024 · 4 comments
Open

[FR]: Add clang-tidy #112

alexeagle opened this issue Jan 20, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@alexeagle
Copy link
Member

What is the current behavior?

No response

Describe the feature

Followup to #101 suggested by @jsharpe

@alexeagle alexeagle added the enhancement New feature or request label Jan 20, 2024
@HarveyJMartin
Copy link

Hi, has there been any progress on the addition of this ?

@jsharpe
Copy link
Contributor

jsharpe commented Mar 21, 2024

I don't think anyone is actively working on this at the moment but checkout https://github.com/erenon/bazel_clang_tidy for something that might meet your needs / the basis for a contribution into this ruleset.

@peakschris
Copy link

@alexeagle do you have any guidance as to how this should be done? Should rules_lint reference bazel_clang_tidy, or should the aspect from bazel_clang_tidy be copied and pasted into rules_lint? (i note kind offer from bazel_clang_tidy owner, and also that bazel_clang_tidy seems to be under active development by the community)

Do you think clang-tidy fixes should be integrated similar to eslint with the patch files output and used for fixes?

@alexeagle
Copy link
Member Author

Right, I forgot about erenon/bazel_clang_tidy#35

I imagine that bazel_clang_tidy would be replaced by clang_tidy in rules_lint, so I wouldn't want to add a dependency from this repo to that one. Instead I'd suggest using their implementation as a reference, maybe some copy-paste code but only with understanding it.

Yes, fixes should be applied the same way we do for ruff and eslint already, just by running clang-tidy in its fix mode, and the resulting patch produced as an action by rules_lint.

@alexeagle alexeagle added the help wanted Extra attention is needed label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants