RackHD/on-core

View on GitHub
lib/common/connection.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function connectionFactory has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function connectionFactory (assert, amqp, Promise, util, _) {
    /**
     * Connection provides a wrapper around the AMQP connection logic
     * which presents a simplified interface for using multiple connections
     * in the messenger.
Severity: Major
Found in lib/common/connection.js - About 3 hrs to fix

    Function start has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Connection.prototype.start = function() {
            var self = this;
    
            return new Promise(function (resolve, reject) {
                if (self.connection) {
    Severity: Minor
    Found in lib/common/connection.js - About 1 hr to fix

      Function connectionFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function connectionFactory (assert, amqp, Promise, util, _) {
      Severity: Minor
      Found in lib/common/connection.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status