Skip to content

Commit 51fa5bf

Browse files
authored
Merge pull request #9054 from koic/drop_patch_versions_from_default_yml
Remove redundant patch version from default.yml
2 parents ee6a72f + c3c7283 commit 51fa5bf

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

config/default.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ Layout/SpaceBeforeBlockBraces:
11761176
SupportedStylesForEmptyBraces:
11771177
- space
11781178
- no_space
1179-
VersionChanged: '0.52.1'
1179+
VersionChanged: '0.52'
11801180

11811181
Layout/SpaceBeforeComma:
11821182
Description: 'No spaces before commas.'
@@ -1865,7 +1865,7 @@ Lint/RescueException:
18651865
StyleGuide: '#no-blind-rescues'
18661866
Enabled: true
18671867
VersionAdded: '0.9'
1868-
VersionChanged: '0.27.1'
1868+
VersionChanged: '0.27'
18691869

18701870
Lint/RescueType:
18711871
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
@@ -3920,7 +3920,7 @@ Style/PercentLiteralDelimiters:
39203920
'%r': '{}'
39213921
'%w': '[]'
39223922
'%W': '[]'
3923-
VersionChanged: '0.48.1'
3923+
VersionChanged: '0.48'
39243924

39253925
Style/PercentQLiterals:
39263926
Description: 'Checks if uses of %Q/%q match the configured preference.'
@@ -4327,7 +4327,7 @@ Style/StringMethods:
43274327
Description: 'Checks if configured preferred methods are used over non-preferred.'
43284328
Enabled: false
43294329
VersionAdded: '0.34'
4330-
VersionChanged: '0.34.2'
4330+
VersionChanged: '0.34'
43314331
# Mapping from undesired method to desired_method
43324332
# e.g. to use `to_sym` over `intern`:
43334333
#

docs/modules/ROOT/pages/cops_layout.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5369,7 +5369,7 @@ a ** b
53695369
| Yes
53705370
| Yes
53715371
| 0.49
5372-
| 0.52.1
5372+
| 0.52
53735373
|===
53745374

53755375
Checks that block braces have or don't have a space before the opening

docs/modules/ROOT/pages/cops_lint.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3689,7 +3689,7 @@ end
36893689
| Yes
36903690
| No
36913691
| 0.9
3692-
| 0.27.1
3692+
| 0.27
36933693
|===
36943694

36953695
This cop checks for `rescue` blocks targeting the Exception class.

docs/modules/ROOT/pages/cops_style.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7549,7 +7549,7 @@ end
75497549
| Yes
75507550
| Yes
75517551
| 0.19
7552-
| 0.48.1
7552+
| 0.48
75537553
|===
75547554

75557555
This cop enforces the consistent usage of `%`-literal delimiters.
@@ -10134,7 +10134,7 @@ result = "Tests #{success ? "PASS" : "FAIL"}"
1013410134
| Yes
1013510135
| Yes
1013610136
| 0.34
10137-
| 0.34.2
10137+
| 0.34
1013810138
|===
1013910139

1014010140
This cop enforces the use of consistent method names

spec/project_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
end
3838
end
3939

40+
%w[VersionChanged VersionRemoved].each do |version_type|
41+
it "requires a nicely formatted `#{version_type}` metadata for all cops" do
42+
cop_names.each do |name|
43+
version = config[name][version_type]
44+
next unless version
45+
46+
expect(version).to(match(/\A\d+\.\d+\z/),
47+
"#{version} should be format ('X.Y') for #{name}.")
48+
end
49+
end
50+
end
51+
4052
it 'has a period at EOL of description' do
4153
cop_names.each do |name|
4254
description = config[name]['Description']

0 commit comments

Comments
 (0)