-
Notifications
You must be signed in to change notification settings - Fork 328
Enable Layout/ClosingParenthesisIndentation cop
#2193
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
Enable Layout/ClosingParenthesisIndentation cop
#2193
Conversation
|
@koic Would you review this pull request ? |
| end.join | ||
| end.join | ||
| } BEGIN | ||
| } BEGIN |
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 following may make the pair of parentheses even clearer.
@@ -153,14 +153,14 @@ module ActiveRecord
(p_rowid IN ROWID,
p_clob IN OUT NOCOPY CLOB) IS
-- add_context_index_parameters #{(column_names + select_queries).inspect}#{!options.empty? ? +', ' << options.inspect[1..-2] : ''}
- #{
+ #{
selected_columns.map do |cols|
cols.map do |col|
raise ArgumentError, "Alias #{col} too large, should be 28 or less characters long" unless col.length <= 28
"l_#{col} VARCHAR2(32767);\n"
end.join
end.join
- } BEGIN
+ } BEGIN
FOR r1 IN (
SELECT #{quoted_column_names.join(', ')}
FROM #{quoted_table_name}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.
Thanks for the review. Updated and pushed.
koic
left a comment
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.
Looks good to me. Can you squash your commits into one?
* Performed auto correct
```ruby
$ bundle exec rubocop
Inspecting 70 files
........C..............C..............................................
Offenses:
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:163:17: C: [Correctable] Layout/ClosingParenthesisIndentation: Indent ) to column 14 (not 16)
} BEGIN
^
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:197:19: C: [Correctable] Layout/ClosingParenthesisIndentation: Indent ) to column 16 (not 18)
}
^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:672:23: C: [Correctable] Layout/ClosingParenthesisIndentation: Indent ) to column 12 (not 22)
)
^
70 files inspected, 3 offenses detected, 3 offenses auto-correctable
```
* Correct open brace location manually
```
$
diff --git a/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb b/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb
index e7626f0..ab04cc1 100644
--- a/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb
+++ b/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb
@@ -153,7 +153,7 @@ module ActiveRecord
(p_rowid IN ROWID,
p_clob IN OUT NOCOPY CLOB) IS
-- add_context_index_parameters #{(column_names + select_queries).inspect}#{!options.empty? ? +', ' << options.inspect[1..-2] : ''}
- #{
+ #{
selected_columns.map do |cols|
cols.map do |col|
raise ArgumentError, "Alias #{col} too large, should be 28 or less characters long" unless col.length <= 28
```
Refer rails/rails@d7fce6c
https://github.com/rubocop/rubocop/blame/master/relnotes/v1.18.0.md#L11
589fdb5 to
0c5a7df
Compare
|
Thanks. Squashed commits. |
|
Thanks! |
This pull request enables
Layout/ClosingParenthesisIndentationcop.Refer rails/rails@d7fce6c
https://github.com/rubocop/rubocop/blame/master/relnotes/v1.18.0.md#L11