Skip to content

Clang-Tidy Suggestions in Pull Requests #591

Open

Description

@ngober

Thanks, Nathan! I went ahead and refactored a bit, hopefully this is a little easier to work with and extend :) I also incorporated your suggestion into CompileCommandManfiest.save.

It would be nice to add tests somehow. One idea could be to add a GitHub action which generates these files and runs clang-tidy over the code to check for warnings/etc.

Originally posted by @cmolder in #576 (comment)

Is your feature request related to a problem? Please describe.
The LLVM system provides clang-tidy, a very useful static analysis tool. This tool can catch significant bugs and improve code style. I have used it locally in development. It would be useful to use it to automatically perform code reviews on pull requests.

Describe the solution you'd like
I would like a solution to have the following features:

  • Automatically run clang-tidy on pull requests
  • Do not spam unrelated suggestions: run clang-tidy only on the changes
  • Publish the results as comments on the PR
  • Stretch goal: provide fix-its as code suggestions

Describe alternatives you've considered

  • This GitHub Action provides the commenting capability, but doesn't run clang-tidy. They suggest to do it separately.
  • This Action performs the run, and claims to only do so on the changed code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions