-
Notifications
You must be signed in to change notification settings - Fork 183
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
Lint and rubocop (autofixes only) #289
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.
Looks like my comments were usually fixed in a later commit. Probably still plenty of cleanups to be done, but this is a good start.
@@ -2,12 +2,12 @@ | |||
|
|||
# CentOS 6 Redis package is too old for Sentinel (2.4.10, needs 2.8+) | |||
describe 'redis::sentinel', unless: (fact('osfamily') == 'RedHat' && (fact('operatingsystemmajrelease') == '6')) do | |||
case fact('osfamily') | |||
redis_name = case fact('osfamily') | |||
when 'Debian' |
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 when has a weird alignment
@@ -20,7 +20,7 @@ module Puppet::Parser::Functions | |||
DOC | |||
) do |args| | |||
|
|||
raise(Puppet::ParseError, "redisget(): Wrong number of arguments given (#{args.size} for 2 or 3)") if args.size != 2 and args.size != 3 | |||
raise(Puppet::ParseError, "redisget(): Wrong number of arguments given (#{args.size} for 2 or 3)") if args.size !=2 && args.size !=3 |
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.
Why is there no space after !=
?
spec/functions/redisget_spec.rb
Outdated
@@ -72,7 +72,7 @@ | |||
end | |||
|
|||
describe 'when an invalid type (non-string) is specified' do | |||
before(:each) { | |||
before { |
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.
Is this right? I never know
spec/classes/redis_spec.rb
Outdated
@@ -926,7 +926,8 @@ | |||
|
|||
it { is_expected.to contain_file(config_file_orig).with( |
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 think it's cleaner do use it do ... end
(multi line) or it { is_expected.to contain_file(config_file_orig).with_content(/^slaveof _VALUE_/) }
@@ -5,24 +5,24 @@ | |||
|
|||
it do | |||
is_expected.to contain_sysctl('vm.overcommit_memory').with( | |||
'ensure' => 'present', |
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.
Funny, this indentation was generated by another refactor
spec/classes/redis_sentinel_spec.rb
Outdated
@@ -52,15 +52,15 @@ | |||
'mode' => '0644', | |||
'owner' => 'redis', | |||
'content' => $expected_noparams_content | |||
) |
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 was also generated by another change.
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.
Doing fixes one cop at a time, I make sure I don't unfix cops I've already fixed (or introduce entirely new failing cops). For the ones I haven't, the number of failures can and does tend to increase though.
This is in preparation of doing the first Vox Pupuli modulesync.
The following cops can not be autocorrected.