Showing 525 of 525 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if ok {
            if sub.Kind() != GeneralMessageBroadcast {
                logger.Log.Debugf("GeneralMessage subscription request with a duplicated Id: %v", gm.SubscriptionIdentifier())
                rs.Status = false
                rs.ErrorType = "OtherError"
Severity: Minor
Found in core/siri_general_message_subscription_broadcaster.go and 1 other location - About 55 mins to fix
core/siri_situation_exchange_subscription_broadcaster.go on lines 116..129

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 124.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (controller *ReferentialController) Show(response http.ResponseWriter, identifier string) {
    referential := controller.findReferential(identifier)
    if referential == nil {
        http.Error(response, fmt.Sprintf("Referential not found: %s", identifier), http.StatusNotFound)
        return
Severity: Minor
Found in api/referential_controller.go and 1 other location - About 55 mins to fix
api/partner_controller.go on lines 145..155

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 124.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if ok {
            if sub.Kind() != SituationExchangeBroadcast {
                logger.Log.Debugf("SituationExchange subscription request with a duplicated Id: %v", sx.SubscriptionIdentifier())
                rs.Status = false
                rs.ErrorType = "OtherError"
Severity: Minor
Found in core/siri_situation_exchange_subscription_broadcaster.go and 1 other location - About 55 mins to fix
core/siri_general_message_subscription_broadcaster.go on lines 119..132

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 124.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) EstimatedTimetableSubscription(request *siri.SIRIEstimatedTimetableSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"SubscribeResponse", "SubscriptionResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 328..340
remote/siri_client.go on lines 342..355

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) DeleteSubscription(request *siri.SIRIDeleteSubscriptionRequest) (*sxml.XMLDeleteSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"DeleteSubscriptionResponse", "TerminateSubscriptionResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 314..326
remote/siri_client.go on lines 328..340

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) VehicleMonitoringSubscription(request *siri.SIRIVehicleMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"SubscribeResponse", "SubscriptionResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 314..326
remote/siri_client.go on lines 342..355

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func logXMLSituationExchangeResponse(message *audit.BigQueryMessage, response *sxml.XMLSituationExchangeResponse) {
    message.ResponseIdentifier = response.ResponseMessageIdentifier()

    if !response.Status() {
        message.Status = "Error"
Severity: Minor
Found in core/siri_situation_exchange_request_collector.go and 1 other location - About 50 mins to fix
core/siri_general_message_request_collector.go on lines 123..132

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func logXMLGeneralMessageResponse(message *audit.BigQueryMessage, response *sxml.XMLGeneralMessageResponse) {
    message.ResponseIdentifier = response.ResponseMessageIdentifier()

    if !response.Status() {
        message.Status = "Error"
Severity: Minor
Found in core/siri_general_message_request_collector.go and 1 other location - About 50 mins to fix
core/siri_situation_exchange_request_collector.go on lines 119..128

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) StopMonitoringSubscription(request *siri.SIRIStopMonitoringSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"SubscribeResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 286..298
remote/siri_client.go on lines 300..312

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (builder *BroadcastSituationExchangeBuilder) resolveStopAreaRef(stopAreaId model.StopAreaId) (string, bool) {
    stopArea, ok := builder.partner.Model().StopAreas().Find(stopAreaId)
    if !ok {
        return "", false
    }
Severity: Major
Found in core/broadcast_situation_exchange_builder.go and 2 other locations - About 50 mins to fix
core/broadcast_general_message_builder.go on lines 220..230
core/siri_situation_exchange_request_broadcaster.go on lines 267..277

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (builder *BroadcastGeneralMessageBuilder) resolveStopAreaRef(stopAreaId model.StopAreaId) (string, bool) {
    stopArea, ok := builder.partner.Model().StopAreas().Find(stopAreaId)
    if !ok {
        return "", false
    }
Severity: Major
Found in core/broadcast_general_message_builder.go and 2 other locations - About 50 mins to fix
core/broadcast_situation_exchange_builder.go on lines 241..251
core/siri_situation_exchange_request_broadcaster.go on lines 267..277

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) GeneralMessageSubscription(request *siri.SIRIGeneralMessageSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"SubscribeResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 272..284
remote/siri_client.go on lines 286..298

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (client *SIRIClient) SituationExchangeSubscription(request *siri.SIRISituationExchangeSubscriptionRequest) (*sxml.XMLSubscriptionResponse, error) {
    node, err := client.prepareAndSendRequest(siriClientArguments{
        request:           request,
        requestType:       SUBSCRIPTION,
        expectedResponses: []string{"SubscribeResponse"},
Severity: Major
Found in remote/siri_client.go and 2 other locations - About 50 mins to fix
remote/siri_client.go on lines 272..284
remote/siri_client.go on lines 300..312

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if affect.GetType() == model.SituationTypeStopArea {
            if stopPointRef, ok := connector.stopPointRef(sub); ok && model.ModelId(stopPointRef) == affect.GetId() {
                r.SetLastState(string(situation.Id()), ls.NewSituationLastChange(&situation, sub))
                connector.addSituation(sub.Id(), situation.Id())
                continue
Severity: Minor
Found in core/siri_situation_exchange_subscription_broadcaster.go and 1 other location - About 50 mins to fix
core/siri_situation_exchange_subscription_broadcaster.go on lines 193..199

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

func (connector *SIRISituationExchangeRequestBroadcaster) resolveStopAreaRef(stopAreaId model.StopAreaId) (string, bool) {
    stopArea, ok := connector.partner.Model().StopAreas().Find(stopAreaId)
    if !ok {
        return "", false
    }
Severity: Major
Found in core/siri_situation_exchange_request_broadcaster.go and 2 other locations - About 50 mins to fix
core/broadcast_general_message_builder.go on lines 220..230
core/broadcast_situation_exchange_builder.go on lines 241..251

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if affect.GetType() == model.SituationTypeLine {
            if lineRef, ok := connector.lineRef(sub); ok && model.ModelId(lineRef) == affect.GetId() {
                r.SetLastState(string(situation.Id()), ls.NewSituationLastChange(&situation, sub))
                connector.addSituation(sub.Id(), situation.Id())
                continue
Severity: Minor
Found in core/siri_situation_exchange_subscription_broadcaster.go and 1 other location - About 50 mins to fix
core/siri_situation_exchange_subscription_broadcaster.go on lines 200..206

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 121.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method BigQueryClient.findOrCreateDataset has 8 return statements (exceeds 4 allowed).
Open

func (bq *BigQueryClient) findOrCreateDataset() (*bigquery.Dataset, error) {
    it := bq.client.Datasets(bq.ctx)
    for {
        dataset, err := it.Next()
        if err == iterator.Done {
Severity: Major
Found in audit/bigquery.go - About 50 mins 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

      Method PartnerManager.SaveToDatabase has 8 return statements (exceeds 4 allowed).
      Open

      func (manager *PartnerManager) SaveToDatabase() (int, error) {
          // Check presence of Referential
          selectReferentials := []model.SelectReferential{}
          sqlQuery := fmt.Sprintf("select * from referentials where referential_id = '%s'", manager.referential.Id())
          _, err := model.Database.Select(&selectReferentials, sqlQuery)
      Severity: Major
      Found in core/partner.go - About 50 mins to fix

        Method Partner.hasSubscribers has 8 return statements (exceeds 4 allowed).
        Open

        func (partner *Partner) hasSubscribers() bool {
            _, ok := partner.connectors[SIRI_STOP_MONITORING_SUBSCRIPTION_BROADCASTER]
            if ok {
                return true
            }
        Severity: Major
        Found in core/partner.go - About 50 mins to fix
          Severity
          Category
          Status
          Source
          Language