Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannyben/rentacop
A more relaxed default set of RuboCop rules
https://github.com/dannyben/rentacop
rubocop rubocop-configuration rubocop-defaults ruby ruby-gem static-code-analysis
Last synced: 3 months ago
JSON representation
A more relaxed default set of RuboCop rules
- Host: GitHub
- URL: https://github.com/dannyben/rentacop
- Owner: DannyBen
- License: mit
- Created: 2022-11-16T16:27:28.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T15:35:14.000Z (5 months ago)
- Last Synced: 2024-10-06T05:19:22.720Z (3 months ago)
- Topics: rubocop, rubocop-configuration, rubocop-defaults, ruby, ruby-gem, static-code-analysis
- Language: Ruby
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Rentacop
A more relaxed default set of RuboCop rules.
## Install
Run:
```bash
$ gem install rentacop
```Or, add this line to your Gemfile:
```ruby
group :test, :development do
gem 'rentacop'
end
```## Prerequisites
We assume you have rubocop installed either globally:
```bash
$ gem install rubocop
```or in your bundle
```bash
$ bundle add rubocop --group development,test
```## Usage
This gem contains two rule sets:
1. Global rubocop rules in [rentacop.yml](rentacop.yml)
2. RSpec rubocop rules in [rspec.yml](rspec.yml)### Configuring `.rubocop.yml`
If you are not using RSpec, add the following to the top of your `.rubocop.yml`:
```yaml
inherit_gem:
rentacop: rentacop.yml
```If you are using [rubocop-rspec](https://github.com/rubocop/rubocop-rspec), and wish to include the RSpec rules from this repository, add this instead:
```yaml
require: rubocop-rspecinherit_gem:
rentatop:
- rentacop.yml
- rspec.yml
```### Recommended Template
This `.rubocop.yml` contains our full recommended configuration:
```yaml
# .rubocop.yml
require:
- rubocop-performance
- rubocop-rspecinherit_gem:
rentacop:
- rentacop.yml
- rspec.ymlinherit_mode:
merge:
- Exclude
- IncludeAllCops:
TargetRubyVersion: 3.0
```### Running `rubocop`
After creating your `.rubocop.yml` file, run:
```bash
$ rubocop
# or, if you do not have rubocop installed globally
$ bundle exec rubocop
```To create a todo list, run:
```bash
$ rubocop --regenerate-todo
```