refactor(config): centralize supported config keys
Description
Centralizes the user-facing list of supported ocr config set keys in supportedConfigKeys.
The unknown-config-key error now derives its supported-key list from this single definition, preventing the help text from drifting when configuration options change. Existing CLI behavior and error-message content are preserved.
Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [x] Refactoring (no functional changes)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] CI / Build / Tooling
How Has This Been Tested?
- [x]
make testpasses locally - [ ] Manual testing (not applicable)
Additional focused test:
go test ./cmd/opencodereview -run TestSetConfigValueUnknownKey
Checklist
- [x] My code follows the project's coding style (
go fmt,go vet) - [x] I have performed a self-review of my code
- [x] I have added tests that prove my fix is effective or my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] I have updated the documentation accordingly (not applicable)
- [x] I have signed the CLA
Related Issues
Closes #637
✅ OpenCodeReview: No comments generated. Looks good to me.
Thanks for the contribution! This has already been addressed by #655 (merged on Aug 1), which makes the same change. Since both PRs place supportedConfigKeys at different locations in the file, GitHub shows no merge conflict — but merging this would result in a duplicate variable definition and a compile error. Closing as superseded.