You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading rubocop-rspec to version 2.19.0 I am getting errors from the Layout/BlockEndNewLine cop when attempting to auto-correct the new RSpec/MatchArray cop.
Expected behavior
After upgrading to rubocop-rspec version 2.19.0, rubocop -a should automatically fix all offences for the new cop RSpec/MatchArray cop. Specifically, this code should be fixed:
I see errors regarding the Layout/BlockEndNewLine cop:
2 errors occurred:
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/Claim-for-Crown-Court-Defence/spec/services/stats/management_information/daily_report_generator_spec.rb:162:37.
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/Claim-for-Crown-Court-Defence/spec/services/stats/management_information/daily_report_generator_spec.rb:162:39.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues
Mention the following information in the issue report:
1.46.0 (using Parser 3.2.1.0, rubocop-ast 1.27.0, running on ruby 3.1.3) [arm64-darwin21]
This output with --debug is from a test file, using only the highlighted lines above rather than the entire repository:
% bundle exec rubocop --debug -a
For /Users/joseph.haig/workspace/rubocop_test: configuration from /Users/joseph.haig/workspace/rubocop_test/.rubocop.yml
configuration from /Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-capybara-2.17.1/config/default.yml
Default configuration from /Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/config/default.yml
configuration from /Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-capybara-2.17.1/lib/../config/default.yml
configuration from /Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rspec-2.19.0/config/default.yml
configuration from /Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rspec-2.19.0/config/default.yml
The following cops were added to RuboCop, but are not configured. Please set Enabled to either `true` or `false` in your `.rubocop.yml` file.
Please also note that you can opt-in to new cops by default by adding this to your config:
AllCops:
NewCops: enable
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
Enabled: true
Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: true
Layout/LineContinuationSpacing: # new in 1.31
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Layout/SpaceBeforeBrackets: # new in 1.7
Enabled: true
Lint/AmbiguousAssignment: # new in 1.7
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/ConstantOverwrittenInRescue: # new in 1.31
Enabled: true
Lint/DeprecatedConstants: # new in 1.8
Enabled: true
Lint/DuplicateBranch: # new in 1.3
Enabled: true
Lint/DuplicateMagicComment: # new in 1.37
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
Enabled: true
Lint/EmptyBlock: # new in 1.1
Enabled: true
Lint/EmptyClass: # new in 1.3
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/LambdaWithoutLiteralBlock: # new in 1.8
Enabled: true
Lint/NoReturnInBeginEndBlocks: # new in 1.2
Enabled: true
Lint/NonAtomicFileOperation: # new in 1.31
Enabled: true
Lint/NumberedParameterAssignment: # new in 1.9
Enabled: true
Lint/OrAssignmentToConstant: # new in 1.9
Enabled: true
Lint/RedundantDirGlobSort: # new in 1.8
Enabled: true
Lint/RefinementImportMethods: # new in 1.27
Enabled: true
Lint/RequireRangeParentheses: # new in 1.32
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Lint/SymbolConversion: # new in 1.9
Enabled: true
Lint/ToEnumArguments: # new in 1.1
Enabled: true
Lint/TripleQuotes: # new in 1.9
Enabled: true
Lint/UnexpectedBlockArity: # new in 1.5
Enabled: true
Lint/UnmodifiedReduceAccumulator: # new in 1.1
Enabled: true
Lint/UselessRescue: # new in 1.43
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Metrics/CollectionLiteralLength: # new in 1.47
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Security/CompoundHash: # new in 1.28
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/ArgumentsForwarding: # new in 1.1
Enabled: true
Style/ArrayIntersect: # new in 1.40
Enabled: true
Style/CollectionCompact: # new in 1.2
Enabled: true
Style/ComparableClamp: # new in 1.44
Enabled: true
Style/ConcatArrayLiterals: # new in 1.41
Enabled: true
Style/DirEmpty: # new in 1.48
Enabled: true
Style/DocumentDynamicEvalDefinition: # new in 1.1
Enabled: true
Style/EmptyHeredoc: # new in 1.32
Enabled: true
Style/EndlessMethod: # new in 1.8
Enabled: true
Style/EnvHome: # new in 1.29
Enabled: true
Style/FetchEnvVar: # new in 1.28
Enabled: true
Style/FileEmpty: # new in 1.48
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/HashConversion: # new in 1.10
Enabled: true
Style/HashExcept: # new in 1.7
Enabled: true
Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MagicCommentFormat: # new in 1.35
Enabled: true
Style/MapCompactWithConditionalBlock: # new in 1.30
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/MapToSet: # new in 1.42
Enabled: true
Style/MinMaxComparison: # new in 1.42
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NegatedIfElseCondition: # new in 1.2
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/NilLambda: # new in 1.3
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/ObjectThen: # new in 1.28
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: true
Style/OperatorMethodCall: # new in 1.37
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantArgument: # new in 1.4
Enabled: true
Style/RedundantConstantBase: # new in 1.40
Enabled: true
Style/RedundantDoubleSplatHashBraces: # new in 1.41
Enabled: true
Style/RedundantEach: # new in 1.38
Enabled: true
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
Enabled: true
Style/RedundantInitialize: # new in 1.27
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/RedundantStringEscape: # new in 1.37
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
Style/StringChars: # new in 1.12
Enabled: true
Style/SwapValues: # new in 1.1
Enabled: true
Capybara/MatchStyle: # new in 2.17
Enabled: true
Capybara/NegationMatcher: # new in 2.14
Enabled: true
Capybara/SpecificActions: # new in 2.14
Enabled: true
Capybara/SpecificFinders: # new in 2.13
Enabled: true
Capybara/SpecificMatcher: # new in 2.12
Enabled: true
RSpec/BeEq: # new in 2.9.0
Enabled: true
RSpec/BeNil: # new in 2.9.0
Enabled: true
RSpec/ChangeByZero: # new in 2.11
Enabled: true
RSpec/DuplicatedMetadata: # new in 2.16
Enabled: true
RSpec/ExcessiveDocstringSpacing: # new in 2.5
Enabled: true
RSpec/IdenticalEqualityAssertion: # new in 2.4
Enabled: true
RSpec/NoExpectationExample: # new in 2.13
Enabled: true
RSpec/PendingWithoutReason: # new in 2.16
Enabled: true
RSpec/RedundantAround: # new in 2.19
Enabled: true
RSpec/SkipBlockInsideExample: # new in 2.19
Enabled: true
RSpec/SortMetadata: # new in 2.14
Enabled: true
RSpec/SubjectDeclaration: # new in 2.5
Enabled: true
RSpec/VerifiedDoubleReference: # new in 2.10.0
Enabled: true
RSpec/FactoryBot/ConsistentParenthesesStyle: # new in 2.14
Enabled: true
RSpec/FactoryBot/FactoryNameStyle: # new in 2.16
Enabled: true
RSpec/FactoryBot/SyntaxMethods: # new in 2.7
Enabled: true
RSpec/Rails/AvoidSetupHook: # new in 2.4
Enabled: true
RSpec/Rails/HaveHttpStatus: # new in 2.12
Enabled: true
RSpec/Rails/InferredSpecType: # new in 2.14
Enabled: true
RSpec/Rails/MinitestAssertions: # new in 2.17
Enabled: true
RSpec/Rails/TravelAround: # new in 2.19
Enabled: true
For more information: https://docs.rubocop.org/rubocop/versioning.html
Use parallel by default.
Running parallel inspection
Loading cache from /Users/joseph.haig/.cache/rubocop_cache/7d2bdb9302c28c154e195f0a8b1b2c1b07738e5a/6d7a3b621ca1730e04accd938619e4bdab66cfb1/5e76a0feffc45392108f5236acd9d397d1a60b7c
Loading cache from /Users/joseph.haig/.cache/rubocop_cache/7d2bdb9302c28c154e195f0a8b1b2c1b07738e5a/6d7a3b621ca1730e04accd938619e4bdab66cfb1/8965ff3d06a394cc3fdf4c51b3c32e31a9c6d6fd
Inspecting 2 files
Scanning /Users/joseph.haig/workspace/rubocop_test/Gemfile
Loading cache from /Users/joseph.haig/.cache/rubocop_cache/7d2bdb9302c28c154e195f0a8b1b2c1b07738e5a/6d7a3b621ca1730e04accd938619e4bdab66cfb1/5e76a0feffc45392108f5236acd9d397d1a60b7c
.Scanning /Users/joseph.haig/workspace/rubocop_test/test_spec.rb
Loading cache from /Users/joseph.haig/.cache/rubocop_cache/7d2bdb9302c28c154e195f0a8b1b2c1b07738e5a/6d7a3b621ca1730e04accd938619e4bdab66cfb1/8965ff3d06a394cc3fdf4c51b3c32e31a9c6d6fd
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/rubocop_test/test_spec.rb:7:37.
Parser::Source::TreeRewriter detected clobbering
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:427:in `trigger_policy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:414:in `enforce_policy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:233:in `call'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:233:in `swallow'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:97:in `with'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:124:in `place_in_hierarchy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:106:in `do_combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:117:in `place_in_hierarchy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:131:in `block in combine_children'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `inject'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `combine_children'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:221:in `merge'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:104:in `do_combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:30:in `combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:143:in `merge!'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:317:in `apply_correction'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:406:in `attempt_correction'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:387:in `use_corrector'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:381:in `correct'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:181:in `add_offense'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/layout/block_end_newline.rb:47:in `register_offense'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/layout/block_end_newline.rb:39:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:107:in `public_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:105:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:69:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:20:in `walk'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:87:in `investigate'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/team.rb:156:in `investigate_partial'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/team.rb:91:in `investigate'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:345:in `block in inspect_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `flat_map'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `inspect_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:287:in `block in do_inspection_loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:321:in `block in iterate_until_no_changes'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:314:in `loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:314:in `iterate_until_no_changes'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:283:in `do_inspection_loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:164:in `block in file_offenses'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:189:in `file_offense_cache'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:163:in `file_offenses'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:154:in `process_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:135:in `block in each_inspected_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `reduce'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `each_inspected_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:120:in `inspect_files'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:73:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command.rb:11:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/environment.rb:18:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:118:in `run_command'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:125:in `execute_runners'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:51:in `block in run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:77:in `profile_if_needed'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:43:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/exe/rubocop:19:in `block in <top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/benchmark.rb:311:in `realtime'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/exe/rubocop:19:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/rubocop:25:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/rubocop:25:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:491:in `exec'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:28:in `start'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/libexec/bundle:45:in `block in <top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/libexec/bundle:33:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/bundle:25:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/bundle:25:in `<main>'
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/rubocop_test/test_spec.rb:7:39.
Parser::Source::TreeRewriter detected clobbering
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:427:in `trigger_policy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:414:in `enforce_policy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:233:in `call'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:233:in `swallow'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:97:in `with'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:124:in `place_in_hierarchy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:106:in `do_combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:117:in `place_in_hierarchy'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:131:in `block in combine_children'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `inject'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:130:in `combine_children'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:221:in `merge'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:104:in `do_combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter/action.rb:30:in `combine'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/parser-3.2.1.0/lib/parser/source/tree_rewriter.rb:143:in `merge!'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:317:in `apply_correction'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:406:in `attempt_correction'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:387:in `use_corrector'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:381:in `correct'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/base.rb:181:in `add_offense'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/layout/block_end_newline.rb:47:in `register_offense'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/layout/block_end_newline.rb:39:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:107:in `public_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:105:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:69:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:159:in `block in on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `each_with_index'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:156:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_send'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.27.0/lib/rubocop/ast/traversal.rb:20:in `walk'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/commissioner.rb:87:in `investigate'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/team.rb:156:in `investigate_partial'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cop/team.rb:91:in `investigate'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:345:in `block in inspect_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `flat_map'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:344:in `inspect_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:287:in `block in do_inspection_loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:321:in `block in iterate_until_no_changes'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:314:in `loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:314:in `iterate_until_no_changes'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:283:in `do_inspection_loop'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:164:in `block in file_offenses'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:189:in `file_offense_cache'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:163:in `file_offenses'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:154:in `process_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:135:in `block in each_inspected_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `each'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `reduce'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:134:in `each_inspected_file'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:120:in `inspect_files'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/runner.rb:73:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/command.rb:11:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli/environment.rb:18:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:118:in `run_command'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:125:in `execute_runners'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:51:in `block in run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:77:in `profile_if_needed'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/lib/rubocop/cli.rb:43:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/exe/rubocop:19:in `block in <top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/benchmark.rb:311:in `realtime'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.0/exe/rubocop:19:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/rubocop:25:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/rubocop:25:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:491:in `exec'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/cli.rb:28:in `start'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/libexec/bundle:45:in `block in <top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/joseph.haig/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/libexec/bundle:33:in `<top (required)>'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/bundle:25:in `load'
/Users/joseph.haig/.rbenv/versions/3.2.1/bin/bundle:25:in `<main>'
C
Offenses:
test_spec.rb:3:16: C: RSpec/DescribeClass: The first argument to describe should be the class or module being tested.
RSpec.describe 'test' do
^^^^^^
test_spec.rb:4:3: C: RSpec/ExampleLength: Example has too many lines. [8/5]
it { ...
^^^^
test_spec.rb:6:11: C: [Corrected] RSpec/MatchArray: Prefer contain_exactly when matching an array literal.
.to match_array([agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:6:52: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
.to contain_exactly(agfs_claim.misc_fees.map { |f|
^
test_spec.rb:6:119: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
.to contain_exactly(agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f|
^
test_spec.rb:6:121: C: [Corrected] Layout/LineLength: Line is too long. [123/120]
.to contain_exactly(agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f|
^^^
test_spec.rb:6:121: C: [Corrected] Layout/LineLength: Line is too long. [190/120]
.to contain_exactly(agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:6:121: C: [Corrected] Layout/LineLength: Line is too long. [226/120]
.to contain_exactly(agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:6:186: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
.to contain_exactly(agfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f| f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f|
^
test_spec.rb:7:1: C: [Corrected] Layout/IndentationWidth: Use 2 (not 1) spaces for indentation.
f.fee_type.description
^
test_spec.rb:7:2: C: [Corrected] Layout/IndentationWidth: Use 2 (not -25) spaces for indentation.
f.fee_type.description ...
^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:7:25: C: [Corrected] Layout/BlockEndNewline: Expression at 7, 25 should be on its own line.
f.fee_type.description }.join(' '))
^
test_spec.rb:7:63: C: [Corrected] Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f|
^
test_spec.rb:8:1: C: [Corrected] Layout/BlockAlignment: end at 8, 0 is not aligned with agfs_claim.misc_fees.map do |f| at 6, 26 or .to contain_exactly(agfs_claim.misc_fees.map do |f| at 6, 6.
end.join(' '), lgfs_claim.misc_fees.map do |f|
^^^
test_spec.rb:8:1: C: [Corrected] Layout/IndentationWidth: Use 2 (not 1) spaces for indentation.
f.fee_type.description
^
test_spec.rb:9:1: C: [Corrected] Layout/BlockAlignment: } at 9, 0 is not aligned with lgfs_claim.misc_fees.map { |f| at 7, 37 or f.fee_type.description }.join(' '), lgfs_claim.misc_fees.map { |f| at 7, 1.
}.join(' '))
^
test_spec.rb:9:1: C: [Corrected] Layout/IndentationWidth: Use 2 (not 1) spaces for indentation.
f.fee_type.description
^
test_spec.rb:9:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -35) spaces for indentation.
f.fee_type.description ...
^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:9:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -39) spaces for indentation.
f.fee_type.description ...
^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:9:25: C: [Corrected] Layout/BlockEndNewline: Expression at 9, 25 should be on its own line.
f.fee_type.description end.join(' '), lgfs_claim.misc_fees.map do |f|
^^^
test_spec.rb:9:40: C: [Corrected] Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
f.fee_type.description
test_spec.rb:10:1: C: [Corrected] Layout/BlockAlignment: end at 10, 0 is not aligned with lgfs_claim.misc_fees.map do |f| at 8, 41 or end.join(' '), lgfs_claim.misc_fees.map do |f| at 8, 26.
end.join(' '), lgfs_claim.misc_fees.map do |f|
^^^
test_spec.rb:10:38: C: [Corrected] Layout/BlockAlignment: end at 10, 37 is not aligned with lgfs_claim.misc_fees.map do |f| at 8, 39 or f.fee_type.description end.join(' '), lgfs_claim.misc_fees.map do |f| at 8, 1.
end.join(' '))
^^^
test_spec.rb:10:40: C: [Corrected] Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
f.fee_type.description
test_spec.rb:11:16: C: [Corrected] Layout/IndentationWidth: Use 2 (not 26) spaces for indentation.
f.fee_type.description
^^^^^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:11:18: C: [Corrected] Layout/IndentationWidth: Use 2 (not -39) spaces for indentation.
f.fee_type.description ...
^^^^^^^^^^^^^^^^^^^^^^
test_spec.rb:11:40: C: [Corrected] Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
f.fee_type.description
test_spec.rb:12:16: C: [Corrected] Layout/BlockAlignment: end at 12, 15 is not aligned with lgfs_claim.misc_fees.map do |f| at 10, 56 or end.join(' '), lgfs_claim.misc_fees.map do |f| at 10, 41.
end.join(' '))
^^^
test_spec.rb:12:40: C: [Corrected] Layout/BlockAlignment: end at 12, 39 is not aligned with lgfs_claim.misc_fees.map do |f| at 10, 15 or end.join(' '), lgfs_claim.misc_fees.map do |f| at 10, 0.
end.join(' '))
^^^
2 files inspected, 29 offenses detected, 27 offenses corrected
2 errors occurred:
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/rubocop_test/test_spec.rb:7:37.
An error occurred while Layout/BlockEndNewline cop was inspecting /Users/joseph.haig/workspace/rubocop_test/test_spec.rb:7:39.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues
Mention the following information in the issue report:
1.48.0 (using Parser 3.2.1.0, rubocop-ast 1.27.0, running on ruby 3.2.1) [arm64-darwin22]
Finished in 0.378487000009045 seconds
joseph.haig@MJ004036 rubocop_test
Describe here what actually happened.
Please use rubocop --debug when pasting rubocop output as it contains additional information.
Fixesrubocop#11672.
This PR fixes an error for `Layout/BlockEndNewline` when multiline block `}`
is not on its own line and it is used as multiple arguments.
And the following case is handled by `Style/Semicolon`:
```ruby
test do
foo
; end
```
So make it out of the responsibility of `Layout/BlockEndNewline`.
After upgrading
rubocop-rspec
to version 2.19.0 I am getting errors from theLayout/BlockEndNewLine
cop when attempting to auto-correct the newRSpec/MatchArray
cop.Expected behavior
After upgrading to
rubocop-rspec
version 2.19.0,rubocop -a
should automatically fix all offences for the new copRSpec/MatchArray
cop. Specifically, this code should be fixed:Reference: https://github.com/ministryofjustice/Claim-for-Crown-Court-Defence/blob/dedd73ccd87a68eebb968aaa6e02f6779807dd56/spec/services/stats/management_information/daily_report_generator_spec.rb#LL166-L171C8
Actual behavior
I see errors regarding the
Layout/BlockEndNewLine
cop:This output with
--debug
is from a test file, using only the highlighted lines above rather than the entire repository:Describe here what actually happened.
Please use
rubocop --debug
when pasting rubocop output as it contains additional information.Steps to reproduce the problem
Run rubocop with the following files:
RuboCop version
The text was updated successfully, but these errors were encountered: