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

Add a static source code analyser to our GitHub Actions #1963

Open
kripton opened this issue Apr 25, 2024 · 2 comments
Open

Add a static source code analyser to our GitHub Actions #1963

kripton opened this issue Apr 25, 2024 · 2 comments

Comments

@kripton
Copy link
Member

kripton commented Apr 25, 2024

As discussed during the PlugFest, OLA might benefit from running some kind of static code analysis.
While I'm perfectly open to alternatives, I do like how SonarQube / SonarCloud reports issues and there is GitHub Actions integration, including PR-annotation (as we currently do with codespell). Also, SonarCloud is free for Open Source projects:

SonarLint is completely free. SonarQube Community Edition is free. All other SonarQube editions are commercial and require a paid license. SonarCloud is entirely free for all open source projects. You only pay if you want to analyze private repositories.

(from https://www.sonarsource.com/open-source-editions/, FAQ entry "Are the products always free? ")

Thus, I would propose to enable SonarCloud integration for OLA.

@kripton
Copy link
Member Author

kripton commented Apr 25, 2024

If there are no objections (looking @peternewman :D), I would install the SonarCloud app into the ola repository using my account and permissions. See: https://github.com/apps/sonarcloud

@DaAwesomeP
Copy link
Member

This also goes along the lines of #1889 and #1890 which have been on the table for a bit. We should really get those reviewed/merged before considering more analysis otherwise the additional analysis may not result in improvements.

My personal C++ stack currently contains:

  • clang-tidy: This is a wonderful tool but would need rules to be slowly enabled and fixed for a repo of this size; I really like clangt-tidy and its rule-sets are very well-defined
  • -Werror: This seems like a given but often isn't on by default
  • iwyu (include what you use)
  • I used to do this string of checks, but clang-tidy handles these instead for me now: -Werror -Wextra -Wall -Wfloat-equal -Wconversion -Wparentheses -pedantic -Wunused-parameter -Wunused-variable -Wreturn-type -Wunused-function -Wredundant-decls -Wreturn-type -Wunused-value -Wswitch-default -Wuninitialized -Winit-self

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

No branches or pull requests

2 participants