Showing 98 of 141 total issues
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Function Graze
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Graze(grazeOpts)
{
if (!(this instanceof Graze))
{
return new Graze(grazeOpts);
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;
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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;
- Read upRead up
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 setOps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.setOps = function (opts)
{
debug('Entering setOps');
var localOps = opts || {};
var keysUpdated = 0;
- Read upRead up
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"