oss-specs/specs

View on GitHub

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);
Severity: Minor
Found in lib/specifications/files/feature-files/tags.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 generateRepoMetaData has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function generateRepoMetaData(projectData, sha, tagsAndBranches, currentBranchName, files, remoteUrl) {
Severity: Minor
Found in lib/specifications/repository-types/git/project-data.js - About 45 mins to fix

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;
Severity: Minor
Found in features-support/hooks/ui-automation.js - About 35 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 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() {
Severity: Minor
Found in features-support/world.js - About 25 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 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.
Severity: Minor
Found in lib/specifications/files/process-files.js - About 25 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 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;
Severity: Minor
Found in lib/specifications/files/process-files.js - About 25 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