Showing 6 of 14 total issues
AllureReporter
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
class AllureReporter extends events.EventEmitter {
constructor (baseReporter, config, options = {}) {
super()
this.baseReporter = baseReporter
File reporter.js
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
import process from 'process'
import events from 'events'
import Allure from 'allure-js-commons'
import Step from 'allure-js-commons/beans/step'
import {getTestStatus, isEmpty, PASSED, BROKEN, FAILED} from './utils'
Function constructor
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor (baseReporter, config, options = {}) {
super()
this.baseReporter = baseReporter
this.config = config
Function runnerResult
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
runnerResult (command) {
if (this.isMultiremote) {
return
}
- 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 getTestStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function getTestStatus (test, config) {
let status = FAILED
if (config.framework === 'jasmine') {
return status
- 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 cucumberSuiteStart
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
cucumberSuiteStart (suite) {
const allure = this.getAllure(suite.cid)
if (!suite.parent) {
const currentSuite = allure.getCurrentSuite()
- 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"