asciidoctor / docbookrx

(An early version of) a DocBook to AsciiDoc converter written in Ruby.
MIT License
22 stars 49 forks source link

Fix for warning messages. #48

Closed junaruga closed 8 years ago

junaruga commented 8 years ago

I fixed for warning messages.

Because if we keep such kind of warning messages, it makes us hard to find new warnings, and it leads up new warnings

It is "Broken windows theory" https://en.wikipedia.org/wiki/Broken_windows_theory

About the fix of L988, I followed popular style, max line length: 80 byte that is used for rubocop.

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Before modification

$ ruby -cW lib/docbookrx/docbook_visitor.rb
lib/docbookrx/docbook_visitor.rb:346: warning: mismatched indentations at 'end' with 'def' at 343
lib/docbookrx/docbook_visitor.rb:601: warning: assigned but unused variable - elements
lib/docbookrx/docbook_visitor.rb:642: warning: mismatched indentations at 'end' with 'def' at 634
lib/docbookrx/docbook_visitor.rb:998: warning: possibly useless use of +@ in void context
lib/docbookrx/docbook_visitor.rb:1292: warning: shadowing outer local variable - node
lib/docbookrx/docbook_visitor.rb:1453: warning: ambiguous first argument; put parentheses or a space even after `/' operator
Syntax OK

After modification

$ ruby -cW lib/docbookrx/docbook_visitor.rb
Syntax OK
mojavelinux commented 8 years ago

Agreed. In fact, I would like to see warnings enabled in the test suite. I'll send a PR.