Skip to content

bensaufley/gnurr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gnurr

n. The substance that collects over time in the bottoms of pockets or cuffs of trousers; pocket lint.

Gem Version Code Climate Test Coverage Issue Count

Runs ESLint, SCSS-Lint, HAML-Lint, and Rubocop and returns info relevant to changed lines as reported by git.

Installation

As this gem is built to work with your git diffs, it does also require git. If you've managed to execute the above code, you're already there.

Make sure you've installed the Linters you'd like to use.

Add this line to your application's Gemfile:

gem 'gnurr', group: :development, require :false

And then execute:

$ bundle

Or install it yourself as:

$ gem install gnurr

Usage

In Ruby:

gnurr = Gnurr::Processor.new(options)
# Options:
# base: Base reference: branch, SHA, etc for diff (default: master)
# expanded: Show lints for all changed files, not just changed lines
#   (false unless specified)
# linters: Linters to use (default: es,haml,ruby,scss (all))
# verbose: turn on verbose mode
gnurr.execute

In your shell:

$ gnurr --help
Usage: gnurr [options]
    -b, --base NAME                  Base reference: branch, SHA, etc for diff (default: master)
    -e, --expanded                   Show lints for all changed files, not just changed lines (false
                                     unless specified)
    -l, --linters LIST               Linters to use (default: es,haml,ruby,scss (all))
    -v, --[no-]verbose               Run verbosely
        --version                    Show version
    -h, --help                       Prints this help

Available Linters

Below are the currently-supported linters. They are not required by this gem and must be independently installed.

Contributing

  1. Fork it ( https://github.com/bensaufley/gnurr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request