Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 7e85376

Browse files
Disable PerceivedComplexity cop for Parser#parse
This method is now occasionally (but not reliably) failing the PerceivedComplexity cop. Since the complexity of this method is hard to control and the CyclomaticComplexity rule is already disabled for it, I'm turning off the cop for this method only.
1 parent bd2a9e2 commit 7e85376

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rspec/core/option_parser.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def parse(source=nil)
3636
# rubocop:disable MethodLength
3737
# rubocop:disable Metrics/AbcSize
3838
# rubocop:disable CyclomaticComplexity
39+
# rubocop:disable PerceivedComplexity
3940
def parser(options)
4041
OptionParser.new do |parser|
4142
parser.banner = "Usage: rspec [options] [files or directories]\n\n"
@@ -270,6 +271,7 @@ def parser(options)
270271
# rubocop:enable Metrics/AbcSize
271272
# rubocop:enable MethodLength
272273
# rubocop:enable CyclomaticComplexity
274+
# rubocop:enable PerceivedComplexity
273275

274276
def add_tag_filter(options, filter_type, tag_name, value=true)
275277
(options[filter_type] ||= {})[tag_name] = value

0 commit comments

Comments
 (0)