https://github.com/rootstrap/rubocop-rootstrap
To provide default configuration files for Rubocop and the ability to create custom cops
https://github.com/rootstrap/rubocop-rootstrap
Last synced: 3 months ago
JSON representation
To provide default configuration files for Rubocop and the ability to create custom cops
- Host: GitHub
- URL: https://github.com/rootstrap/rubocop-rootstrap
- Owner: rootstrap
- License: mit
- Created: 2020-05-26T19:22:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T16:17:11.000Z (almost 4 years ago)
- Last Synced: 2025-04-05T18:50:36.578Z (10 months ago)
- Language: Ruby
- Size: 24.4 KB
- Stars: 3
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# RuboCop Rootstrap
This gem provides the recommended RuboCop configuration for Rootstrap projects, for open source and internal Ruby projects.
## Usage
### For Rails projects
In your gemfile:
```ruby
gem 'rubocop-rootstrap'
gem 'rubocop-rails', require: false
```
And in your .rubocop.yml
```yml
inherit_gem:
rubocop-rootstrap:
- config/rails.yml
```
### For ruby projects
In your gemfile:
```ruby
gem 'rubocop-rootstrap'
```
And in your .rubocop.yml
```yml
inherit_gem:
rubocop-rootstrap:
- config/default.yml
```
### Using the latest Rubocop version
To use the latest version of Rubocop just use the edge config files:
In your .rubocop.yml
```yml
inherit_gem:
rubocop-rootstrap:
- config/default_edge.yml
```
Or for Rails apps
```yml
inherit_gem:
rubocop-rootstrap:
- config/rails_edge.yml
```
### Defining custom exclusions in our project
To define custom exclusions and not override those defined by the gem:
In your .rubocop.yml
```yml
inherit_mode:
merge:
- Exclude
```
## Writing custom cops
Check Rubocop's documentation https://docs.rubocop.org/rubocop/development.html
Cops must live inside `lib/rubocop/cop/rootstrap/` and be required in `lib/rubocop/cop/rootstrap.rb`.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/rootstrap/rubocop-rootstrap. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rootstrap/rubocop-rootstrap/blob/master/CODE_OF_CONDUCT.md).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Rubocop::Rootstrap project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rootstrap/rubocop-rootstrap/blob/master/CODE_OF_CONDUCT.md).
## Credits
RuboCop Rootstrap is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our
[contributors](https://github.com/rootstrap/rubocop-rootstrap/contributors).
[
](http://www.rootstrap.com)