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

A poorly styled change #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

A poorly styled change #2

wants to merge 1 commit into from

Conversation

alextwoods
Copy link
Owner

Pronto?

@@ -1,3 +1,7 @@
if x = 1
puts "This should trigger warnings!"
end

if y = 3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - y.

@@ -1,3 +1,7 @@
if x = 1
puts "This should trigger warnings!"
end

if y = 3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.

@@ -1,3 +1,7 @@
if x = 1
puts "This should trigger warnings!"
end

if y = 3
puts "This is a new change that should get a comment"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer single-quoted strings when you don't need string interpolation or special symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant