Showing 141 of 141 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/updateTeam";
- Read upRead up
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 330.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/createMaintenanceWindow";
- Read upRead up
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 330.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/addSigCorrelationInfo";
- Read upRead up
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 239.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/addThreadEntry";
- Read upRead up
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 239.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function callGrazeEndpoint
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function callGrazeEndpoint(opts, body)
{
return new Promise(function (resolve, reject)
{
Function setSituationProcesses
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationProcesses = function (sitnId, processList, primaryProcess, callback)
{
debug("Entering setSituationProcesses");
var opts = this.connectOptions;
var self = this;
Function setSituationServices
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationServices = function (sitnId, serviceList, primaryService, callback)
{
debug("Entering setSituationServices");
var opts = this.connectOptions;
var self = this;
Function createUser
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createUser = function (userObj, callback)
{
debug("Entering createUser");
var opts = this.connectOptions;
var self = this;
Function assignSituation
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignSituation = function (sitnId, user, callback)
{
debug("Entering assignSituation");
var opts = this.connectOptions;
var self = this;
Function assignAndAcknowledgeAlert
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeAlert = function (alertId, user, callback)
{
debug("Entering assignAndAcknowledgeAlert");
var opts = this.connectOptions;
var self = this;
Function assignAndAcknowledgeSituation
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeSituation = function (sitnId, user, callback)
{
debug("Entering assignAndAcknowledgeSituation");
var opts = this.connectOptions;
var self = this;
Function assignAlert
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAlert = function (alertId, user, callback)
{
debug("Entering assignAlert");
var opts = this.connectOptions;
var self = this;
Function mergeSituations
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.mergeSituations = function (situations, supersedeOriginal, callback)
{
debug("Entering mergeSituations");
var opts = this.connectOptions;
var self = this;
Function createTeam
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createTeam = function (teamObj, callback)
{
debug("Entering createTeam");
var opts = this.connectOptions;
var self = this;
Function createMaintenanceWindow
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createMaintenanceWindow = function (maintObj, callback)
{
debug("Entering createMaintenanceWindow");
var opts = this.connectOptions;
var self = this;
Function updateTeam
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.updateTeam = function (teamObj, callback)
{
debug("Entering updateTeam");
var opts = this.connectOptions;
var self = this;
Function setAlertSeverity
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setAlertSeverity = function (alertId, severity, callback)
{
debug("Entering setAlertSeverity");
var opts = this.connectOptions;
var self = this;
Function removeAlertFromSituation
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.removeAlertFromSituation = function (alertId, sitnId, callback)
{
debug("Entering removeAlertFromSituation");
var opts = this.connectOptions;
var self = this;
Function setSituationDescription
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationDescription = function (sitnId, description, callback)
{
debug("Entering setSituationDescription");
var opts = this.connectOptions;
var self = this;
Function setAlertAcknowledgeState
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setAlertAcknowledgeState = function (alertId, acknowledged, callback)
{
debug("Entering setAlertAcknowledgeState");
var opts = this.connectOptions;
var self = this;