Showing 10 of 17 total issues
Function filterArguments
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function filterArguments(args, params, inject) {
var newArgs = ['node', '_mocha'].concat(inject || []),
param, i, len,
type;
- Read upRead up
- Create a ticketCreate a ticket
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 _runComparisonTest
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
_runComparisonTest: function (comparisonName) {
this._logger.debug("Run comparison tests", comparisonName);
this._describe(this._getTestName(comparisonName), function () {
- Create a ticketCreate a ticket
Function _determineScreensState
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
_determineScreensState: function (screens) {
var buildScreens = screens[0],
approvedScreens = screens[1],
- Read upRead up
- Create a ticketCreate a ticket
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
File kobold.js
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2014, Yahoo! Inc.
// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.
var utils = require('preceptor-core').utils;
var Base = require('preceptor-core').Base;
- Create a ticketCreate a ticket
Function prepareEnvironment
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareEnvironment (argv) {
var params, args;
// Define default values
- Create a ticketCreate a ticket
Function _determineScreensState
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_determineScreensState: function (screens) {
var buildScreens = screens[0],
approvedScreens = screens[1],
- Create a ticketCreate a ticket
Function filterArguments
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function filterArguments(args, params, inject) {
var newArgs = ['node', '_mocha'].concat(inject || []),
param, i, len,
type;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (type === 'number') {
params[param] = parseFloat(params[param]);
}
- Create a ticketCreate a ticket
Function _archiveTest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_archiveTest: function (passed, testName, approvedImage, buildImage, highlightImage) {
- Create a ticketCreate a ticket
Function _archiveTest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_archiveTest: function (passed, testName, approvedImage, buildImage, highlightImage) {
var archiveList = [];
this._logger.debug("Archive test", testName);
- Read upRead up
- Create a ticketCreate a ticket
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"