-
Notifications
You must be signed in to change notification settings - Fork 28
Fix: Lint errors after rubocop update. #136
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
lib/optimizely/helpers/validator.rb
Outdated
if logger_valid?(logger) && level | ||
logger.log(level, "#{Optimizely::Helpers::Constants::INPUT_VARIABLES[key.to_s.upcase]} is invalid") | ||
end | ||
logger.log(level, "#{Optimizely::Helpers::Constants::INPUT_VARIABLES[key.to_s.upcase]} is invalid") if logger_valid?(logger) && level |
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.
Hmm, I find this is harder to read than before, is that really one of our int rules? If so we should change it so that it won't complain about this. @apanzerj what are your thoughts on this kind of styling rule?
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.
Plz review the addressed change, it's also complying with rubocop rules.
lib/optimizely/bucketer.rb
Outdated
if variation_id == '' | ||
@config.logger.log(Logger::DEBUG, 'Bucketed into an empty traffic range. Returning nil.') | ||
end | ||
@config.logger.log(Logger::DEBUG, 'Bucketed into an empty traffic range. Returning nil.') if variation_id == '' |
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.
Same comment here, is there a way to invert this relationship? Seems like it makes it harder to read
@rashidsp I would suggest that rather than modifying code or adding extra lines to comply with rubocop rule, ignore this particular rule in rubocop.yml. |
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
Summary
0.60.0
.