Moogsoft/moog-graze

View on GitHub

Showing 141 of 141 total issues

Function _createThread has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var _createThread = function (sitnId, threadName)
  {
    debug('Entering _createThread sitn_id:' + sitnId);
    debug('_createThread authToken: ' + opts.authToken);
    return new Promise(function (resolve, reject)
Severity: Minor
Found in lib/moog-graze.js - About 1 hr to fix

    Function _addService has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var _addService = function (name, description)
      {
        debug('Entering _addService');
        debug('_addService authToken: ' + opts.authToken);
        return new Promise(function (resolve, reject)
    Severity: Minor
    Found in lib/moog-graze.js - About 1 hr to fix

      Function _closeSituation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var _closeSituation = function (sitnId, resolution)
        {
          debug('Entering _closeSituation sitn_id:' + sitnId);
          debug('_closeSituation authToken: ' + opts.authToken);
          return new Promise(function (resolve, reject)
      Severity: Minor
      Found in lib/moog-graze.js - About 1 hr to fix

        Function _resolveSituation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var _resolveSituation = function (sitnId)
          {
            debug('Entering _resolveSituation situation:' + sitnId);
            debug('_resolveSituation authToken: ' + opts.authToken);
            return new Promise(function (resolve, reject)
        Severity: Minor
        Found in lib/moog-graze.js - About 1 hr to fix

          Function _addProcess has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var _addProcess = function (name, description)
            {
              debug('Entering _addProcess');
              debug('_addProcess authToken: ' + opts.authToken);
              return new Promise(function (resolve, reject)
          Severity: Minor
          Found in lib/moog-graze.js - About 1 hr to fix

            Function _addSituationCustomInfo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              var _addSituationCustomInfo = function (sitnId, customInfo)
              {
                debug('Entering _addSituationCustomInfo sitn_id:' + sitnId);
                debug('_addSituationCustomInfo authToken: ' + opts.authToken);
                return new Promise(function (resolve, reject)
            Severity: Minor
            Found in lib/moog-graze.js - About 1 hr to fix

              Function _findMaintenanceWindows has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var _findMaintenanceWindows = function (filter, limit)
                {
                  debug('Entering _findMaintenanceWindows');
                  debug('_findMaintenanceWindows authToken: ' + opts.authToken);
                  return new Promise(function (resolve, reject)
              Severity: Minor
              Found in lib/moog-graze.js - About 1 hr to fix

                Function _createSituation has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var _createSituation = function (description)
                  {
                    debug('Entering _createSituation description:' + description);
                    debug('_createSituation authToken: ' + opts.authToken);
                    return new Promise(function (resolve, reject)
                Severity: Minor
                Found in lib/moog-graze.js - About 1 hr to fix

                  Function _deassignAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var _deassignAlert = function (alertId)
                    {
                      debug('Entering _deassignAlert');
                      debug('_deassignAlert authToken: ' + opts.authToken);
                      return new Promise(function (resolve, reject)
                  Severity: Minor
                  Found in lib/moog-graze.js - About 1 hr to fix

                    Function _deleteMaintenanceWindows has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      var _deleteMaintenanceWindows = function (filter, limit)
                      {
                        debug('Entering _deleteMaintenanceWindows');
                        debug('_deleteMaintenanceWindows authToken: ' + opts.authToken);
                        return new Promise(function (resolve, reject)
                    Severity: Minor
                    Found in lib/moog-graze.js - About 1 hr to fix

                      Function _closeAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var _closeAlert = function (alertId)
                        {
                          debug('Entering _closeAlert');
                          debug('_closeAlert authToken: ' + opts.authToken);
                          return new Promise(function (resolve, reject)
                      Severity: Minor
                      Found in lib/moog-graze.js - About 1 hr to fix

                        Function _deleteMaintenanceWindow has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var _deleteMaintenanceWindow = function (window)
                          {
                            debug('Entering _deleteMaintenanceWindow');
                            debug('_deleteMaintenanceWindow authToken: ' + opts.authToken);
                            return new Promise(function (resolve, reject)
                        Severity: Minor
                        Found in lib/moog-graze.js - About 1 hr to fix

                          Function _deassignSituation has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var _deassignSituation = function (sitnId)
                            {
                              debug('Entering _deassignSituation');
                              debug('_deassignSituation authToken: ' + opts.authToken);
                              return new Promise(function (resolve, reject)
                          Severity: Minor
                          Found in lib/moog-graze.js - About 1 hr to fix

                            Function Graze has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Graze(grazeOpts)
                            {
                              if (!(this instanceof Graze))
                              {
                                return new Graze(grazeOpts);
                            Severity: Minor
                            Found in lib/moog-graze.js - About 1 hr to fix

                              Function setSituationProcesses has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.setSituationProcesses = function (sitnId, processList, primaryProcess, callback)
                              {
                                debug("Entering setSituationProcesses");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 1 hr to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function setSituationServices has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.setSituationServices = function (sitnId, serviceList, primaryService, callback)
                              {
                                debug("Entering setSituationServices");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 1 hr to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function assignAndAcknowledgeAlert has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.assignAndAcknowledgeAlert = function (alertId, user, callback)
                              {
                                debug("Entering assignAndAcknowledgeAlert");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function assignSituation has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.assignSituation = function (sitnId, user, callback)
                              {
                                debug("Entering assignSituation");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function assignAlert has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.assignAlert = function (alertId, user, callback)
                              {
                                debug("Entering assignAlert");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function assignAndAcknowledgeSituation has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Graze.prototype.assignAndAcknowledgeSituation = function (sitnId, user, callback)
                              {
                                debug("Entering assignAndAcknowledgeSituation");
                                var opts = this.connectOptions;
                                var self = this;
                              Severity: Minor
                              Found in lib/moog-graze.js - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language