New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix #10919] Fix a huge performance regression between 1.32.0 and 1.33.0 #10953
Conversation
@@ -17,16 +17,21 @@ def allowed_method?(name) | |||
|
|||
# @api public | |||
def allowed_methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[memo] The reason for the slow speed was due to this method.
If the following settings were used
Style/MethodCallWithArgsParentheses:
IgnoredMethods:
- abort
- after_save
- and
- before_save
- delegate
- describe
- exec
- exit
- load
- not_to
- p
- print
- puts
- raise
- require
- shared_context
- shared_examples
- star_puts
- throw
- to
- warn
- yield
it was returning the following results (increasing with each file)
["abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield", "abort", "after_save", "and", "before_save", "delegate", "describe", "exec", "exit", "load", "not_to", "p", "print", "puts", "raise", "require", "shared_context", "shared_examples", "star_puts", "throw", "to", "warn", "yield"]
@@ -951,33 +951,6 @@ def a; end | |||
YAML | |||
end | |||
|
|||
context 'when configurable parameter is an obsolete parameter' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a test added in #10875. However, this specification was incorrect. In fact, I think the cop_config was broken, causing duplicates to be displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it necessary to update the test as originally intended? I'm worried about losing a regression spec for #10875.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is. I will modify the test a bit and add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. I've tried running the following test and it seems to fail.
Maybe there is some other problem.
Should we include the resolution of that issue as part of this PR?
context 'when duplicated parameter' do
it 'parameters are displayed without duplication' do
create_file('.rubocop.yml', <<~YAML)
AllCops:
NewCops: enable
Lint/AmbiguousBlockAssociation:
AllowedMethods:
- change
- not_change
- change
YAML
create_file('example1.rb', ['# frozen_string_literal: true', '', 'def fooBar; end'])
create_file('example2.rb', ['# frozen_string_literal: true', '', 'def fooBar; end'])
expect(cli.run(['--auto-gen-config'])).to eq(0)
File.readlines('.rubocop_todo.yml')
expect(File.readlines('.rubocop_todo.yml')[9..].join)
.to eq(<<~YAML)
# Configuration parameters: AllowedPatterns, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
# AllowedPatterns: change, not_change
Naming/MethodName:
EnforcedStyle: camelCase
YAML
end
end
Failures:
1) RuboCop::CLI --auto-gen-config --auto-gen-config when duplicated parameter parameters are displayed without duplication
Failure/Error:
expect(File.readlines('.rubocop_todo.yml')[9..].join)
.to eq(<<~YAML)
# Configuration parameters: AllowedPatterns, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
# AllowedPatterns: change, not_change
Naming/MethodName:
EnforcedStyle: camelCase
YAML
expected: "# Configuration parameters: AllowedPatterns, IgnoredPatterns.\n# SupportedStyles: snake_case, camelCase\n# AllowedPatterns: change, not_change\nNaming/MethodName:\n EnforcedStyle: camelCase\n"
got: "# Configuration parameters: AllowedPatterns, IgnoredPatterns.\n# SupportedStyles: snake_case, camelCase\nNaming/MethodName:\n EnforcedStyle: camelCase\n"
(compared using ==)
Diff:
@@ -1,6 +1,5 @@
# Configuration parameters: AllowedPatterns, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
-# AllowedPatterns: change, not_change
Naming/MethodName:
EnforcedStyle: camelCase
# ./spec/rubocop/cli/auto_gen_config_spec.rb:970:in `block (4 levels) in <top (required)>'
# ./spec/support/cli_spec_behavior.rb:26:in `block (2 levels) in <top (required)>'
# ./lib/rubocop/rspec/shared_contexts.rb:30:in `block (4 levels) in <top (required)>'
# ./lib/rubocop/rspec/shared_contexts.rb:30:in `chdir'
# ./lib/rubocop/rspec/shared_contexts.rb:30:in `block (3 levels) in <top (required)>'
# ./lib/rubocop/rspec/shared_contexts.rb:7:in `block (2 levels) in <top (required)>'
Finished in 7.11 seconds (files took 1.06 seconds to load)
40 examples, 1 failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we need guarantees for existing behavior against performance regression solutions. I'm wondering whether another issue is included due to the test failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I would like to run the same test code on the old version to check the existing behavior first. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted below, the display of this configuration value is the configuration value in config/default.yml
and we have decided to modify the test.
#10953 (comment)
Good catch! Would any other cops changed in #10829 be affected? |
@dvandersluis Yes. I think so. And parameters obsoleted in #10555 had the same problem. These will also be resolved. |
4b047a2
to
94057a6
Compare
before do | ||
RuboCop::ConfigLoader.default_configuration['Naming/MethodParameterName'] | ||
.merge!('AllowedNames' => %w[at by at]) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration values like # AllowedNames: at, by
that appear in .rubocop_todo.yml
were not configuration values in .rubocop.yml
, but default values in config/defautl.yml
.
However, what appeared to be the .rubocop.yml
configuration values in #10875 . This was due to the default values being corrupted by the problem fixed in this PR.
Therefore, it was necessary to duplicate parameter the config/defautl.yml
here.
…and 1.33.0 Fix: rubocop#10919 Before: - 1.32.0 (using Parser 3.1.2.1, rubocop-ast 1.21.0, running on ruby 2.7.2 x86_64-darwin21) `bundle exec rubocop --cache false --only 16.83s user 1.30s system 93% cpu 19.320 total` - 1.35.0 (using Parser 3.1.2.1, rubocop-ast 1.21.0, running on ruby 2.7.2 x86_64-darwin21) `bundle exec rubocop --cache false --only 1255.21s user 5.32s system 71% cpu 29:17.76 total` After: `bundle exec rubocop --cache false --only 16.64s user 1.25s system 94% cpu 19.002 total`
94057a6
to
8ebe36c
Compare
Thanks! |
Interesting. |
Fix: #10919
Before:
bundle exec rubocop --cache false --only 16.83s user 1.30s system 93% cpu 19.320 total
bundle exec rubocop --cache false --only 1255.21s user 5.32s system 71% cpu 29:17.76 total
After:
bundle exec rubocop --cache false --only 16.64s user 1.25s system 94% cpu 19.002 total
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.