api/siri_handler.go

Summary

Maintainability
B
6 hrs
Test Coverage

Method SIRIHandler.serve has 108 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (handler *SIRIHandler) serve(response http.ResponseWriter, request *http.Request) {
    response.Header().Set("Content-Type", "text/xml; charset=utf-8")

    m := &audit.BigQueryMessage{
        Protocol:    "siri",
Severity: Major
Found in api/siri_handler.go - About 3 hrs to fix

    Method SIRIHandler.requestHandler has 93 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (handler *SIRIHandler) requestHandler(envelope *remote.SIRIEnvelope) SIRIRequestHandler {
        switch envelope.BodyType() {
        case "CheckStatus":
            return &SIRICheckStatusRequestHandler{
                xmlRequest:  sxml.NewXMLCheckStatusRequest(envelope.Body()),
    Severity: Major
    Found in api/siri_handler.go - About 2 hrs to fix

      Method SIRIHandler.serve has 8 return statements (exceeds 4 allowed).
      Open

      func (handler *SIRIHandler) serve(response http.ResponseWriter, request *http.Request) {
          response.Header().Set("Content-Type", "text/xml; charset=utf-8")
      
          m := &audit.BigQueryMessage{
              Protocol:    "siri",
      Severity: Major
      Found in api/siri_handler.go - About 50 mins to fix

        There are no issues that match your filters.

        Category
        Status