Skip to content

Add env var to run specs only for one database #1

Add env var to run specs only for one database

Add env var to run specs only for one database #1

GitHub Actions / rubocop failed Dec 3, 2024 in 1s

reviewdog [rubocop] report

reported by reviewdog 🐶

Findings (22)

Rakefile|147 col 29| [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
lib/apartment.rb|68 col 7| [Correctable] Style/RedundantParentheses: Don't use parentheses around a logical expression.
lib/apartment/active_record/postgres/schema_dumper.rb|1 col 1| [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.
lib/apartment/active_record/postgres/schema_dumper.rb|4 col 9| [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
lib/apartment/active_record/postgres/schema_dumper.rb|5 col 9| [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
lib/apartment/active_record/postgres/schema_dumper.rb|7 col 1| Style/Documentation: Missing top-level documentation comment for class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper.
lib/apartment/active_record/postgres/schema_dumper.rb|7 col 7| [Correctable] Style/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.
lib/apartment/active_record/postgres/schema_dumper.rb|8 col 3| [Correctable] Style/Alias: Use alias instead of alias_method in a class body.
lib/apartment/adapters/sqlite3_adapter.rb|43 col 9| [Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
lib/apartment/elevators/host_hash.rb|12 col 9| [Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
lib/apartment/log_subscriber.rb|11 col 7| [Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
lib/apartment/log_subscriber.rb|17 col 31| [Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
lib/apartment/log_subscriber.rb|20 col 7| [Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
lib/apartment/log_subscriber.rb|20 col 23| [Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
lib/apartment/migrator.rb|7 col 5| [Correctable] Style/ModuleFunction: Use module_function instead of extend self.
lib/apartment/migrator.rb|45 col 1| [Correctable] Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end.
spec/dummy/config/initializers/backtrace_silencers.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
spec/dummy/config/initializers/inflections.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
spec/dummy/config/initializers/mime_types.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
spec/dummy_engine/test/dummy/config/initializers/inflections.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
spec/dummy_engine/test/dummy/config/initializers/mime_types.rb|2 col 1| [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.

Filtered Findings (0)

Annotations

Check failure on line 147 in Rakefile

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] Rakefile#L147

[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Raw output
Rakefile:147:29: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  if ActiveRecord.version > "7.1"
                            ^^^^^

Check failure on line 68 in lib/apartment.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment.rb#L68

[Correctable] Style/RedundantParentheses: Don't use parentheses around a logical expression.
Raw output
lib/apartment.rb:68:7: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around a logical expression.
      (tenants_with_config[tenant] || connection_config)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 1 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L1

[Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:1:1: C: [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.
# This patch prevents `create_schema` from being added to db/schema.rb as schemas are managed by Apartment
^

Check failure on line 4 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L4

[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:4:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "active_record/connection_adapters/abstract/schema_dumper"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 5 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L5

[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:5:9: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "active_record/connection_adapters/postgresql/schema_dumper"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 7 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L7

Style/Documentation: Missing top-level documentation comment for class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:7:1: C: Style/Documentation: Missing top-level documentation comment for class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper.
class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 7 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L7

[Correctable] Style/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:7:7: C: [Correctable] Style/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.
class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 8 in lib/apartment/active_record/postgres/schema_dumper.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/active_record/postgres/schema_dumper.rb#L8

[Correctable] Style/Alias: Use alias instead of alias_method in a class body.
Raw output
lib/apartment/active_record/postgres/schema_dumper.rb:8:3: C: [Correctable] Style/Alias: Use alias instead of alias_method in a class body.
  alias_method :_original_schemas, :schemas
  ^^^^^^^^^^^^

Check failure on line 43 in lib/apartment/adapters/sqlite3_adapter.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/adapters/sqlite3_adapter.rb#L43

[Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
Raw output
lib/apartment/adapters/sqlite3_adapter.rb:43:9: C: [Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
        super database_file(tenant)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 12 in lib/apartment/elevators/host_hash.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/elevators/host_hash.rb#L12

[Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
Raw output
lib/apartment/elevators/host_hash.rb:12:9: C: [Correctable] Style/SuperWithArgsParentheses: Use parentheses for super with arguments.
        super app, processor
        ^^^^^^^^^^^^^^^^^^^^

Check failure on line 11 in lib/apartment/log_subscriber.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/log_subscriber.rb#L11

[Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
Raw output
lib/apartment/log_subscriber.rb:11:7: C: [Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
      super(event)
      ^^^^^^^^^^^^

Check failure on line 17 in lib/apartment/log_subscriber.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/log_subscriber.rb#L17

[Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
Raw output
lib/apartment/log_subscriber.rb:17:31: C: [Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
    def debug(progname = nil, &block)
                              ^^^^^^

Check failure on line 20 in lib/apartment/log_subscriber.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/log_subscriber.rb#L20

[Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
Raw output
lib/apartment/log_subscriber.rb:20:7: C: [Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
      super(progname, &block)
      ^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 20 in lib/apartment/log_subscriber.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/log_subscriber.rb#L20

[Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
Raw output
lib/apartment/log_subscriber.rb:20:23: C: [Correctable] Style/ArgumentsForwarding: Use anonymous block arguments forwarding (&).
      super(progname, &block)
                      ^^^^^^

Check failure on line 7 in lib/apartment/migrator.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/migrator.rb#L7

[Correctable] Style/ModuleFunction: Use module_function instead of extend self.
Raw output
lib/apartment/migrator.rb:7:5: C: [Correctable] Style/ModuleFunction: Use module_function instead of extend self.
    extend self
    ^^^^^^^^^^^

Check failure on line 45 in lib/apartment/migrator.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] lib/apartment/migrator.rb#L45

[Correctable] Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end.
Raw output
lib/apartment/migrator.rb:45:1: C: [Correctable] Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end.

Check failure on line 2 in spec/dummy/config/initializers/backtrace_silencers.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy/config/initializers/backtrace_silencers.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy/config/initializers/backtrace_silencers.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^

Check failure on line 2 in spec/dummy/config/initializers/inflections.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy/config/initializers/inflections.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy/config/initializers/inflections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^

Check failure on line 2 in spec/dummy/config/initializers/mime_types.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy/config/initializers/mime_types.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy/config/initializers/mime_types.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^

Check failure on line 2 in spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^

Check failure on line 2 in spec/dummy_engine/test/dummy/config/initializers/inflections.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy_engine/test/dummy/config/initializers/inflections.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy_engine/test/dummy/config/initializers/inflections.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^

Check failure on line 2 in spec/dummy_engine/test/dummy/config/initializers/mime_types.rb

See this annotation in the file changed.

@github-actions github-actions / rubocop

[rubocop] spec/dummy_engine/test/dummy/config/initializers/mime_types.rb#L2

[Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
Raw output
spec/dummy_engine/test/dummy/config/initializers/mime_types.rb:2:1: C: [Correctable] Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.
# Be sure to restart your server when you modify this file.
^