Project

slimcop

0.0
The project is in a healthy, maintained state
RuboCop runner for Slim template.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Runtime

>= 0.5.1
 Project Readme

Slimcop

Gem Version test

RuboCop runner for Slim template.

Installation

Add this line to your application's Gemfile:

gem 'slimcop'

And then execute:

bundle install

Or install it yourself as:

gem install slimcop

Usage

Use slimcop executable to check offenses and auto-correct them.

$ slimcop --help
Usage: slimcop [options] [file1, file2, ...]
    -a, --auto-correct               Auto-correct offenses.
    -c, --config=                    Specify configuration file.
        --[no-]color                 Force color output on or off.

Example

$ slimcop 'spec/fixtures/**/*.slim'
Inspecting 1 file
C

Offenses:

spec/fixtures/dummy.slim:1:3: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- "a"
  ^^^
spec/fixtures/dummy.slim:3:5: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| #{"c"}
    ^^^

1 file inspected, 2 offenses detected, 2 offenses auto-correctable