SuitestAutomation/suitest-js-api

View on GitHub

Showing 179 of 181 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (data.comparator) {
                socketMessage.request.condition.type = applyNegation(data.comparator.type, data);
                socketMessage.request.condition.val = data.comparator.val;
            }
Severity: Major
Found in lib/chains/cookieChain.js and 1 other location - About 1 hr to fix
lib/chains/locationChain.js on lines 39..42

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 70.

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

Further Reading

Function setScreenOrientationFactory has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const setScreenOrientationFactory = (classInstance) => {
    const toJSON = (data) => ({
        type: getRequestType(data, false),
        request: {
            type: 'deviceSettings',
Severity: Minor
Found in lib/chains/setScreenOrientationChain.js - About 1 hr to fix

    Function chainedPromise has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            const chainedPromise = chainPromise(async() => {
                let promise;
    
                if (promiseMap.has(data)) {
                    promise = promiseMap.get(data);
    Severity: Minor
    Found in lib/composers/thenComposer.js - About 1 hr to fix

      Function pollUrlFactory has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const pollUrlFactory = (classInstance) => {
          const toJSON = (data) => {
              const type = getRequestType(data, false);
              const {url = '', response = ''} = data;
      
      
      Severity: Minor
      Found in lib/chains/pollUrlChain.js - About 1 hr to fix

        Line 252 exceeds the maximum line length of 120.
        Open

                throw new SuitestError('Combination of deprecated configFile with --base-config-file or --override-config-file or overrideConfigFile is not allowed');
        Severity: Minor
        Found in lib/testLauncher/composeConfig.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 244 exceeds the maximum line length of 120.
        Open

                    throw new SuitestError('Combination of deprecated --config-file with either --base-config-file or --override-config-file is not allowed');
        Severity: Minor
        Found in lib/testLauncher/composeConfig.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 242 exceeds the maximum line length of 120.
        Open

                console.warn('Warning: You are using deprecated argument --config-file. Please use --override-config-file or --base-config-file instead.');
        Severity: Minor
        Found in lib/testLauncher/composeConfig.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 251 exceeds the maximum line length of 120.
        Open

            if ((argv.configFile || rcConfig.configFile) && (argv.baseConfigFile || argv.overrideConfigFile || rcConfig.overrideConfigFile)) {
        Severity: Minor
        Found in lib/testLauncher/composeConfig.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 254 exceeds the maximum line length of 120.
        Open

            const configFilePath = argv.overrideConfigFile || rcConfig.overrideConfigFile || argv.configFile || rcConfig.configFile;
        Severity: Minor
        Found in lib/testLauncher/composeConfig.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 53 exceeds the maximum line length of 120.
        Open

                    describe: 'Path to a config file to override standard configuration files. Standard configuration files are ignored.',
        Severity: Minor
        Found in lib/testLauncher/commands/run.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Line 48 exceeds the maximum line length of 120.
        Open

                    describe: 'Specifies an additional config file which properties have precedence over properties in a standard configuration file.',
        Severity: Minor
        Found in lib/testLauncher/commands/run.js by eslint

        enforce a maximum line length (max-len)

        Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

        Rule Details

        This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

        Options

        This rule has a number or object option:

        • "code" (default 80) enforces a maximum line length
        • "tabWidth" (default 4) specifies the character width for tab characters
        • "comments" enforces a maximum line length for comments; defaults to value of code
        • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
        • "ignoreComments": true ignores all trailing comments and comments on their own line
        • "ignoreTrailingComments": true ignores only trailing comments
        • "ignoreUrls": true ignores lines that contain a URL
        • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
        • "ignoreTemplateLiterals": true ignores lines that contain a template literal
        • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

        code

        Examples of incorrect code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

        Examples of correct code for this rule with the default { "code": 80 } option:

        /*eslint max-len: ["error", { "code": 80 }]*/
        
        var foo = {
          "bar": "This is a bar.",
          "baz": { "qux": "This is a qux" },
          "easier": "to read"
        };

        tabWidth

        Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

        Examples of correct code for this rule with the default { "tabWidth": 4 } option:

        /*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/
        
        \t  \t  var foo = {
        \t  \t  \t  \t  "bar": "This is a bar.",
        \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
        \t  \t  };

        comments

        Examples of incorrect code for this rule with the { "comments": 65 } option:

        /*eslint max-len: ["error", { "comments": 65 }]*/
        
        /**
         * This is a comment that violates the maximum line length we have specified
        **/

        ignoreComments

        Examples of correct code for this rule with the { "ignoreComments": true } option:

        /*eslint max-len: ["error", { "ignoreComments": true }]*/
        
        /**
         * This is a really really really really really really really really really long comment
        **/

        ignoreTrailingComments

        Examples of correct code for this rule with the { "ignoreTrailingComments": true } option:

        /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
        
        var foo = 'bar'; // This is a really really really really really really really long comment

        ignoreUrls

        Examples of correct code for this rule with the { "ignoreUrls": true } option:

        /*eslint max-len: ["error", { "ignoreUrls": true }]*/
        
        var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

        ignoreStrings

        Examples of correct code for this rule with the { "ignoreStrings": true } option:

        /*eslint max-len: ["error", { "ignoreStrings": true }]*/
        
        var longString = 'this is a really really really really really long string!';

        ignoreTemplateLiterals

        Examples of correct code for this rule with the { "ignoreTemplateLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
        
        var longTemplateLiteral = `this is a really really really really really long template literal!`;

        ignoreRegExpLiterals

        Examples of correct code for this rule with the { "ignoreRegExpLiterals": true } option:

        /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
        
        var longRegExpLiteral = /this is a really really really really really long regular expression!/;

        ignorePattern

        Examples of correct code for this rule with the ignorePattern option:

        /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(" }]*/
        
        var dep = require('really/really/really/really/really/really/really/really/long/module');

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md)
        • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

        Function getComposers has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            const getComposers = (data) => {
                const output = [
                    toStringComposer,
                    thenComposer,
                    cloneComposer,
        Severity: Minor
        Found in lib/chains/videoChain.js - About 1 hr to fix

          Function readRcConfig has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function readRcConfig(pathToConfig) {
              let mainConfigFilePath = '';
          
              if (pathToConfig) {
                  mainConfigFilePath = pathToConfig;
          Severity: Minor
          Found in lib/testLauncher/composeConfig.js - About 1 hr to fix

            Function sleepFactory has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const sleepFactory = (classInstance) => {
                const toJSON = (data) => ({
                    type: getRequestType(data, false),
                    request: {
                        type: 'sleep',
            Severity: Minor
            Found in lib/chains/sleepChain.js - About 1 hr to fix

              Function executeBrightScriptFactory has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const executeBrightScriptFactory = (classInstance) => {
                  const toJSON = (data) => ({
                      type: getRequestType(data, false),
                      request: {
                          type: 'execBRSCmd',
              Severity: Minor
              Found in lib/chains/executeBrightScriptChain.js - About 1 hr to fix

                Function executeCommandFactory has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const executeCommandFactory = (classInstance) => {
                    const toJSON = (data) => ({
                        type: getRequestType(data, false),
                        request: {
                            type: 'execCmd',
                Severity: Minor
                Found in lib/chains/executeCommandChain.js - About 1 hr to fix

                  Function prettifyJsonSchemaErrors has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function prettifyJsonSchemaErrors(validate) {
                      let errors = [];
                  
                      if (validate.schema.schemaId === validationKeys.ELEMENT_PROPS) {
                          errors = prettifyElementPropsErrors(validate);
                  Severity: Minor
                  Found in lib/validation/validators.js - About 1 hr to fix

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                            subject.responseInfo = (data.response && data.response.props || []).map(item => ({
                                name: typeof item.name === 'symbol' ? NETWORK_PROP[item.name] : item.name,
                                val: item.val,
                                compare: item.compare,
                            }));
                    Severity: Major
                    Found in lib/chains/networkRequestChain.js and 1 other location - About 1 hr to fix
                    lib/chains/networkRequestChain.js on lines 69..73

                    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 95.

                    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

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                            subject.requestInfo = (data.request && data.request.props || []).map(item => ({
                                name: typeof item.name === 'symbol' ? NETWORK_PROP[item.name] : item.name,
                                val: item.val,
                                compare: item.compare,
                            }));
                    Severity: Major
                    Found in lib/chains/networkRequestChain.js and 1 other location - About 1 hr to fix
                    lib/chains/networkRequestChain.js on lines 76..80

                    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 95.

                    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

                    Further Reading

                    Function toJSON has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        const toJSON = data => {
                            const type = getRequestType(data);
                            const socketMessage = {type};
                            const subject = {
                                type: 'network',
                    Severity: Minor
                    Found in lib/chains/networkRequestChain.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language