Skip to content

Commit

Permalink
Let Layout/LeadingCommentSpac cop address #:nodoc offenses
Browse files Browse the repository at this point in the history
Refer
rubocop/rubocop#9964

```
% bundle exec rubocop -a
Inspecting 70 files
.....CCC.CC..C.CC.CC.CCCCC.C..........................................

Offenses:

lib/active_record/connection_adapters/emulation/oracle_adapter.rb:3:113: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
class ActiveRecord::ConnectionAdapters::OracleAdapter < ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter #:nodoc:
                                                                                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/column.rb:4:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/column.rb:9:91: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def initialize(name, default, sql_type_metadata = nil, null = true, comment: nil) #:nodoc:
                                                                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/connection.rb:7:24: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class Connection #:nodoc:
                       ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/connection.rb:121:49: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class ConnectionException < StandardError #:nodoc:
                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb:12:32: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def table_alias_length #:nodoc:
                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:167:34: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def begin_db_transaction #:nodoc:
                                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:186:35: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def commit_db_transaction #:nodoc:
                                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:192:42: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def exec_rollback_db_transaction #:nodoc:
                                         ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:198:61: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def create_savepoint(name = current_savepoint_name) #:nodoc:
                                                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:202:71: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def exec_rollback_to_savepoint(name = current_savepoint_name) #:nodoc:
                                                                      ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:206:62: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def release_savepoint(name = current_savepoint_name) #:nodoc:
                                                             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:217:49: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def insert_fixture(fixture, table_name) #:nodoc:
                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:252:64: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def write_lobs(table_name, klass, attributes, columns) #:nodoc:
                                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb:55:57: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class JDBCConnection < OracleEnhanced::Connection #:nodoc:
                                                        ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:3:21: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
module ActiveRecord #:nodoc:
                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:4:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:5:27: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    module OracleEnhanced #:nodoc:
                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:6:18: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      module Lob #:nodoc:
                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:29:56: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class OCIConnection < OracleEnhanced::Connection #:nodoc:
                                                       ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:302:38: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class OracleEnhancedOCIFactory #:nodoc:
                                     ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:378:1: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:379:53: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
class OCI8EnhancedAutoRecover < DelegateClass(OCI8) #:nodoc:
                                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:380:25: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  attr_accessor :active #:nodoc:
                        ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:381:26: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  alias :active? :active #:nodoc:
                         ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:385:36: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    alias :auto_retry? :auto_retry #:nodoc:
                                   ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:389:35: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  def initialize(config, factory) #:nodoc:
                                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:400:12: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  def ping #:nodoc:
           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:409:14: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  def reset! #:nodoc:
             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:426:64: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  LOST_CONNECTION_ERROR_CODES = [ 28, 1012, 3113, 3114, 3135 ] #:nodoc:
                                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:429:18: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  def with_retry #:nodoc:
                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:444:36: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  def exec(sql, *bindvars, &block) #:nodoc:
                                   ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:448:1: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/procedures.rb:5:21: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
module ActiveRecord #:nodoc:
                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/procedures.rb:36:35: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module OracleEnhancedProcedures #:nodoc:
                                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/procedures.rb:86:17: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    def destroy #:nodoc:
                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:11:37: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quote_column_name(name) #:nodoc:
                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:23:51: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quote_column_name_or_expression(name) #:nodoc:
                                                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:58:42: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def self.valid_table_name?(name) #:nodoc:
                                         ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:68:36: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quote_table_name(name) #:nodoc:
                                   ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:73:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quote_string(s) #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:77:27: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def _quote(value) #:nodoc:
                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:94:25: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quoted_true #:nodoc:
                        ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:99:27: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def unquoted_true #:nodoc:
                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:104:26: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def quoted_false #:nodoc:
                         ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:109:28: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def unquoted_false #:nodoc:
                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb:38:78: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class SynonymDefinition < Struct.new(:name, :table_owner, :table_name) #:nodoc:
                                                                             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb:3:21: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
module ActiveRecord #:nodoc:
                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb:4:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb:5:27: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    module OracleEnhanced #:nodoc:
                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb:6:61: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      class SchemaDumper < ConnectionAdapters::SchemaDumper #:nodoc:
                                                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:13:20: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def tables #:nodoc:
                   ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:69:32: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def materialized_views #:nodoc:
                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:89:33: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def indexes(table_name) #:nodoc:
                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:255:48: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def rename_table(table_name, new_name) #:nodoc:
                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:267:47: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def drop_table(table_name, **options) #:nodoc:
                                              ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:298:59: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def add_index(table_name, column_name, **options) #:nodoc:
                                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:308:81: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def add_index_options(table_name, column_name, comment: nil, **options) #:nodoc:
                                                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:332:68: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def remove_index(table_name, column_name = nil, **options) #:nodoc:
                                                                   ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:340:45: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def index_name(table_name, options) #:nodoc:
                                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:380:58: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def rename_index(table_name, old_name, new_name) #:nodoc:
                                                         ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:415:66: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def add_column(table_name, column_name, type, **options) #:nodoc:
                                                                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:432:80: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def change_column_default(table_name, column_name, default_or_changes) #:nodoc:
                                                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:439:78: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def change_column_null(table_name, column_name, null, default = nil) #:nodoc:
                                                                             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:449:69: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def change_column(table_name, column_name, type, **options) #:nodoc:
                                                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:473:69: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def rename_column(table_name, column_name, new_column_name) #:nodoc:
                                                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:480:78: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def remove_column(table_name, column_name, type = nil, options = {}) #:nodoc:
                                                                             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:510:39: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def table_comment(table_name) #:nodoc:
                                      ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:526:53: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def column_comment(table_name, column_name) #:nodoc:
                                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:538:75: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def type_to_sql(type, limit: nil, precision: nil, scale: nil, **) #:nodoc:
                                                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:555:38: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def foreign_keys(table_name) #:nodoc:
                                     ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:599:51: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def disable_referential_integrity(&block) #:nodoc:
                                                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:3:21: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
module ActiveRecord #:nodoc:
                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:4:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:5:27: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    module OracleEnhanced #:nodoc:
                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:6:28: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      module StructureDump #:nodoc:
                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:10:28: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump #:nodoc:
                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:63:43: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_column(column) #:nodoc:
                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:78:65: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_virtual_column(column, data_default) #:nodoc:
                                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:92:47: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_primary_key(table) #:nodoc:
                                              ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:111:47: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_unique_keys(table) #:nodoc:
                                              ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:132:48: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_indexes(table_name) #:nodoc:
                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:148:43: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_fk_constraints #:nodoc:
                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:193:60: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def foreign_key_definition(to_table, options = {}) #:nodoc:
                                                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:210:43: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_db_stored_code #:nodoc:
                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:242:34: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_views #:nodoc:
                                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:254:37: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_dump_synonyms #:nodoc:
                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:268:28: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def structure_drop #:nodoc:
                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:291:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def temp_table_drop #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb:303:48: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def full_drop(preserve_tables = false) #:nodoc:
                                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/type_metadata.rb:4:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:66:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionHandling #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:68:44: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
    def oracle_enhanced_connection(config) #:nodoc:
                                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:82:29: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
  module ConnectionAdapters #:nodoc:
                            ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:252:24: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def adapter_name #:nodoc:
                       ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:276:32: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def supports_savepoints? #:nodoc:
                               ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:280:43: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def supports_transaction_isolation? #:nodoc:
                                          ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:363:7: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      #:stopdoc:
      ^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:382:7: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      #:stopdoc:
      ^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:388:7: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      #:stopdoc:
      ^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:412:7: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      #:startdoc:
      ^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:414:33: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def native_database_types #:nodoc:
                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:424:31: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      attr_reader :auto_retry #:nodoc:
                              ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:427:30: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def auto_retry=(value) #:nodoc:
                             ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:438:19: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def active? #:nodoc:
                  ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:449:22: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def reconnect! #:nodoc:
                     ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:462:23: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def disconnect! #:nodoc:
                      ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:500:82: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def reset_pk_sequence!(table_name, primary_key = nil, sequence_name = nil) #:nodoc:
                                                                                 ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:594:79: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def pk_and_sequence_for(table_name, owner = nil, desc_table_name = nil) #:nodoc:
                                                                              ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:632:76: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def has_primary_key?(table_name, owner = nil, desc_table_name = nil) #:nodoc:
                                                                           ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:652:49: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def columns_for_distinct(columns, orders) #:nodoc:
                                                ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:668:40: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
      def temporary_table?(table_name) #:nodoc:
                                       ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:734:37: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def extract_limit(sql_type) #:nodoc:
                                    ^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:743:68: C: [Corrected] Layout/LeadingCommentSpace: Missing space after #.
        def translate_exception(exception, message:, sql:, binds:) #:nodoc:
                                                                   ^^^^^^^^

70 files inspected, 114 offenses detected, 114 offenses corrected
yahonda@mymacbookpro oracle-enhanced %
  • Loading branch information
yahonda committed Aug 13, 2021
1 parent 383bc85 commit 11fac7f
Show file tree
Hide file tree
Showing 16 changed files with 114 additions and 114 deletions.
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class ActiveRecord::ConnectionAdapters::OracleAdapter < ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter #:nodoc:
class ActiveRecord::ConnectionAdapters::OracleAdapter < ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter # :nodoc:
def adapter_name
"Oracle"
end
Expand Down
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module ActiveRecord
module ConnectionAdapters #:nodoc:
module ConnectionAdapters # :nodoc:
module OracleEnhanced
class Column < ActiveRecord::ConnectionAdapters::Column
delegate :virtual, to: :sql_type_metadata, allow_nil: true

def initialize(name, default, sql_type_metadata = nil, null = true, comment: nil) #:nodoc:
def initialize(name, default, sql_type_metadata = nil, null = true, comment: nil) # :nodoc:
super(name, default, sql_type_metadata, null, comment: comment)
end

Expand Down
Expand Up @@ -4,7 +4,7 @@ module ActiveRecord
module ConnectionAdapters
# interface independent methods
module OracleEnhanced
class Connection #:nodoc:
class Connection # :nodoc:
def self.create(config)
case ORACLE_ENHANCED_CONNECTION
when :oci
Expand Down Expand Up @@ -118,7 +118,7 @@ def _select_value(arel, name = nil, binds = [])
def database_version
raise NoMethodError, "Not implemented for this raw driver"
end
class ConnectionException < StandardError #:nodoc:
class ConnectionException < StandardError # :nodoc:
end
end
end
Expand Down
Expand Up @@ -9,7 +9,7 @@ module DatabaseLimits
# maximum length of Oracle identifiers
IDENTIFIER_MAX_LENGTH = 30

def table_alias_length #:nodoc:
def table_alias_length # :nodoc:
IDENTIFIER_MAX_LENGTH
end

Expand Down
Expand Up @@ -164,7 +164,7 @@ def exec_update(sql, name = nil, binds = [])

alias :exec_delete :exec_update

def begin_db_transaction #:nodoc:
def begin_db_transaction # :nodoc:
@connection.autocommit = false
end

Expand All @@ -183,27 +183,27 @@ def begin_isolated_db_transaction(isolation)
execute "SET TRANSACTION ISOLATION LEVEL #{transaction_isolation_levels.fetch(isolation)}"
end

def commit_db_transaction #:nodoc:
def commit_db_transaction # :nodoc:
@connection.commit
ensure
@connection.autocommit = true
end

def exec_rollback_db_transaction #:nodoc:
def exec_rollback_db_transaction # :nodoc:
@connection.rollback
ensure
@connection.autocommit = true
end

def create_savepoint(name = current_savepoint_name) #:nodoc:
def create_savepoint(name = current_savepoint_name) # :nodoc:
execute("SAVEPOINT #{name}", "TRANSACTION")
end

def exec_rollback_to_savepoint(name = current_savepoint_name) #:nodoc:
def exec_rollback_to_savepoint(name = current_savepoint_name) # :nodoc:
execute("ROLLBACK TO #{name}", "TRANSACTION")
end

def release_savepoint(name = current_savepoint_name) #:nodoc:
def release_savepoint(name = current_savepoint_name) # :nodoc:
# there is no RELEASE SAVEPOINT statement in Oracle
end

Expand All @@ -214,7 +214,7 @@ def default_sequence_name(table_name, primary_key = nil)
end

# Inserts the given fixture into the table. Overridden to properly handle lobs.
def insert_fixture(fixture, table_name) #:nodoc:
def insert_fixture(fixture, table_name) # :nodoc:
super

if ActiveRecord::Base.pluralize_table_names
Expand Down Expand Up @@ -249,7 +249,7 @@ def empty_insert_statement_value
end

# Writes LOB values from attributes for specified columns
def write_lobs(table_name, klass, attributes, columns) #:nodoc:
def write_lobs(table_name, klass, attributes, columns) # :nodoc:
id = quote(attributes[klass.primary_key])
columns.each do |col|
value = attributes[col.name]
Expand Down
Expand Up @@ -52,7 +52,7 @@ module ActiveRecord
module ConnectionAdapters
# JDBC database interface for JRuby
module OracleEnhanced
class JDBCConnection < OracleEnhanced::Connection #:nodoc:
class JDBCConnection < OracleEnhanced::Connection # :nodoc:
attr_accessor :active
alias :active? :active

Expand Down
8 changes: 4 additions & 4 deletions lib/active_record/connection_adapters/oracle_enhanced/lob.rb
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module ActiveRecord #:nodoc:
module ConnectionAdapters #:nodoc:
module OracleEnhanced #:nodoc:
module Lob #:nodoc:
module ActiveRecord # :nodoc:
module ConnectionAdapters # :nodoc:
module OracleEnhanced # :nodoc:
module Lob # :nodoc:
extend ActiveSupport::Concern

included do
Expand Down
Expand Up @@ -26,7 +26,7 @@ module ActiveRecord
module ConnectionAdapters
# OCI database interface for MRI
module OracleEnhanced
class OCIConnection < OracleEnhanced::Connection #:nodoc:
class OCIConnection < OracleEnhanced::Connection # :nodoc:
def initialize(config)
@raw_connection = OCI8EnhancedAutoRecover.new(config, OracleEnhancedOCIFactory)
# default schema owner
Expand Down Expand Up @@ -299,7 +299,7 @@ def create_time_with_default_timezone(value)

# The OracleEnhancedOCIFactory factors out the code necessary to connect and
# configure an Oracle/OCI connection.
class OracleEnhancedOCIFactory #:nodoc:
class OracleEnhancedOCIFactory # :nodoc:
DEFAULT_TCP_KEEPALIVE_TIME = 600

def self.new_connection(config)
Expand Down Expand Up @@ -375,18 +375,18 @@ def self.new_connection(config)
# this would be dangerous (as the earlier part of the implied transaction
# may have failed silently if the connection died) -- so instead the
# connection is marked as dead, to be reconnected on it's next use.
#:stopdoc:
class OCI8EnhancedAutoRecover < DelegateClass(OCI8) #:nodoc:
attr_accessor :active #:nodoc:
alias :active? :active #:nodoc:
# :stopdoc:
class OCI8EnhancedAutoRecover < DelegateClass(OCI8) # :nodoc:
attr_accessor :active # :nodoc:
alias :active? :active # :nodoc:

cattr_accessor :auto_retry
class << self
alias :auto_retry? :auto_retry #:nodoc:
alias :auto_retry? :auto_retry # :nodoc:
end
@@auto_retry = false

def initialize(config, factory) #:nodoc:
def initialize(config, factory) # :nodoc:
@active = true
@config = config
@factory = factory
Expand All @@ -397,7 +397,7 @@ def initialize(config, factory) #:nodoc:
# Checks connection, returns true if active. Note that ping actively
# checks the connection, while #active? simply returns the last
# known state.
def ping #:nodoc:
def ping # :nodoc:
@connection.exec("select 1 from dual") { |r| nil }
@active = true
rescue
Expand All @@ -406,7 +406,7 @@ def ping #:nodoc:
end

# Resets connection, by logging off and creating a new connection.
def reset! #:nodoc:
def reset! # :nodoc:
logoff rescue nil
begin
@connection = @factory.new_connection @config
Expand All @@ -423,10 +423,10 @@ def reset! #:nodoc:
# ORA-03113: end-of-file on communication channel
# ORA-03114: not connected to ORACLE
# ORA-03135: connection lost contact
LOST_CONNECTION_ERROR_CODES = [ 28, 1012, 3113, 3114, 3135 ] #:nodoc:
LOST_CONNECTION_ERROR_CODES = [ 28, 1012, 3113, 3114, 3135 ] # :nodoc:

# Adds auto-recovery functionality.
def with_retry #:nodoc:
def with_retry # :nodoc:
should_retry = self.class.auto_retry? && autocommit?

begin
Expand All @@ -441,8 +441,8 @@ def with_retry #:nodoc:
end
end

def exec(sql, *bindvars, &block) #:nodoc:
def exec(sql, *bindvars, &block) # :nodoc:
with_retry { @connection.exec(sql, *bindvars, &block) }
end
end
#:startdoc:
# :startdoc:
Expand Up @@ -2,7 +2,7 @@

require "active_support"

module ActiveRecord #:nodoc:
module ActiveRecord # :nodoc:
# Custom create, update, delete methods functionality.
#
# Example:
Expand Down Expand Up @@ -33,7 +33,7 @@ module ActiveRecord #:nodoc:
# end
# end
#
module OracleEnhancedProcedures #:nodoc:
module OracleEnhancedProcedures # :nodoc:
module ClassMethods
# Specify custom create method which should be used instead of Rails generated INSERT statement.
# Provided block should return ID of new record.
Expand Down Expand Up @@ -83,7 +83,7 @@ def self.included(base)
end
end

def destroy #:nodoc:
def destroy # :nodoc:
# check if class has custom delete method
if self.class.custom_delete_method
# wrap destroy in transaction
Expand Down
20 changes: 10 additions & 10 deletions lib/active_record/connection_adapters/oracle_enhanced/quoting.rb
Expand Up @@ -8,7 +8,7 @@ module Quoting
#
# see: abstract/quoting.rb

def quote_column_name(name) #:nodoc:
def quote_column_name(name) # :nodoc:
name = name.to_s
self.class.quoted_column_names[name] ||= if /\A[a-z][a-z_0-9$#]*\Z/.match?(name)
"\"#{name.upcase}\""
Expand All @@ -20,7 +20,7 @@ def quote_column_name(name) #:nodoc:

# This method is used in add_index to identify either column name (which is quoted)
# or function based index (in which case function expression is not quoted)
def quote_column_name_or_expression(name) #:nodoc:
def quote_column_name_or_expression(name) # :nodoc:
name = name.to_s
case name
# if only valid lowercase column characters in name
Expand Down Expand Up @@ -55,7 +55,7 @@ def quote_column_name_or_expression(name) #:nodoc:
# contain letters, digits, _, $ or #
# can be prefixed with schema name
# CamelCase table names should be quoted
def self.valid_table_name?(name) #:nodoc:
def self.valid_table_name?(name) # :nodoc:
object_name = name.to_s
!!(object_name =~ VALID_TABLE_NAME && !mixed_case?(object_name))
end
Expand All @@ -65,16 +65,16 @@ def self.mixed_case?(name)
!!(object_name =~ /[A-Z]/ && object_name =~ /[a-z]/)
end

def quote_table_name(name) #:nodoc:
def quote_table_name(name) # :nodoc:
name, _link = name.to_s.split("@")
self.class.quoted_table_names[name] ||= [name.split(".").map { |n| quote_column_name(n) }].join(".")
end

def quote_string(s) #:nodoc:
def quote_string(s) # :nodoc:
s.gsub(/'/, "''")
end

def _quote(value) #:nodoc:
def _quote(value) # :nodoc:
case value
when Type::OracleEnhanced::CharacterString::Data then
"'#{quote_string(value.to_s)}'"
Expand All @@ -91,22 +91,22 @@ def _quote(value) #:nodoc:
end
end

def quoted_true #:nodoc:
def quoted_true # :nodoc:
return "'Y'" if emulate_booleans_from_strings
"1"
end

def unquoted_true #:nodoc:
def unquoted_true # :nodoc:
return "Y" if emulate_booleans_from_strings
"1"
end

def quoted_false #:nodoc:
def quoted_false # :nodoc:
return "'N'" if emulate_booleans_from_strings
"0"
end

def unquoted_false #:nodoc:
def unquoted_false # :nodoc:
return "N" if emulate_booleans_from_strings
"0"
end
Expand Down
Expand Up @@ -35,7 +35,7 @@ def initialize(
end
end

class SynonymDefinition < Struct.new(:name, :table_owner, :table_name) #:nodoc:
class SynonymDefinition < Struct.new(:name, :table_owner, :table_name) # :nodoc:
end

class IndexDefinition < ActiveRecord::ConnectionAdapters::IndexDefinition
Expand Down
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module ActiveRecord #:nodoc:
module ConnectionAdapters #:nodoc:
module OracleEnhanced #:nodoc:
class SchemaDumper < ConnectionAdapters::SchemaDumper #:nodoc:
module ActiveRecord # :nodoc:
module ConnectionAdapters # :nodoc:
module OracleEnhanced # :nodoc:
class SchemaDumper < ConnectionAdapters::SchemaDumper # :nodoc:
DEFAULT_PRIMARY_KEY_COLUMN_SPEC = { precision: "38", null: "false" }.freeze
private_constant :DEFAULT_PRIMARY_KEY_COLUMN_SPEC

Expand Down

0 comments on commit 11fac7f

Please sign in to comment.