senthanal/gulp-jasmine-webdriverio

View on GitHub

Showing 4 of 6 total issues

Function exports has 235 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (args) {
    args = typeof args === 'undefined' ? {configFile: undefined, args: {}} : args;
    var configs = typeof args.configFile === 'undefined' ? {} : require(args.configFile).config;
    var argsArgs = typeof args.args === 'undefined' ? {} : args.args;
    var mergedOptions = merge(configs, argsArgs);
Severity: Major
Found in index.js - About 1 day to fix

    Function exports has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = function (args) {
        args = typeof args === 'undefined' ? {configFile: undefined, args: {}} : args;
        var configs = typeof args.configFile === 'undefined' ? {} : require(args.configFile).config;
        var argsArgs = typeof args.args === 'undefined' ? {} : args.args;
        var mergedOptions = merge(configs, argsArgs);
    Severity: Minor
    Found in index.js - About 1 day to fix

    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 index.js has 261 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    'use strict';
    
    var fs = require('fs');
    var path = require('path');
    var gs = require('glob-stream');
    Severity: Minor
    Found in index.js - About 2 hrs to fix

      Function startServer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var startServer = function (callback) {
      
              if (tunnel) {
      
                  if (isSauceTunnelRunning) {
      Severity: Minor
      Found in index.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language