Make null: true and required: true the defaults, update CI Ruby versions#3612
Merged
Make null: true and required: true the defaults, update CI Ruby versions#3612
null: true and required: true the defaults, update CI Ruby versions#3612Conversation
Contributor
joelzwarrington
left a comment
There was a problem hiding this comment.
Does anyone have an opinion on this change? I've done the work to see if it's feasible (it seems to me like it is), and I see the advantage of it, but I'd love to hear any other takes on this idea. (Maybe even the defaults should be different?)
Agree with the change, and these defaults make it so that if it needs to change it won't result in a breaking change.
null: true and required: true the defaultsnull: true and required: true the defaults, run CI on Ruby 2.5
null: true and required: true the defaults, run CI on Ruby 2.5null: true and required: true the defaults, update CI Ruby versions
|
For the ones looking for the configuration to run/configure the rubocop cops mentioned in this PR this file has the answer :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, every field must have
null: trueornull: false. Likewise, every argument must haverequired: true/required: false. This is verbose, and I think we can recommend a better default. So in this branch:null: trueandrequired: trueare applied when those options are omitted. (I picked these because they can always be changed later, unlikenull: falseorrequired: false, which require breaking changes to change in the future)Does anyone have an opinion on this change? I've done the work to see if it's feasible (it seems to me like it is), and I see the advantage of it, but I'd love to hear any other takes on this idea. (Maybe even the defaults should be different?)
cc @swalkinshaw did you mention once that Shopify applied defaults in these cases?