raubarede/Ruiby

View on GitHub
tmp/gemstat.rb

Summary

Maintainability
F
1 wk
Test Coverage

File gemstat.rb has 2731 lines of code (exceeds 250 allowed). Consider refactoring.
Open

$authors= %w{wycats markbates jimweirich} # seems the most productives...
$authors1= %w{rdaubarede}

LOCAL_HTDOCS="d:/usr/"
RUBYGEMS="http://rubygems.org" 
Severity: Major
Found in tmp/gemstat.rb - About 1 wk to fix

    Method main has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def main(ss)
     
      lth=[]
      no=0
      Dir.mkdir('mstat') unless Dir.exists?('mstat')
    Severity: Minor
    Found in tmp/gemstat.rb - About 45 mins to fix

    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 memo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def memo(name,total)
      fname="mstat/#{name.downcase}.data"
      content= File.exists?(fname) ? eval( File.read(fname) ) : [0]*(NB+1)
      p content if name=="rack"
      last= content[0]==0 ? total : content[0]
    Severity: Minor
    Found in tmp/gemstat.rb - About 35 mins to fix

    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

    There are no issues that match your filters.

    Category
    Status