-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use interpolation if it's not required.
Follow up to #11074, but for the core backend ruby files Interpolation syntax can be error prone so don't use it when you can just convert to string. Prefer `variable.to_s` over `"#{variable}"` Also, some places we use Array#join which returns a String already: `"#{rate_detail.errors.full_messages.join(', ')}"` Becomes: `rate_detail.errors.full_messages.join(', ')` Also, some places already created a message string but then wanted to interpolate it for good measure: ```diff msg = "Authentication failed for userid #{username}, unable to find user object in #{self.class.proper_name}" - _log.warn("#{msg}") + _log.warn(msg) ``` rubocop -a --only "Lint/StringConversionInInterpolation,Style/UnneededInterpolation" ... (transferred from ManageIQ/manageiq@62e4980)
- Loading branch information
Showing
6 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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