I use haml instead of erb, and haml-lint does a good of checking your code. It even uses RuboCop.
I'm not sure whether this'll help, but maybe try using a tool that converts your erb into haml, and then running haml-lint on the output. Andrew On Wed, Jul 20, 2016 at 9:37 PM, Tom Hale <[email protected]> wrote: > I'm want to check the validity of .html.erb files, at both the erb and > HTML levels. > > I purposely put in weird, unmatched tags to test out rails-erb-lint[1] and > rails-erb-check[2]. I also changed a <% else %> to <% elXse %> and both > said my file was valid. > > So... > > Q1) How do I get feedback on what is actually wrong with my .erb syntax? > > Q2) How can I validate that the eventual HTML output is also valid, and > not just relying on my browser being tolerant? > > Q3) Do many people use erb in production or should I be using something > "better"? Something with a decent error checker? (bonus points for > integrating with vim/syntastic) > > Thanks all, > Tom > > [1] https://rubygems.org/gems/rails-erb-lint/versions/1.1.6 > [2] https://github.com/jugyo/rails-erb-check > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/rails-oceania. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rails-oceania. For more options, visit https://groups.google.com/d/optout.
