-
Notifications
You must be signed in to change notification settings - Fork 582
(MODULES-6332) - PDK convert #881
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
Conversation
f4ad17c
to
a5febf2
Compare
@@ -0,0 +1,4 @@ | |||
Style/HashSyntax: | |||
EnforcedStyle: hash_rockets |
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 is required to avoid making the module backwards compatible.
Style/HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
RSpec/NamedSubject: | ||
Enabled: false |
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.
Unsure how ok this is?
It used to be disabled and there are a serious amount of violations of this cop. It would result in some files being completely rewritten.
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.
I would say this is fine for now. Plus it won't get lost if it's in the todo, so seems perfect solution for the meantime.
|
||
include RspecPuppetFacts | ||
|
||
# rubocop:disable Style/HashSyntax |
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.
The disable/enable of Style/HashSyntax
is a work around that will need to be resolved, the change will be overwritten on the next pdk update
.
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.
I have raised an internal bug for tracking this and it has been added onto the backlog.
We will need to come up with some type of solution going forward.
Firstly running pdk convert to make the module pdk compliant.
Second commit is disabling Style/HashSyntax around code within the spec/spec_helper.rb.
Reason: stdlib is a special case where we enforce the usage of hash_rockets, this avoids the module becoming backwards incompatible. The spec_helper.rb is written by a pdk template so even if I implemented hash rockets on the next
pdk update
run it will be overwritten. This is something to consider before the nextpdk update
is ran and on the next run these changes will be reverted.