Skip to content

Commit 0c5a7df

Browse files
committed
Enable Layout/ClosingParenthesisIndentation cop
* 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
1 parent 6ce404a commit 0c5a7df

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Layout/CaseIndentation:
2424
Layout/ClosingHeredocIndentation:
2525
Enabled: true
2626

27+
Layout/ClosingParenthesisIndentation:
28+
Enabled: true
29+
2730
# Align comments with method definitions.
2831
Layout/CommentIndentation:
2932
Enabled: true

lib/active_record/connection_adapters/oracle_enhanced/context_index.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ def create_datastore_procedure(table_name, procedure_name, column_names, options
153153
(p_rowid IN ROWID,
154154
p_clob IN OUT NOCOPY CLOB) IS
155155
-- add_context_index_parameters #{(column_names + select_queries).inspect}#{!options.empty? ? +', ' << options.inspect[1..-2] : ''}
156-
#{
156+
#{
157157
selected_columns.map do |cols|
158158
cols.map do |col|
159159
raise ArgumentError, "Alias #{col} too large, should be 28 or less characters long" unless col.length <= 28
160160
"l_#{col} VARCHAR2(32767);\n"
161161
end.join
162162
end.join
163-
} BEGIN
163+
} BEGIN
164164
FOR r1 IN (
165165
SELECT #{quoted_column_names.join(', ')}
166166
FROM #{quoted_table_name}
@@ -194,7 +194,7 @@ def create_datastore_procedure(table_name, procedure_name, column_names, options
194194
"DBMS_LOB.WRITEAPPEND(p_clob, #{col.length + 3}, '</#{col}>');\n"
195195
end.join)
196196
end.join)
197-
}
197+
}
198198
END LOOP;
199199
END;
200200
SQL

lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def new_column_from_field(table_name, field)
669669
type_metadata,
670670
field["nullable"] == "Y",
671671
comment: field["column_comment"]
672-
)
672+
)
673673
end
674674

675675
def fetch_type_metadata(sql_type, virtual = nil)

0 commit comments

Comments
 (0)