yahoo/hodman

View on GitHub

Showing 5 of 23 total issues

Function capture has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        capture: function (title, id, wait, additionalBlackOuts) {

            var self = this, image, promise, blackOutList, frame, buffer, fileName, path, prefix;

            this.getAdapter().sleep(wait || 1000);
Severity: Major
Found in lib/pageObjects/baseObject.js - About 2 hrs to fix

Function parse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        parse: function (data) {
            var moduleNames = _.keys(data),
                result = {},
                container = new ServiceContainer(result, this._getChildOptions());

Severity: Minor
Found in lib/service/lookup.js - About 1 hr to fix

Function _getPanelRootElement has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        _getPanelRootElement: function (context, timeOut, waitInMs) {
            var selector = this.constructor.SELECTOR,
                elements;

            context = context || this.getAdapter().getPageContext();
Severity: Minor
Found in lib/pageObjects/panelObject.js - About 45 mins 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

Function getValue has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        getValue: function (field, directAccess) {
            var info, list, moduleList;

            if (!this.getEndPoint().hasField(field)) {
                throw new Error('Field ' + field + ' is not available.');
Severity: Minor
Found in lib/service/entry.js - About 45 mins 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

Function waitUntil has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        waitUntil: function (fn, message, timeOut, waitInMs) {

            var startTime = (+new Date()),
                result;

Severity: Minor
Found in lib/pageObjects/baseObject.js - About 45 mins 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

Severity
Category
Status
Source
Language