Showing 11 of 21 total issues
Function WdCT
has 418 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var WdCT = function(options){
var info,
debug,
error,
reporter,
Function executeWd
has 301 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var executeWd = function(server){
(parallel ? async.each : async.mapSeries).call( async, options.browsers, function(browserName, callback){
var promise,
commands,
Function WdCT
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
Open
var WdCT = function(options){
var info,
debug,
error,
reporter,
- 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 execute
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function execute(header, body, callback){
var queue = function(args){
var command = args.command,
fn = args.fn,
val = args.val,
File wd-ct.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* wd-ct
* https://github.com/sideroad/wd-ct
*
* Copyright (c) 2014 sideroad
Function adapt
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
adapt: function(wd, store, logger){
var fs = require('fs'),
_ = require('lodash'),
path = require('path'),
Q = require('q'),
Function exports
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(options, callback){
var prompt = require('prompt'),
fs = require('fs'),
path = require('path'),
async = require('async'),
Function queue
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var queue = function(args){
var command = args.command,
fn = args.fn,
val = args.val,
col = args.col,
Function exports
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (testcase, startColumn, callback){
var header = [],
body = [],
csv = require('fast-csv'),
xlsx = require('node-xlsx'),
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.initConfig({
clean: ['tmp/*'],
jshint: {
Function exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function (testcase, startColumn, callback){
var header = [],
body = [],
csv = require('fast-csv'),
xlsx = require('node-xlsx'),
- 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"