-
Notifications
You must be signed in to change notification settings - Fork 685
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
Introduce script shorthand to OVAL #10085
Conversation
The method OVALTester._expand_shorthand is a private method used as helper in the CTest test "macros-oval". But, it might be useful not only in this test, so we will move it to the ssg module and make it a public function.
Reduce code complexity to satisfy CodeClimate.
I have addressed the CodeClimate problem. |
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.
Thanks for the PR, and the changes look good. Could you add CTest that runs this script?
This is a simple end-to-end test for utils/shorthand_to_oval.py
Code Climate has analyzed commit 5e6ca9e and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 0.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 49.5% (-0.2% change). View more on Code Climate. |
/packit retest-failed |
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.
Thanks for the PR! This will be a great addition to the project!
Waving the CodeClimate findings as one, they related to the reorganization of code, and two there are end to end tests for the new code. |
Description:
Introduce a small script
shorthand_to_oval.py
that converts (resolved) shorthand OVAL files to a valid OVAL file.It's based on already existing code from the CTest test "macros-oval".
Rationale:
The script can be useful for example when creating minimal bug reproducers. If you know that a problem is located in OVAL for a specific rule, you can use it to convert a resolved shorthand OVAL files from the
build/product/checks/oval
directory to a standalone valid OVAL file that you can then pass tooscap
.Review Hints:
For more details, please read the commit messages of every commit.