-
Notifications
You must be signed in to change notification settings - Fork 993
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
[question] Support for Code Quality Checks #14720
Comments
Hi @jsallay Thanks for your question!
Yes, I think the approach for this would depend if the instrumentation creates or not a different binary (not only side artifacts, but the actual library/binary is instrumented and could be slower, etc):
This might be a good case for the new "metadata files" feature (merged, but not documented or released yet). It allows to store extra files in recipes and packages, but those files are not downloaded at every package install, only on-demand to collect or inspect them if necessary. The plan is to launch this soon, maybe after 2.0.11. You might also capture the results from a hook, and upload them automatically or something like that, if you need a different storage. If you want your reports to be stored together with your packages in the server, then the "metadata files" might be a better solution. Please let me know if this helps, cheers! |
The metadata files sounds interesting. Can you link me to a PR or issue? |
Sure! It will be these PRs (already merged): And this one pending for next release: You can probably check and try with the already released functionality, last PR is not critical to give it a try Just beware that if uploading metadata to servers, Conan 1.X old versions might fetch it. Latest Conan 1.X has already provisions to ignore the metadata and not download it. |
I just want to double check how I would use this. Would I put files in the metadata folder during the |
I think the final result should be very similar, but as |
Thanks. This looks like exactly what I needed. I'll go ahead and close the issue. |
Good! Feedback over the metadata feature would be very appreciated. We will also make some announcement when it is documented and officially launched. Many thanks! |
What is your question?
What would be the best way to handle code quality tools in conan? For example, I may want to run a linter such as cpplint or lcov for test coverage when I build my package.
These tools will produce a report and may have a pass fail condition. I don't presently see a good way to integrate them into conan. I would imagine that the tools would be listed as
build_requirements
in the conanfile. I can handle the pass/fail aspect pretty easily.I see two problems though:
settings
. I don't need to run the coverage on every version. It would be nice to only enable it sometimes, kind of like unit tests.Is conan not really designed around this use case, am I missing something, or should this be a feature request? I presently doing all of my linting outside of conan, but I think it would be really helpful to encapsulate it all inside of the conanfile.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: