docker/swarmkit

View on GitHub
ca/testutils/externalutils.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method signHandler.ServeHTTP has 57 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (h *signHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    if atomic.LoadUint32(h.flaky) == 1 {
        w.WriteHeader(http.StatusInternalServerError)
    }

Severity: Minor
Found in ca/testutils/externalutils.go - About 1 hr to fix

    Method signHandler.ServeHTTP has 7 return statements (exceeds 4 allowed).
    Open

    func (h *signHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
        if atomic.LoadUint32(h.flaky) == 1 {
            w.WriteHeader(http.StatusInternalServerError)
        }
    
    
    Severity: Major
    Found in ca/testutils/externalutils.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status