https://github.com/bugcrowd/rubocop-bugcrowd
Bugcrowd-specific Rubocop cops
https://github.com/bugcrowd/rubocop-bugcrowd
Last synced: about 1 year ago
JSON representation
Bugcrowd-specific Rubocop cops
- Host: GitHub
- URL: https://github.com/bugcrowd/rubocop-bugcrowd
- Owner: bugcrowd
- License: mit
- Created: 2020-01-08T19:25:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-02T01:42:48.000Z (over 1 year ago)
- Last Synced: 2024-10-27T22:55:00.821Z (over 1 year ago)
- Language: Ruby
- Size: 116 KB
- Stars: 2
- Watchers: 19
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Rubocop::Bugcrowd
Rubocop custom extension for rules specific to Bugcrowd's projects. Custom extension lets us share between projects and more easily test the cops in isolation. Many of these cops are not universally applicable to Rails/Ruby projects, they are simply a way of deprecating/prefering certain patterns as teams and projects grow in the Bugcrowd organization.
To experiment, run `bin/console` for an interactive prompt.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'rubocop-bugcrowd', require: false
```
and require it at the top of your `.rubocop.yml`
```yaml
require:
- rubocop-bugcrowd
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Checkout the Rubocop docs for node pattern matching https://docs.rubocop.org/rubocop-ast/node_pattern.html. You can also use this handle tool for quickly pasting in sample code to see how the Ruby parser reads it https://nodepattern.herokuapp.com/
#### Generating a new cop
```bash
bundle exec rake 'new_cop[Bugcrowd/UseThisInsteadOfThat]'
```
The Rubocop [documentation](https://docs.rubocop.org/rubocop/development.html#create-a-new-cop) is decent (but getting better) for writing a new cop. All cops should exhaustively tested -- a poorly implemented cop can be very frustrating for devs.
## 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::Bugcrowd project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/bugcrowd/rubocop-bugcrowd/blob/master/CODE_OF_CONDUCT.md).
## Contributors ✨
Thanks goes to these contributors past/present/future:
- [@adamrdavid](https://github.com/adamrdavid)
- [@maschwenk](https://github.com/maschwenk)
- [@tomlockwood](https://github.com/tomlockwood)