clayton/sslcheck

View on GitHub
lib/sslcheck/certificate.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class Certificate has 23 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Certificate
    def initialize(cert, clock=nil)
      @cert = bootstrap_certificate(cert)
      @clock = clock || DateTime
    end
Severity: Minor
Found in lib/sslcheck/certificate.rb - About 2 hrs to fix

    Shadowing outer local variable - ext.
    Open

          ext = @cert.extensions.find{|ext| ext.oid == "subjectAltName" }
    Severity: Minor
    Found in lib/sslcheck/certificate.rb by rubocop

    This cop looks for use of the same name as outer local variables for block arguments or block local variables. This is a mimic of the warning "shadowing outer local variable - foo" from ruby -cw.

    Example:

    # bad
    
    def some_method
      foo = 1
    
      2.times do |foo| # shadowing outer `foo`
        do_something(foo)
      end
    end

    Example:

    # good
    
    def some_method
      foo = 1
    
      2.times do |bar|
        do_something(bar)
      end
    end

    There are no issues that match your filters.

    Category
    Status