Showing 87 of 107 total issues
Function resolvePath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Resources.prototype.resolvePath = function (path, callback) {
var rootsArray = this._rootsArray;
var checkFileExistence = function (pathInContext, currentIndex) {
var entry = rootsArray[currentIndex];
var absolutePath = pathUtils.join(entry.root, pathInContext);
- 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 buildNameFromConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var buildNameFromConfig = function (config) {
if (config.displayAs) {
return config.displayAs;
}
- 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 _addResult
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
TestEnumerator.prototype._addResult = function (testInfo, res) {
var classpath = testInfo.name;
var testSuite = res.testSuite;
var error = res.error;
if (error) {
- 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 bootPhantom
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
bootPhantom: function (cfg, state, n) {
cfg.args = cfg.args || {};
var phantomPath = cfg.phantomPath;
var controlScript = pathUtil.join(__dirname, '../browsers/phantomjs-control-script.js');
- 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 onSocketData_pauseChanged
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Slave.prototype.onSocketData_pauseChanged = function (message) {
var paused = message.paused;
paused = !!paused; // makes sure it is a boolean
if (this.paused !== paused) {
this.paused = paused;
- 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 set
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.set = function (path, config) {
config = config || path;
if (typeof path === "string") {
if (!internalConfig[path]) {
internalConfig[path] = {};
- 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 browserMatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.browserMatch = function (config, browserInfo) {
var match = true;
if (config.browserName != null) {
match = match && (config.browserName == browserInfo.family);
}
- 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"