metamaps/metamaps

View on GitHub
config/initializers/access_codes.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not introduce global variables.
Open

$codes = []
Severity: Minor
Found in config/initializers/access_codes.rb by rubocop

This cops looks for uses of global variables. It does not report offenses for built-in global variables. Built-in global variables are allowed by default. Additionally users can allow additional variables via the AllowedVariables option.

Note that backreferences like $1, $2, etc are not global variables.

Example:

# bad
$foo = 2
bar = $foo + 5

# good
FOO = 2
foo = 2
$stdin.read

Do not introduce global variables.
Open

  $codes = ActiveRecord::Base.connection
Severity: Minor
Found in config/initializers/access_codes.rb by rubocop

This cops looks for uses of global variables. It does not report offenses for built-in global variables. Built-in global variables are allowed by default. Additionally users can allow additional variables via the AllowedVariables option.

Note that backreferences like $1, $2, etc are not global variables.

Example:

# bad
$foo = 2
bar = $foo + 5

# good
FOO = 2
foo = 2
$stdin.read

There are no issues that match your filters.

Category
Status