README.md in rubocop-sorbet-0.6.2 vs README.md in rubocop-sorbet-0.6.3
- old
+ new
@@ -58,10 +58,19 @@
RuboCop::RakeTask.new do |task|
task.requires << 'rubocop-sorbet'
end
```
+### Rubocop rules for RBI files
+
+Put this into your `.rubocop.yml`:
+
+```yaml
+inherit_gem:
+ rubocop-sorbet: config/rbi.yml
+```
+
## The Cops
All cops are located under [`lib/rubocop/cop/sorbet`](lib/rubocop/cop/sorbet), and contain examples/documentation.
In your `.rubocop.yml`, you may treat the Sorbet cops just like any other cop. For example:
@@ -91,9 +100,15 @@
```sh
bundle exec rake new_cop[Sorbet/NewCopName]
```
which will create a skeleton cop, a skeleton spec, an entry in the default config file and will require the new cop so that it is properly exported from the gem.
+
+Don't forget to update the documentation with:
+
+```sh
+bundle exec rake generate_cops_documentation
+```
## License
The gem is available as open source under the terms of the [MIT License](https://github.com/Shopify/rubocop-sorbet/blob/master/LICENSE.txt).