-
Notifications
You must be signed in to change notification settings - Fork 3k
lgtm: Add initial LGTM configuration file #14713
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
Conversation
@Patater, thank you for your changes. |
Add a starter LGTM configuration file that tells LGTM what sort of files we have in Mbed OS, what dependencies need installing, how to configure, and how to build. We tell LGTM to build Mbed OS's unit tests for the host toolchain, as a start. We install pip so we can install pypi's version of CMake, which is newer than the current LGTM default version of 3.13.4.
Tested with "Test analysis configuration" feature of LGTM. https://lgtm.com/logs/87580de577fb17410d210bbc0459a58e5f4872c3/lang:cpp |
CI started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a nice addition, and a main point of building unit tests is to let LGTM find the code (instead of just testing, which we do in Travis).
What do Mbed OS maintainers think about this integration?
I am not that familiar with it, but looks useful to have.
How to read this test run, the C/C++ passed. What does it report? I can see it built the unittests and run some analysis (the log is large and dont see any 0 errors or warnings or something) ? It would be useful to introduce LGTM.com to us who has not used it before. |
I can't really review this as I have no context for what this is or is designed to do ? |
The test run shows that our LGTM file parsed correctly and that LGTM was able to do a build. It doesn't show you any of its static analysis results so far as I can tell. To get those, we'd need to merge the LGTM config file.
It's static analysis, like cppcheck or Coverity Scan. Mbed OS already uses it for analysis Python code, but the tool can't figure out how to build Mbed OS without a custom configuration file, hence this PR. You can see how it looks for C++ code by looking at the analysis of Mbed TLS. Here's how it looks currently for Mbed OS Python code. |
That's an option. I would want to see the results before deciding to do that.
This is already enabled, as no custom configuration was needed to get LGTM to analyze the Python code. You can see the Python results on LGTM. |
CI started |
Summary of changes
Add a starter LGTM configuration file that tells LGTM what sort of files
we have in Mbed OS, what dependencies need installing, how to configure,
and how to build.
We tell LGTM to build Mbed OS's unit tests for the host toolchain, as a
start.
We install pip so we can install pypi's version of CMake, which is newer
than the current LGTM default version of 3.13.4.
Impact of changes
None
Migration actions required
None
Documentation
None
Pull request type
Test results
Reviewers