Project

supercop

0.0
No commit activity in last 3 years
No release in over 3 years
This gem allows you to use multiply lnters to check your code quality and get nice table-view report
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.13
>= 0
>= 0
>= 0
>= 10.0
>= 3.0
 Project Readme

Supercop

Build Status

This gem allows you to combine multiple linters with their configs in one place and run all checks by one command with tabled-view summary report (see below). You should specify which linters you would like to use, for example rubocop, reek, scss_linter etc. Gem would load them if they are not installed and run checks.

One gem for rule them all:)

Versions

It works for 2.2.3, 2.3.1, 2.3.3 versions of Ruby MRI.

Installation

Add this line to your application's Gemfile:

gem 'supercop'

And then execute:

$ bundle

Or install it yourself as:

$ gem install supercop

Install into another gem

Add supercop tasks to the Rakefile:

  spec = Gem::Specification.find_by_name 'supercop'
  load "#{spec.gem_dir}/lib/tasks/manage_settings.rake"
  load "#{spec.gem_dir}/lib/tasks/check.rake"

Usage

After install, you should modify supercop.yml and specify prefered linters. After that run

$ rake supercop:generate_config

for non-rails project (like gem) or

$ rails g supercop:config

for rails project

After that, please modify your supercop.yml config file, adding linters you want to use and run

$ rake supercop:load_dependencies

or you can do it manually by adding gems to your Gemfile (for other gems - to the end of file) and running bundle install.

Note: You should do it once.

Now you can run checks.

Clean up

If you want to restore all affected files and clean up supercop remnants, please run

$ rake supercop:cleanup

This will delete config file and erase changes made by Supercop to your Gemfile and bundle.

Running check

$ rake supercop:check
linter alerts max status
rubocop 48 99 ok
reek 45 99 ok
slim_lint none 99 ok
scss_lint none 99 ok

'none' - means linter did not work correctly. To figured out why - change 'verbose' option to true

Development

After checking out the repo, run bundle install and make your changes. After commit, create Pull Request and notify me.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/artemasmith/supercop.

License

The gem is available as open source under the terms of the MIT License.