Skip to content
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

Avoid duplicating the default values of e.g. GitHubDefectsConfiguration.labelFilter #7955

Closed
sschuberth opened this issue Nov 29, 2023 · 1 comment
Labels
advisor About the advisor tool configuration About configuration topics enhancement Issues that are considered to be enhancements

Comments

@sschuberth
Copy link
Member

          This now duplicates the default value of `GitHubDefectsConfiguration.labelFilter`, which IMO is not so nice. In [my old draft](https://github.com/oss-review-toolkit/ort/pull/6613) I tried to [solve this by extracting default values to constants](https://github.com/oss-review-toolkit/ort/pull/6613/commits/0db7e0f29d750b6e336cff02658f1673b1e8673d#diff-c683de376a76556ce1a5c1d790017956b5726c1b270ca08a1e3e2d61a76054cdR106-R112) (not fully implemented, also see the last commit in that PR).

This raises the general question where default values should be applied. I see basically tree options:

  1. in parseConfig(),
  2. in the constructor of the output config class,
  3. in the consumer of the config class.

My current preference would be 1., and I'd propose a clean-up commit that removes the default parameters from GitHubDefectsConfiguration's constructor.

Originally posted by @sschuberth in #7690 (comment)

@sschuberth sschuberth added advisor About the advisor tool configuration About configuration topics enhancement Issues that are considered to be enhancements labels Nov 29, 2023
@sschuberth
Copy link
Member Author

Obsolete as of #8994.

@sschuberth sschuberth closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advisor About the advisor tool configuration About configuration topics enhancement Issues that are considered to be enhancements
Projects
None yet
Development

No branches or pull requests

1 participant