pietervogelaar/chef-cookbook-jenkins-server

View on GitHub
recipes/slaves_credentials.rb

Summary

Maintainability
A
0 mins
Test Coverage

Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

    unless Chef::Config[:solo]
Severity: Minor
Found in recipes/slaves_credentials.rb by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Use meaningful heredoc delimiters.
Open

      EOH
Severity: Minor
Found in recipes/slaves_credentials.rb by rubocop

This cop checks that your heredocs are using meaningful delimiters. By default it disallows END and EO*, and can be configured through blacklisting additional delimiters.

Example:

# good
<<-SQL
  SELECT * FROM foo
SQL

# bad
<<-END
  SELECT * FROM foo
END

# bad
<<-EOS
  SELECT * FROM foo
EOS

Line is too long. [88/80]
Open

# Add a global jenkins credential that will use the private key of the jenkins home dir.
Severity: Minor
Found in recipes/slaves_credentials.rb by rubocop

Line is too long. [112/80]
Open

# You must add a private/public key pair (id_rsa and id_rsa.pub) in the jenkins home dir (/var/lib/jenkins/.ssh)
Severity: Minor
Found in recipes/slaves_credentials.rb by rubocop

There are no issues that match your filters.

Category
Status