Showing 44 of 112 total issues
Function ReflowReporter
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReflowReporter = function(runner, options = {}) {
const reporterOptions = options.reporterOptions || {};
const {
combinationID,
flowDetails,
Function createMatrixGenerator
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
const {
// flowPaths,
hooks,
suites,
Function insert
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
insert(input) {
const jobsByProjectID = new models.instance.jobsByProjectId({
project_id: models.datatypes.Long.fromString(input.jobDetails.projectID || "6366977657833263104"),
job_id: models.datatypes.Long.fromString(input.jobDetails.id),
threads: input.jobDetails.numberOfThreads,
File index.js
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const { DOMParser } = require('xmldom');
const xpath = require('xpath');
const sourceXML = `
<?xml version="1.0" encoding="UTF-8"?><AppiumAUT><XCUIElementTypeApplication type="XCUIElementTypeApplication" name=" " label=" " enabled="true" visible="true" x="0" y="0" width="375" height="667">
Function reflowBddInterface
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reflowBddInterface(suite) {
var suites = [suite];
var hooks = [];
suite.on('pre-require', function (context, file, mocha) {
Function createMatrixGenerator
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
const {
// flowPaths,
hooks,
suites,
Function createReflowContext
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createReflowContext = function(filepath) {
const self = this;
return {
describe(name) {
self.suites[name] = filepath
Function createReflowContext
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createReflowContext = function(filepath) {
const self = this;
return {
describe(name) {
self.suites[name] = filepath
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { data: {loading, error, node }} = this.props;
console.log('node:::, ', node)
const { onlyFailures } = this.state
Function executeMatrix
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const executeMatrix = function(matrix, config) {
const {
mocha: mochaConfig,
jobDetails,
flowDetails,
Function getByProjectID
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getByProjectID(encodedProjectID, cursorInfo) {
const projectID = globalID.decode(encodedProjectID).id;
return models.instance.jobsByProjectId.findAsync({
project_id: models.datatypes.Long.fromString(projectID),
}, {
Function createMatrixGenerator
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
const {
// flowPaths,
hooks,
suites,
- 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 createReflowContext
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createReflowContext = () => {
const matrix:MatrixEntries = [];
const reflowContext = {
matrix,
flow(title: Title, flowDetails: any) {
Function runFlows
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runFlows() {
const flowsList = Object.values(this.flows);
console.log(`${flowsList.length} total flows.`)
let totalCombinations = 0;
Function executeMatrix
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const executeMatrix = function(matrix, pool, config) {
const {
mocha: mochaConfig,
jobDetails,
flowDetails,
Function submitReport
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function submitReport() {
try {
process.stdout.write('\nGenerating Report ... ');
const report = {
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const data = this.props.data || { skipped: true };
const {loading, viewer, error, skipped, refetch } = data;
// console.log('refetch::', refetch)
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { data: {loading, error, viewer }} = this.props;
const {
onlyFailures,
} = this.state;
Function exports
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function() {
const router = express.Router();
router.get('/', async function(req, res) {
try {
Function exports
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(opts) {
const router = express.Router();
let seleniumChild;
router.get('/install', async function(req, res) {
try {