-
Notifications
You must be signed in to change notification settings - Fork 154
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
Refactor CliArguments
to conform to RepoConfiguration
's Builder Pattern
#2117
Labels
Comments
ckcherry23
pushed a commit
that referenced
this issue
Mar 2, 2024
…uilder Pattern (#2118) Current implementation of the Builder pattern within `CliArguments` does not conform that in `RepoConfiguration`. Let's move to refactor `CliArguments` to reduce class attribute duplication across `CliArguments` and `CliArguments::Builder` and to enhance overall code quality.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What feature(s) would you like to see in RepoSense
Currently,
CliArguments
' Builder patterns is not in line with howRepoConfiguration
's Builder pattern was implemented.As observed in PR #2078, the Builder objects in the codebase are not being reused, and the Builder pattern was adopted as a way to reduce constructor complexity and increase flexibility in how we as developers can construct
RepoConfiguration
orCliArguments
objects. The current implementation of the Builder pattern forCliArguments
assumes thatBuilder
objects will be reused, but since this is not the case for most parts of the codebase, refactoring theBuilder
class might be beneficial for reducing duplication of class attributes and for increasing overall code equality.We could look into refactoring
CliArguments
in such a way that it conforms toRepoConfiguration
's implementation of the Builder pattern.Is the feature request related to a problem?
This refactoring is related to issue #2076 and PR #2078.
If possible, describe the solution
We can adopt the variation of the Builder pattern as detailed in #2078, by simplifying the Builder objects by storing an instance of
CliArguments
within theBuilder
object, and building into that instance directly, reducing attribute duplication.If applicable, describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: