-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Format should not crash #344
Conversation
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.
Great! 👍
Let's also increase size from 80 to 100, what do you think about that?
Yeah, I can do that. @danawillow thoughts? |
I am a robot that works on MagicModules PRs! Once this PR is approved, you can feel free to merge it without taking any further steps. |
I am a robot that works on MagicModules PRs! Once this PR is approved, you can feel free to merge it without taking any further steps. |
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.
Sure!
I bumped up the line length from 80 -> 100. The submodule PRs for these ones are gonna be a lot of fun. |
bec9409
to
870224f
Compare
I am a robot that works on MagicModules PRs! I built this PR into one or more PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
spec/provider_core_spec.rb
Outdated
it 'fits 80 chars' do | ||
subject.format [['x' * 80]] | ||
it 'fits 100 chars' do | ||
subject.format [['x' * 100]] |
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.
Now that we don't raise an exception, you should expect this not to include a line length disable. Same with all other tests that used to depend on crashes to fail.
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.
These tests should verify that format works properly, but I don't think that includes the "LineLength" portion.
Check out the changes. I think the better way to verify that if < 80, the output is exactly as expected, where > 80 includes LineLength.
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.
Also, pushes on Github are being weird so I'll probably have to re-push + fiddle with the branch in a bit.
I am (still) a robot that works on MagicModules PRs! I just wanted to let you know that your changes (as of commit 83ddcf2) have been included in your existing downstream PRs. |
I've spread some comments around the child PRs - I think that there are a ton of format issues that could use addressing, while we're doing a giant sweeping format PR. If you say "nah, that stuff sounds like a hassle", I get it - merge 'em and maybe someday we'll come back for another go. |
(I say "we're doing a giant sweeping format PR", but of course I mean "you're doing" - this is absolutely fantastic and will save me hours of swearing at the compiler) |
Tracked submodules are build/puppet/compute build/puppet/sql build/puppet/storage build/puppet/container build/puppet/dns build/puppet/pubsub build/puppet/resourcemanager build/chef/compute build/chef/sql build/chef/storage build/chef/container build/chef/dns build/terraform build/ansible.
I am (still) a robot that works on MagicModules PRs! I just wanted to let you know that your changes (as of commit 51ffc6b) have been included in your existing downstream PRs. |
* Remove redundant '(Computed)' text * Add support for setting labels on compute_disk * Fix minor spacing issue in test
The format() function should never crash.
If it has to, it should return the best possible choice (almost certainly the last) with Rubocop disable/enable clauses surrounding it.
This should be
a no-opwhatever the polar opposite of a no-op is.[all]
Format should not crash
[terraform]
[puppet]
[puppet-compute]
[puppet-container]
[puppet-dns]
[puppet-logging]
[puppet-pubsub]
[puppet-resourcemanager]
[puppet-sql]
[puppet-storage]
[chef]
[chef-compute]
[chef-container]
[chef-dns]
[chef-logging]
[chef-sql]
[chef-storage]
[ansible]