Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
VersionAdded
to config/default.yml when running rake new_cop
#6293 extended cop metadata. This PR adds `VersionAdded` to config/default.yml when running `rake new_cop`. The following is an example. ```console % rubocop -V 0.59.2 (using Parser 2.5.1.2, running on ruby 2.5.1 x86_64-darwin17) % bunle exec rake new_cop[Lint/TheNewCop] ``` In the current RuboCop, a new cop is added with a minor version. ```diff diff --git a/config/default.yml b/config/default.yml index e784ea6b7..522f6aa4e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1507,6 +1507,11 @@ Lint/Syntax: VersionAdded: 0.9 +Lint/TheNewCop: + Description: 'TODO: Write a description of the cop.' + Enabled: true + VersionAdded: 0.60 + Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: true ```
- Loading branch information
Showing
3 changed files
with
11 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
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
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