Skip to content

HeyNonster/rails-erb-lint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails ERB Lint

Build Status Gem Version Code Climate

Checks for the validity of your ERB views.

"But if you write tests, you won't have these problems"

So test. TDD is not dead.

Requirements

  • Ruby 1.9.3 or greater

Installation

gem install rails-erb-lint

Usage

cd your-rails-app/app/views
rails-erb-lint check

By default, we don't show which files are valid as that makes little sense. However you can show them through valid mode.

cd your-rails-app/app/views
rails-erb-lint check -v

This will print the errors:

rails-erb-lint check -e

To export report as json file:

rails-erb-lint check -v -e errors.json

Using Slim and HAML

Initially planned to discontinue the idea of a lint tool for ERB views. I think there should be a gem that works for Slim/HAML/ERB for that.

ERB by experience is not fun or sensible to use. HAML or Slim works well.

Convert ERB to Slim

About

Check for view errors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 75.9%
  • Gherkin 22.1%
  • HTML 2.0%