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 HTML formatter #2815

Merged
merged 1 commit into from
Feb 9, 2016
Merged

Fixes HTML formatter #2815

merged 1 commit into from
Feb 9, 2016

Conversation

prsimp
Copy link
Contributor

@prsimp prsimp commented Feb 9, 2016

First off, thanks for all your hard work, Rubocop-team!

It seems the assets directory was inadvertently removed from the list of files to include with the gem in e23cac6. Without the assets directory, the --format html option is broken:

No such file or directory @ rb_sysopen - ~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/assets/output.html.erb
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/html_formatter.rb:55:in `read'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/html_formatter.rb:55:in `render_html'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/html_formatter.rb:49:in `finished'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/formatter_set.rb:30:in `block (3 levels) in <class:FormatterSet>'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/formatter_set.rb:30:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/formatter/formatter_set.rb:30:in `block (2 levels) in <class:FormatterSet>'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/runner.rb:68:in `inspect_files'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/runner.rb:35:in `run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/lib/rubocop/cli.rb:30:in `run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/bin/rubocop:14:in `block in <top (required)>'
~/.rbenv/versions/2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rubocop-0.37.1/bin/rubocop:13:in `<top (required)>'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bin/rubocop:23:in `load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bin/rubocop:23:in `<main>'

I haven't tested exhaustively to ensure that no other required files are missing, I just happened to notice this as it broke one of my scripts.

This change does introduce one new Rubocop issue (line length) but I wasn't sure what sort of formatting you'd prefer, so I've left it as-is for now:

rubocop.gemspec:20:81: C: Line is too long. [81/80]
  s.files = `git ls-files assets bin config lib LICENSE.txt README.md`.split($RS)

@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
EOF

s.email = 'rubocop@googlegroups.com'
s.files = `git ls-files lib bin LICENSE.txt README.md config`.split($RS)
s.files = `git ls-files assets bin config lib LICENSE.txt README.md`.split($RS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line became too long (therefore the failing build).

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 9, 2016

Please add a changelog entry and update the commit message to reflect our commit message guidelines (Adds -> Add).

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 9, 2016

You'll need to rebase your PR on top of the current master. I see your changelog file is out-of-date and you added the entry in the wrong place.

@prsimp
Copy link
Contributor Author

prsimp commented Feb 9, 2016

@bbatsov -- thanks for the quick feedback. I think it should be good-to-go now.

Missing assets directory in built gem caused html formatter to fail.

Alphabetizes the included directories/files for easier visual parsing.
bbatsov added a commit that referenced this pull request Feb 9, 2016
@bbatsov bbatsov merged commit 414e24d into rubocop:master Feb 9, 2016
@prsimp prsimp deleted the fix-html-output branch February 10, 2016 20:24
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.

2 participants