pietervogelaar/chef-cookbook-jenkins-server

View on GitHub
recipes/plugin_antisamy-markup-formatter.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [103/80]
Open

  formatter = "new RawHtmlMarkupFormatter(#{plugin['disable_syntax_highlighting'] ? 'true' : 'false'})"

Line is too long. [101/80]
Open

  # Safe HTML (the name RawHtml is misleading and old but is still there for backwards compatibility)

Avoid the use of the case equality operator ===.
Open

if plugin['markup'] === 'safe_html'

This cop checks for uses of the case equality operator(===).

Example:

# bad
Array === something
(1..100) === 7
/something/ === some_string

# good
something.is_a?(Array)
(1..100).include?(7)
some_string =~ /something/

Use meaningful heredoc delimiters.
Open

  EOH

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

The name of this source file (plugin_antisamy-markup-formatter.rb) should use snake_case.
Open

plugin = node['jenkins-server']['plugins']['antisamy-markup-formatter']

This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.

Example:

# bad
lib/layoutManager.rb

anything/usingCamelCase

# good
lib/layout_manager.rb

anything/using_snake_case.rake

4 trailing blank lines detected.
Open

There are no issues that match your filters.

Category
Status