Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive for Layout/ClosingParenthesisIndentation
This PR fixes a false negative for `Layout/ClosingParenthesisIndentation` when first argument is multiline. The following is a reproduction step. ```bash % rubocop -V 0.59.2 (using Parser 2.5.1.2, running on ruby 2.5.0 x86_64-darwin17) % cat app/models/users.rb class User < ApplicationRecord def self.complex_find where( "users.approved_at < ? OR users.approved_at IS NULL", 3.days.ago ) end end % rubocop app/models/users.rb --only Layout/ClosingParenthesisIndentation -d or /Users/anton/code/rubocop: configuration from /Users/anton/code/rubocop/.rubocop.yml configuration from /Users/anton/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rubocop-rspec-1.29.1/config/default.yml configuration from /Users/anton/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rubocop-rspec-1.29.1/config/default.yml Default configuration from /Users/anton/code/rubocop/config/default.yml Inheriting configuration from /Users/anton/code/rubocop/.rubocop_todo.yml Inspecting 1 file Scanning /Users/anton/code/rubocop/users.rb C Offenses: users.rb:6:5: C: Layout/ClosingParenthesisIndentation: Indent ) to column 5 (not 4) ) ^ 1 file inspected, 1 offense detected Finished in 0.5669199999974808 seconds ```
- Loading branch information