SpeciesFileGroup/taxonworks

View on GitHub
config/initializers/model_metadata.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

  Dir[Rails.root.join('app/models/*.rb')].each do |model_file|

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')

Do not write to stdout. Use Rails's logger if you want to log.
Open

      puts Rainbow("Skipping (not connected) #{model_file}").yellow.bold

This cop checks for the use of output calls like puts and print

Example:

# bad
puts 'A debug message'
pp 'A debug message'
print 'A debug message'

# good
Rails.logger.debug 'A debug message'

TODO found
Open

# TODO: Permits things like annotation metadata handling.
Severity: Minor
Found in config/initializers/model_metadata.rb by fixme

There are no issues that match your filters.

Category
Status