SpeciesFileGroup/taxonworks

View on GitHub
lib/tasks/db/dump_restore.rake

Summary

Maintainability
Test Coverage

Favor Rails.env.production? over Rails.env == 'production'.
Open

        if Rails.env == 'production'
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks that Rails.env is compared using .production?-like methods instead of equality against a string or symbol.

Example:

# bad
Rails.env == 'production'

# bad, always returns false
Rails.env == :test

# good
Rails.env.production?

TODO found
Open

      # TODO: Once RAILS is restarted automagically this this can go
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by fixme

Prefer symbols instead of strings as hash keys.
Open

          '--username' => @args[:database_user],
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

          '--dbname' => database,
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

            '--username' => @args[:database_user],
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

            '--file' => path,
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

            '--host' => @args[:database_host],
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

          '--format' => 'custom',
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

          '--host' => @args[:database_host],
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

Prefer symbols instead of strings as hash keys.
Open

            '--format' => 'custom',
Severity: Minor
Found in lib/tasks/db/dump_restore.rake by rubocop

This cop checks for the use of strings as keys in hashes. The use of symbols is preferred instead.

Example:

# bad
{ 'one' => 1, 'two' => 2, 'three' => 3 }

# good
{ one: 1, two: 2, three: 3 }

There are no issues that match your filters.

Category
Status