Skip to content
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

Fixes rubocop violation Style/FormatString #1040

Conversation

pmatsinopoulos
Copy link

Summary

It fixes the rubocop violation Style/FormatString. The suggestion from rubocop is to use Kernel#format instead of the cryptic String#%. Also, it favours the Kernel#format over the Kernal#sprintf although the former is alias of the latter, just to make sure that we are using one method consistently throughout the code base.

Details

  1. I have replaced all the Kernel#sprintf calls with Kernel#format calls.
  2. I have also replaced all the String#% calls with Kernel#format calls.

Motivation and Context

This change is required to comply with rubocop suggestion to be using Kernel#format vs Kernel#sprintf and String#%.

Refs #1021

How Has This Been Tested?

With bundle exec rake everything is green.

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Style changes

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@nodo nodo merged commit ac56af0 into cucumber:master Oct 6, 2016
@pmatsinopoulos pmatsinopoulos deleted the fix-style-violation-1021-style-format-string branch November 9, 2016 06:22
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants