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

An error occurred while Style/TrailingBlankLines cop was inspecting #1843

Closed
JaniJegoroff opened this issue Apr 28, 2015 · 0 comments
Closed
Assignees
Labels

Comments

@JaniJegoroff
Copy link

Just noticed minor bug related to Style/TrailingBlankLines cop.

Given .rb file content

puts 'testing rubocop when final new line is missing after block comments'

=begin
first line
second line
third line
=end

Output:

Janis-MacBook-Pro:rubo janijegoroff$ rubocop rubo.rb
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.6-compliant syntax, but you are running 2.1.2.
Inspecting 1 file
An error occurred while Style/TrailingBlankLines cop was inspecting /Users/janijegoroff/projects/rubo/rubo.rb.
To see the complete backtrace run rubocop -d.
C

Offenses:

rubo.rb:3:1: C: Do not use block comments.
=begin
^^^^^^

1 file inspected, 1 offense detected

1 error occurred:
An error occurred while Style/TrailingBlankLines cop was inspecting /Users/janijegoroff/projects/rubo/rubo.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.30.1 (using Parser 2.2.2.1, running on ruby 2.1.2 x86_64-darwin13.0)
@jonas054 jonas054 added the bug label Apr 28, 2015
@jonas054 jonas054 self-assigned this Apr 28, 2015
bbatsov added a commit that referenced this issue Apr 29, 2015
[Fix #1843] Fix TrailingBlankLines crash on block comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants