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);
- Create a ticketCreate a ticket
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());
- Create a ticketCreate a ticket
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();
- Read upRead up
- Create a ticketCreate a ticket
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.');
- Read upRead up
- Create a ticketCreate a ticket
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;
- Read upRead up
- Create a ticketCreate a ticket
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"