Skip to content

hostsfile cookbook fails cookstyle validation #97

Description

@kristofwillen

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`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions