SpeciesFileGroup/taxonworks

View on GitHub
config/environments/test.rb

Summary

Maintainability
A
0 mins
Test Coverage

Please use Rails.root.join('path', 'to') instead.
Open

  config.x.test_tmp_file_dir = "#{Rails.root.join("spec/test_files/_#{ENV['TEST_ENV_NUMBER']&.+ '/'}")}"
Severity: Minor
Found in config/environments/test.rb by rubocop

This cop is used to identify usages of file path joining process to use Rails.root.join clause. It is used to add uniformity when joining paths.

Example: EnforcedStyle: arguments (default)

# bad
Rails.root.join('app/models/goober')
File.join(Rails.root, 'app/models/goober')
"#{Rails.root}/app/models/goober"

# good
Rails.root.join('app', 'models', 'goober')

Example: EnforcedStyle: slashes

# bad
Rails.root.join('app', 'models', 'goober')
File.join(Rails.root, 'app/models/goober')
"#{Rails.root}/app/models/goober"

# good
Rails.root.join('app/models/goober')

Prefer symbols instead of strings as hash keys.
Open

  config.public_file_server.headers = {'Cache-Control' => 'public, max-age=3600'}
Severity: Minor
Found in config/environments/test.rb 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 single-quoted strings when you don't need string interpolation or special symbols.
Open

  config.eager_load = ENV["CI"].present?
Severity: Minor
Found in config/environments/test.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

There are no issues that match your filters.

Category
Status