-
Notifications
You must be signed in to change notification settings - Fork 17
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
Remove unused data keys #1227
Remove unused data keys #1227
Conversation
end | ||
end | ||
|
||
def hash_keys(hash, parent_keys: [], all_keys: []) |
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.
This implementation built upon a similar one in the IdP:
https://github.com/18F/identity-idp/blob/3e4246d/spec/i18n_spec.rb#L245-L256
(We don't care about the values here, only the keys)
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.
LGTM
Co-authored-by: Zach Margolis <[email protected]>
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.
LGTM
first_file_keys, *other_file_keys = keys | ||
first_file, first_keys = first_file_keys |
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.
At the risk of adding yet another dismissed review, one way to save a line and remove an intermediate variable
first_file_keys, *other_file_keys = keys | |
first_file, first_keys = first_file_keys | |
(first_file, first_keys), *other_file_keys = keys |
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.
Haha, yeah, the review dismissal really discourages feedback / iteration 😕
Fortunately, I think I prefer it as-is over the alternative. The multi-level destructuring feels a little hard to read, and this is a little more consistent with the _file_keys
pairing between "first" and "other", and the subsequent destructure of block parameters on line 11.
* Remove unused data keys * Remove debugger pry require * Compare all to first with clear aggregated error * Attribution Co-authored-by: Zach Margolis <[email protected]> --------- Co-authored-by: Zach Margolis <[email protected]>
* Remove unused data keys * Remove debugger pry require * Compare all to first with clear aggregated error * Attribution Co-authored-by: Zach Margolis <[email protected]> --------- Co-authored-by: Zach Margolis <[email protected]>
* Remove unused data keys * Remove debugger pry require * Compare all to first with clear aggregated error * Attribution Co-authored-by: Zach Margolis <[email protected]> --------- Co-authored-by: Zach Margolis <[email protected]>
* Remove unused data keys * Remove debugger pry require * Compare all to first with clear aggregated error * Attribution Co-authored-by: Zach Margolis <[email protected]> --------- Co-authored-by: Zach Margolis <[email protected]>
🛠 Summary of changes
Removes unused values from
settings.yml
files within_data
, and adds a test case to ensure that keys are consistent between all languages.Related comment: #1226 (comment)
Identifying lack of use required some manual effort, specifically searching
settings.[key]
📜 Testing Plan
Verify no lingering references in code to removed keys.