-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Try to implement exclude-search #102
base: main
Are you sure you want to change the base?
Conversation
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.
Hey @JakubAndrysek - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -40,6 +41,7 @@ class MkDoxy(BasePlugin): | |||
"doxygen-bin-path", | |||
config_options.Type(str, default="doxygen", required=False), | |||
), | |||
("exclude-search", config_options.Type(str, default=EXCLUDE_SEARCH_DISABLE, required=False)), |
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.
issue (code_clarification): Duplicate configuration option for 'exclude-search'.
The 'exclude-search' option is defined twice in the class 'MkDoxy', once for the plugin and once for each project. Consider consolidating these if they are intended to serve the same purpose or clarify the distinction if they serve different scopes.
@@ -85,6 +88,21 @@ | |||
elif strict and len(warnings) > 0: | |||
raise exceptions.Abort(f"Aborted with {len(warnings)} Configuration Warnings in 'strict' mode!") | |||
|
|||
checkExcludeSearch(proData.get("exclude-search", EXCLUDE_SEARCH_DISABLE), "project") |
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.
suggestion (code_refinement): Potential redundancy in default value specification.
The default value for 'exclude-search' is specified again in the 'get' method, which is redundant since it's already set in the configuration definition. Consider removing the default from the 'get' method to rely on the configuration's default.
checkExcludeSearch(proData.get("exclude-search", EXCLUDE_SEARCH_DISABLE), "project") | |
checkExcludeSearch(proData.get("exclude-search"), "project") |
@@ -27,7 +27,9 @@ | |||
class GeneratorBase: | |||
"""! Base class for all generators.""" | |||
|
|||
def __init__(self, templateDir: str = "", ignore_errors: bool = False, debug: bool = False): | |||
def __init__( | |||
self, templateDir: str = "", ignore_errors: bool = False, exclude_search: string = "no", debug: bool = False |
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.
issue (typo): Incorrect type hint for 'exclude_search'.
The type hint for 'exclude_search' should be 'str' instead of 'string'. Python uses 'str' for string type hints.
No description provided.