pietervogelaar/chef-cookbook-jenkins-server

View on GitHub

Showing 171 of 171 total issues

Space inside { missing.
Open

  'ws-cleanup' => {'version' => '0.26'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Space inside } missing.
Open

  'ansicolor' => {'version' => '0.4.1'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Space inside { missing.
Open

  'checkstyle' => {'version' => '3.42'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Line is too long. [129/80]
Open

default['jenkins-server']['slaves']['credential']['username'] = 'deployer' # The Jenkins master will login as this user on slaves
Severity: Minor
Found in attributes/default.rb by rubocop

Line is too long. [182/80]
Open

default['jenkins-server']['slaves']['search_query'] = "#{node['jenkins-server']['slaves']['search_key']}:* AND chef_environment:#{node.chef_environment} AND NOT fqdn:#{node['fqdn']}"
Severity: Minor
Found in attributes/default.rb by rubocop

Line is too long. [86/80]
Open

environment = node.chef_environment == 'production' ? '' : ".#{node.chef_environment}"
Severity: Minor
Found in recipes/jenkins_slave.rb by rubocop

Space inside } missing.
Open

  'greenballs' => {'version' => '1.14'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

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

      if slave.key?('jvm_options') then jvm_options slave['jvm_options'] end
Severity: Minor
Found in recipes/slaves.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?

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

Line is too long. [91/80]
Open

  node['jenkins-server']['settings']['global_properties']['env_vars'].each do |name, value|
Severity: Minor
Found in recipes/settings.rb by rubocop

Use tr instead of gsub.
Open

slave_id = node['fqdn'].gsub(/\./, '_')
Severity: Minor
Found in recipes/jenkins_slave.rb by rubocop

This cop identifies places where gsub can be replaced by tr or delete.

Example:

# bad
'abc'.gsub('b', 'd')
'abc'.gsub('a', '')
'abc'.gsub(/a/, 'd')
'abc'.gsub!('a', 'd')

# good
'abc'.gsub(/.*/, 'a')
'abc'.gsub(/a+/, 'd')
'abc'.tr('b', 'd')
'a b c'.delete(' ')

Dir.exists? is deprecated in favor of Dir.exist?.
Open

  if Dir.exists?("#{node['jenkins']['master']['home']}/nodes") # ~FC023
Severity: Minor
Found in recipes/slaves.rb by rubocop

This cop checks for uses of the deprecated class method usages.

Example:

# bad

File.exists?(some_path)

Example:

# good

File.exist?(some_path)

Line is too long. [103/80]
Open

# By default Jenkins allows everybody. Configure "Project Matrix Authorization", the CrowdSecurityRealm
Severity: Minor
Found in recipes/security.rb by rubocop

Ensure source_url is set in metadata
Open

name             'jenkins-server'
Severity: Minor
Found in metadata.rb by foodcritic

This warning is shown if a cookbook does not include the source_url property in its metadata file. source_url is used to point to the source location for the cookbook and is currently parsed by Supermarket to add links to community cookbooks. Note: source_url is a Chef 12 only feature that will cause cookbook failures in Chef 11 so it should be properly gated if the code will be run on Chef 11 hosts.

Space inside { missing.
Open

  'git-client' => {'version' => '1.19.4'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Space inside } missing.
Open

  'htmlpublisher' => {'version' => '1.4'},
Severity: Minor
Found in attributes/default.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Line is too long. [107/80]
Open

default['jenkins-server']['admin']['password'] = 'admin' # only used if the security strategy is "generate"
Severity: Minor
Found in attributes/default.rb by rubocop

Line is too long. [85/80]
Open

default['jenkins-server']['node_monitors']['architecture_monitor']['ignored'] = false
Severity: Minor
Found in attributes/default.rb by rubocop

Line is too long. [110/80]
Open

if node['jenkins-server']['security']['notifies']['resource'] == 'jenkins_script[configure crowd permissions]'
Severity: Minor
Found in attributes/default.rb by rubocop

Line is too long. [82/80]
Open

    'group' => 'stash-users', # JIRA groups that are allowed to login into Jenkins
Severity: Minor
Found in attributes/default.rb by rubocop
Severity
Category
Status
Source
Language