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

More static code analysis in CI #62

Open
romangg opened this issue May 16, 2020 · 5 comments
Open

More static code analysis in CI #62

romangg opened this issue May 16, 2020 · 5 comments

Comments

@romangg
Copy link
Member

romangg commented May 16, 2020

Candidates:


Integration of clang-tools are separately tackled in #17. For code coverage tooling see #61.

@romangg
Copy link
Member Author

romangg commented Jun 14, 2020

In GitLab by @erreur404 on Jun 14, 2020, 14:03

Code Climage cannot be used because of antiagainst/codeclimate-cppcheck#33
and cppcheck plugin is community suported clearly Code climate is clearly not designed for c++

@romangg
Copy link
Member Author

romangg commented Jun 14, 2020

Thanks for the info. That's good to know. Maybe we should then strive for making use of lgtm. Or are there other candidates?

@romangg
Copy link
Member Author

romangg commented Jun 14, 2020

In GitLab by @erreur404 on Jun 14, 2020, 22:15

I know only coverity but i do not have the right to create project on the platform.

I have also searched how to use lgtm but i found nothing for add opensource project. Maybe we need to contact her by mail.

@romangg
Copy link
Member Author

romangg commented Jul 29, 2020

Coverity Scan has been setup now for KWinFT. Thanks @erreur404 for creating the project on this platform! I have now additionally setup a GitLab CI job in https://gitlab.com/kwinft/kwinft/-/merge_requests/32 to do regular nightly scans. Seems to work fine. With https://gitlab.com/kwinft/kwinft/-/merge_requests/29 landed we can check out tomorrow how the fixes affect the scan.

We can do something similar for Wrapland of course but I believe KWinFT was the most important project to start with.

Adding lgtm as a second service could be still a good idea. There is a help article about it working together with GitLab. One detail to note though is that the engine behind it was bought by Microsoft and that might indicate a focus on GitHub in the future. Still might work just fine on GitLab.

@romangg
Copy link
Member Author

romangg commented Feb 3, 2022

The above mentioned Gitlab integration with Code Climate/cppcheck is still something we aim for. But at the moment cppcheck segfaults with some of our code.

Backtrace provided by @tomenglund26:

tom@tom-nitro ~/dev/kwin/kwinft [git][kwinft/.][cleanupU]% cppcheck --enable=all input/control/device.cpp 
Checking input/control/device.cpp ...
input/control/config.h:28:29: performance: Function parameter 'key' should be passed by const reference. [passedByValue]
    config_data(std::string key,
                            ^
input/control/config.h:45:11: style: Variable 'config' can be declared with const [constVariable]
    auto& config = device->config;
          ^
[1]    145244 segmentation fault (core dumped)  cppcheck --enable=all input/control/device.cpp

This issue has been apparently already reported upstream (no link available to bug report right now though).

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

1 participant