recipes/plugin_antisamy-markup-formatter.rb
Line is too long. [103/80] Open
Open
formatter = "new RawHtmlMarkupFormatter(#{plugin['disable_syntax_highlighting'] ? 'true' : 'false'})"
- Exclude checks
Line is too long. [101/80] Open
Open
# Safe HTML (the name RawHtml is misleading and old but is still there for backwards compatibility)
- Exclude checks
Avoid the use of the case equality operator ===
. Open
Open
if plugin['markup'] === 'safe_html'
- Read upRead up
- Exclude checks
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
Open
EOH
- Read upRead up
- Exclude checks
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
Open
plugin = node['jenkins-server']['plugins']['antisamy-markup-formatter']
- Read upRead up
- Exclude checks
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
Open
- Exclude checks