visioncritical/consul_template

View on GitHub
attributes/default.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid bare attribute keys
Open

default['consul_template']['config']['conf_dir'] = default_conf_dir
Severity: Minor
Found in attributes/default.rb by foodcritic

This warning is shown when, within a cookbook attributes file, you refer to an attribute as you would a local variable rather than as an attribute of the node object. It is valid to do the former, but you should prefer the later more explicit approach to accessing attributes because it is easier for users of your cookbooks to understand.

Avoid bare attribute keys
Open

default['consul_template']['config']['template_dir'] = default_template_dir
Severity: Minor
Found in attributes/default.rb by foodcritic

This warning is shown when, within a cookbook attributes file, you refer to an attribute as you would a local variable rather than as an attribute of the node object. It is valid to do the former, but you should prefer the later more explicit approach to accessing attributes because it is easier for users of your cookbooks to understand.

Avoid bare attribute keys
Open

default['consul_template']['service']['data_dir'] = default_data_dir
Severity: Minor
Found in attributes/default.rb by foodcritic

This warning is shown when, within a cookbook attributes file, you refer to an attribute as you would a local variable rather than as an attribute of the node object. It is valid to do the former, but you should prefer the later more explicit approach to accessing attributes because it is easier for users of your cookbooks to understand.

extend is used at the top level. Use inside class or module.
Open

extend ConsulTemplateCookbook::Helpers
Severity: Minor
Found in attributes/default.rb by rubocop

This cop checks that include, extend and prepend exists at the top level. Using these at the top level affects the behavior of Object. There will not be using include, extend and prepend at the top level. Let's use it inside class or module.

Example:

# bad
include M

class C
end

# bad
extend M

class C
end

# bad
prepend M

class C
end

# good
class C
  include M
end

# good
class C
  extend M
end

# good
class C
  prepend M
end

There are no issues that match your filters.

Category
Status