hunterlong/statup

View on GitHub
types/services/methods.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method Service.UptimeData has 90 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s Service) UptimeData(hits []*hits.Hit, fails []*failures.Failure) (*UptimeSeries, error) {
    if len(hits) == 0 {
        return nil, errors.New("service does not have any successful hits")
    }
    // if theres no failures, then its been online 100%,
Severity: Major
Found in types/services/methods.go - About 2 hrs to fix

    Method Service.LoadTLSCert has 5 return statements (exceeds 4 allowed).
    Open

    func (s *Service) LoadTLSCert() (*tls.Config, error) {
        if s.TLSCert.String == "" || s.TLSCertKey.String == "" {
            return nil, nil
        }
    
    
    Severity: Major
    Found in types/services/methods.go - About 35 mins to fix

      Method Service.UptimeData has 5 return statements (exceeds 4 allowed).
      Open

      func (s Service) UptimeData(hits []*hits.Hit, fails []*failures.Failure) (*UptimeSeries, error) {
          if len(hits) == 0 {
              return nil, errors.New("service does not have any successful hits")
          }
          // if theres no failures, then its been online 100%,
      Severity: Major
      Found in types/services/methods.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status