Showing 26 of 192 total issues
Function filterFeaturesAndScenarios
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function filterFeaturesAndScenarios(projectData, projectTags, currentTagName) {
// Count the project tags and mark the current
// tag of interest if there is one.
let ret = countProjectTags(projectData, projectTags, currentTagName);
- 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 generateRepoMetaData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function generateRepoMetaData(projectData, sha, tagsAndBranches, currentBranchName, files, remoteUrl) {
- Create a ticketCreate a ticket
Function getCustomCapabilitiesFromEnvironment
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getCustomCapabilitiesFromEnvironment(webdriver) {
var saucelabsProperties = {};
var browserKey = webdriver.Capability.BROWSER_NAME;
var platformKey = webdriver.Capability.PLATFORM_NAME;
- 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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function() {
// Default asynchronous step timeout to 10 seconds
this.setDefaultTimeout(10 * 1000);
this.World = function World() {
- 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 getFilePathToFileObject
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getFilePathToFileObject(projectRoute, projectData, getFileContent) {
/**
* Given a file path return an object represenating that file
* potentially including a promise for the file contents.
- 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 processFileContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function processFileContent(file) {
var fileContent = file.content;
if (!fileContent || !fileContent.length) {
file.empty = true;
- 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"