-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documents how to handle new ruby versions.
- Loading branch information
1 parent
0c55870
commit 350e08f
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Handling New Ruby Versions | ||
|
||
When a new Ruby version comes out, you shouldn't have to make any immediate changes to StandardRb. The default configuration is the `base.yml` configuration and should continue to work correctly. | ||
|
||
Often, Rubocop will add new rules to encourage usage of new language features in new Ruby versions. When that happens: | ||
|
||
1. Add the rule to the base.yml file and disable it. | ||
1. Assess the new rule and see if it should be added to StandardRb. If not, you're done. If so, enable in `base.yml` and read on. | ||
1. Add a new config file for the penultimate minor version of Ruby, so for example, if the new Ruby version is `3.1` then the new config file would be for `3.0`. | ||
1. In the new config file, make sure it inherits from `base.yml` and disable the new rule. | ||
1. In the previous latest config file, make sure it inherits from your new config file. | ||
|
||
And that should add new rules to StandardRb safely and gracefully. |