-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
[ADD] checkers: category-allowed #459
[ADD] checkers: category-allowed #459
Conversation
Thank you! I like this new lint since the default values are empty so it could be enabled explicitly but disable implicitly So 👍 @luisg123v could you review it, please? |
"type": "csv", | ||
"metavar": "<comma separated values>", | ||
"default": DFTL_CATEGORY_ALLOWED, | ||
"help": "List of category allowed in manifest file, separated by a comma.", |
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.
"help": "List of category allowed in manifest file, separated by a comma.", | |
"help": "List of allowed categories in manifest file, separated by commas.", |
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.
Fixed
@@ -1007,6 +1019,17 @@ def visit_dict(self, node): | |||
if license_str and license_str not in self.linter.config.license_allowed: | |||
self.add_message("license-allowed", node=manifest_keys_nodes.get("license") or node, args=(license_str,)) | |||
|
|||
# Check category allowed | |||
category_str = manifest_dict.get("category", None) |
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.
Superfluous default value for get
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.
Fixed
Also, could you add a unittest, please? |
|
Will you able to re-take this work? |
@ThomasBinsfeld gentle nudge |
ce6aa80
to
e41a5cf
Compare
New check allowing to enforce the allowed Odoo modules categories. A list of coma-separated categories can be set under the category-allowed setting.
e41a5cf
to
f8b5c6c
Compare
Branch rebased and tests added ✔️ |
Thanks! |
Thank you! |
No description provided.