Skip to content

gadgetonline/rubocop-squad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rubocop-squad

The rubocop-squad gem provides a robust Rubocop configuration for Ruby development. It defines a set of rules in its .rubocop.yml and wraps its dependencies, other Rubocop gems, into a single package.

rubocop-squad contains these cops:

  • rubocop-faker
  • rubocop-ordered_methods
  • rubocop-performance
  • rubocop-rails
  • rubocop-rake
  • rubocop-rspec
  • rubocop-thread_safety

You can review the baseline configuration in this gem's .rubocop.yml file.

Installation

Installation in any Ruby project is a snap. You can add the rubocop-squad Rubocop configuration and its tools with three lines of code.

First, add this line to your application's Gemfile...

gem 'rubocop-squad', git: 'https://github.com/martinstreicher/rubocop-squad', branch: 'main'

... and then execute bundle in the shell:

bundle install

Next, create the file .rubocop.yml in your project root directory and add this content:

inherit_gem:
  rubocop-squad: .rubocop.yml

Rubocop configurations added via inherit_gem are prepended to the inherit_from directive. inherit_gem configurations are loaded first, followed by inherit_from (overriding the configurations from the gems). The remaining directives in the configuration file supersede any of the inherited configurations. (This means the configurations inherited from one or more gems have the lowest precedence of inheritance.)

Usage

To find and fix Rubocop violations in your code, run rubocop -A in your shell:

rubocop -A

Development

After checking out the repo, run bin/setup to install dependencies.

To install this gem onto your local machine, run bundle exec rake install.

To release a new version of this gem, update the version number in version.rb and run bundle exec rake release to create a git tag for the version and push all commits and tags to origin.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/martinstreicher/rubocop-squad.

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •