LivePersonInc/circuit-breakerjs

View on GitHub

Showing 2 of 7 total issues

Function prototype has 176 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    CircuitBreaker.prototype = (function () {
        /**
         * Method for initialization
         * @param {Object} [options] the configuration options for the instance
         * @param {Number} [options.slidingTimeWindow = 30000] - the time window that will be used for state calculations [milliseconds]
Severity: Major
Found in src/CircuitBreaker.js - About 7 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                if (!this.initialized) {
                    options = options || {};
    
                    this.slidingTimeWindow = !isNaN(options.slidingTimeWindow) && 0 < options.slidingTimeWindow ? parseInt(options.slidingTimeWindow, 10) : 30000;
                    this.bucketsNumber = !isNaN(options.bucketsNumber) && 0 < options.bucketsNumber ? parseInt(options.bucketsNumber, 10) : 10;
    Severity: Major
    Found in src/CircuitBreaker.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language