-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Verify that the CheckID is the same as the filename and classname in the Check class #8690
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
…me in the Check class
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #8690 +/- ##
===========================================
- Coverage 89.27% 75.90% -13.38%
===========================================
Files 202 72 -130
Lines 18470 5039 -13431
===========================================
- Hits 16490 3825 -12665
+ Misses 1980 1214 -766
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
b648d9a to
b384718
Compare
…me in the Check class (#8690) Co-authored-by: angelolmn <e.angelolm#go.ugr.es> Co-authored-by: César Arroba <[email protected]> Co-authored-by: Pepe Fagoaga <[email protected]>
Context
Ensure that the
CheckID, the class name and the file name where the check is defined all match. This corresponds to a TODO comment in the fileprowler/lib/check/model.py, specifically in the__init__method of the classCheck.Description
Add name consistency control at the end of the method. In case that names do not match, it is logged with 'logger.error'. There are some aspects to consider:
CheckIDis modified it does not break the execution itself, only the Check ID in the output is changed..jsonfile is not recognized and the execution aborts.logger.critical, but I am not sure if it is that relevant.Checklist
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.