Showing 9 of 13 total issues
Function DrawUtil
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DrawUtil() {
var width = Math.ceil(shell.getWidth() * 0.7) | 0;
this.tick = 0;
Function Helpful
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Helpful(baseReporterDecorator, formatError, config) {
var self = this;
var defaultOptions = function() {
return {
animationStyle: 'braille',
Function DrawUtil
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function DrawUtil() {
var width = Math.ceil(shell.getWidth() * 0.7) | 0;
this.tick = 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"
Further reading
Function toString
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Browser.prototype.toString = function() {
var depth = this.depth;
var linesPrinted = 0;
var out = [];
Function onSpecComplete
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Helpful.prototype.onSpecComplete = function(browser, result) {
// don't pollute original object
this.stats = Object.create(browser.lastResult);
// sum up tests stats
Function ShellUtility
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ShellUtility = function() {
var self = this;
var winSize = useStdout ? stdout.getWindowSize(1) : [75, 4];
this.getWidth = function() {
Function printBrowserErrors
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function printBrowserErrors(browserErrors) {
if (browserErrors) {
var hashes = '##########'.split('');
var rainbowifyEach = function(val) {
write(val);
Function Helpful
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function Helpful(baseReporterDecorator, formatError, config) {
var self = this;
var defaultOptions = function() {
return {
animationStyle: 'braille',
- 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 saveResultToSuite
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
DataStore.prototype.saveResultToSuite = function(suite, browser, result) {
suite.tests = (!suite.tests) ? [] : suite.tests;
var test = this.findTestByName(suite.tests, result.description);
test.depth = suite.depth + 1;
- 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"