Showing 111 of 178 total issues
Method initialize
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "Wireshark Patch Rollups",
:plugin_id => -99992,
Method initialize
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "Adobe Reader Patch Rollup",
:plugin_id => -99998,
Method initialize
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "Java Patch Rollup",
:plugin_id => -99999,
Class NessusSaxListener
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class NessusSaxListener
include LibXML::XML::SaxParser::Callbacks
attr_accessor :new_tags
Method create_plugin
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_plugin
plugin = Plugin.find_by_id(@info[:plugin_id])
if plugin == nil
Method initialize
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "VMware ESXi Patch Rollup",
:plugin_id => -99981,
Method run
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
parse_options
if @options[:list_templates]
@template_manager.display_templates
File nessus_sax_listener.rb
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'set'
ActiveRecord::Migration.verbose = false
module Risu
Method create_plugin
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def create_plugin
plugin = Plugin.find_by_id(@info[:plugin_id])
if plugin == nil
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
def render output
@output.text Report.classification.upcase, :align => :center
@output.text "\n"
report_title Report.title
Method initialize
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "OpenSSL Patch Rollup",
:plugin_id => -99984,
Method initialize
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "Adobe Air Patch Rollup",
:plugin_id => -99994,
Method parse_options
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def parse_options
begin
opts = OptionParser.new do |opt|
opt.banner = "#{APP_NAME} v#{VERSION}\nJacob Hammack\nhttp://www.hammackj.com\n\n"
opt.banner << "Usage: #{APP_NAME} [options] [files_to_parse]"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method render
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def render output
text Report.classification.upcase, :align => :center
text "\n"
report_title Report.title
Method print_technical_findings
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def print_technical_findings(risks, text, color, last=false)
if risks.length > 0
title text, 18, color
risks.each do |f|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method other_os_graph
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def other_os_graph
g = Gruff::Pie.new(GRAPH_WIDTH)
g.title = "Other Operating Systems Percentage"
g.sort = false
g.marker_count = 1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def run
parse_options
if @options[:list_templates]
@template_manager.display_templates
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize
@info =
{
:description => "Adobe Acrobat Patch Rollup",
:plugin_id => -99975,
Method render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def render output
@output.text Report.classification.upcase, :align => :center
@output.text "\n"
report_title Report.title
Method render
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def render output
@output.font_size 10
report_classification
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"