Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostsfile cookbook fails cookstyle validation #97

Open
kristofwillen opened this issue Dec 7, 2017 · 0 comments
Open

hostsfile cookbook fails cookstyle validation #97

kristofwillen opened this issue Dec 7, 2017 · 0 comments

Comments

@kristofwillen
Copy link

kristofwillen commented Dec 7, 2017

The hostsfile cookbook doesn't pass 'cookstyle -l' validation - it fails on the following errors :

`$ cookstyle -l .
Inspecting 8 files
...WW...

Offenses:

libraries/entry.rb:83:39: W: Shadowing outer local variable - entry.
entry.split(/\s+/).collect { |entry| presence(entry) }.compact
^^^^^
libraries/manipulator.rb:89:16: W: Assignment in condition - you probably meant to use ==.
if entry = find_entry_by_ip_address(options[:ip_address])
^
libraries/manipulator.rb:104:16: W: Assignment in condition - you probably meant to use ==.
if entry = find_entry_by_ip_address(options[:ip_address])
^
libraries/manipulator.rb:124:16: W: Assignment in condition - you probably meant to use ==.
if entry = find_entry_by_ip_address(ip_address)
^
libraries/manipulator.rb:281:39: W: Shadowing outer local variable - entry.
@entries = @entries.collect do |entry|
^^^^^

8 files inspected, 5 offenses detected`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant