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

Style/StringLiteralsInInterpolation-20220914233640 #783

Merged
merged 5 commits into from
Sep 28, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Rubocop challenge!

Style/StringLiteralsInInterpolation

Safe autocorrect: Yes
✅ The autocorrect a cop does is safe (equivalent) by design.

Description

Overview

Checks that quotes inside the string interpolation
match the configured preference.

Examples

EnforcedStyle: single_quotes (default)

# bad
result = "Tests #{success ? "PASS" : "FAIL"}"

# good
result = "Tests #{success ? 'PASS' : 'FAIL'}"

EnforcedStyle: double_quotes

# bad
result = "Tests #{success ? 'PASS' : 'FAIL'}"

# good
result = "Tests #{success ? "PASS" : "FAIL"}"

Auto generated by rubocop_challenger

@mathieujobin mathieujobin merged commit 715c6f4 into master Sep 28, 2022
@mathieujobin mathieujobin deleted the rubocop-challenge/20220914233640 branch September 28, 2022 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants