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

Check for spaces before comments #1074

Closed
agrimm opened this issue May 9, 2014 · 2 comments
Closed

Check for spaces before comments #1074

agrimm opened this issue May 9, 2014 · 2 comments
Assignees

Comments

@agrimm
Copy link
Contributor

agrimm commented May 9, 2014

Rubocop doesn't check that there's a space before comments.

The following passes Rubocop, even though there isn't a space between 1 and #:

def foo
  a = 1
  a += 1# Increment a by one
  a * 2
end

The Ruby style guide doesn't explicitly discourage such a style, but the examples it has involve having a space before the # character.

@bbatsov
Copy link
Collaborator

bbatsov commented May 9, 2014

@agrimm 👍 Such a check definitely makes sense. @jonas054 Please, implement it when you can.

@bbatsov
Copy link
Collaborator

bbatsov commented May 9, 2014

@agrimm Btw - feel free to mention this in the style guide.

bbatsov added a commit that referenced this issue May 14, 2014
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

No branches or pull requests

3 participants