Skip to content

Commit 21474f0

Browse files
committed
refactor: satisfy newer Rubocop version
1 parent ef058c0 commit 21474f0

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

.rubocop.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
inherit_from: .rubocop_todo.yml
2+
13
require:
24
- rubocop-rspec
35
- rubocop-performance
46
- rubocop-md
57

68
AllCops:
7-
TargetRubyVersion: 2.7
9+
TargetRubyVersion: 2.5
810
NewCops: enable
911

1012
Style/HashEachMethods:

.rubocop_todo.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config --auto-gen-only-exclude`
3+
# on 2020-08-22 07:49:05 UTC using RuboCop version 0.89.1.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 27
10+
#
11+
# *** NON-GENERATED COMMENT ***
12+
# I'm not sure about enabling this cop
13+
# * using super may has performance impact
14+
# * but for some cases it still can be useful
15+
# Research needed
16+
Lint/MissingSuper:
17+
Enabled: false
18+
19+
# Offense count: 5
20+
# Configuration parameters: AllowSubject, Max.
21+
#
22+
# *** NON-GENERATED COMMENT ***
23+
# Might be it's impossible to satisfy this cop or significant refactoring of these tests needed
24+
RSpec/MultipleMemoizedHelpers:
25+
Exclude:
26+
- 'spec/flows/flow/node_spec.rb'
27+
- 'spec/flows/util/inheritable_singleton_vars/isolation_strategy_spec.rb'

bin/benchmark_cli/examples/.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ Lint/UselessAssignment:
1717

1818
Metrics/MethodLength:
1919
Enabled: false
20+
21+
Metrics/AbcSize:
22+
Enabled: false

flows.gemspec

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
2121
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2222
spec.require_paths = ['lib']
2323

24+
spec.required_ruby_version = '>= 2.5'
25+
2426
# This library has no production dependencies.
2527
# So, it will not block you from updating any dependencies in your project.
2628
# So, don't add production dependencies.

lib/flows/plugin/output_contract/dsl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def failure_with(status, &contract_block)
3939
# Disables contract check and transformation for current class and children.
4040
#
4141
# @param enable [Boolean] if true - contracts are disabled
42-
def skip_output_contract(enable = true)
42+
def skip_output_contract(enable: true)
4343
@skip_output_contract_flag = enable
4444
end
4545
end

spec/flows/railway_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def sum(arg1:, arg2:)
2929
end
3030

3131
def square(sum:)
32-
ok(square: sum * sum)
32+
ok(square: sum**2)
3333
end
3434
end
3535
end

0 commit comments

Comments
 (0)