Bamieh/reflow

View on GitHub

Showing 44 of 112 total issues

Function ReflowReporter has 164 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ReflowReporter = function(runner, options = {}) {
  const reporterOptions = options.reporterOptions || {};
  const {
    combinationID,
    flowDetails,
Severity: Major
Found in packages/reflow-reporter/index.js - About 6 hrs to fix

    Function createMatrixGenerator has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
      const {
        // flowPaths,
        hooks,
        suites,
    Severity: Major
    Found in packages/reflow-core/src/generate-matrix.ts - About 3 hrs to fix

      Function insert has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      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

        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">
        Severity: Minor
        Found in examples/example-native-project/index.js - About 2 hrs to fix

          Function reflowBddInterface has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function reflowBddInterface(suite) {
            var suites = [suite];
            var hooks = [];
          
            suite.on('pre-require', function (context, file, mocha) {
          Severity: Major
          Found in packages/reflow-core/src/interfaces/bdd.ts - About 2 hrs to fix

            Function createMatrixGenerator has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
              const {
                // flowPaths,
                hooks,
                suites,
            Severity: Major
            Found in packages/reflow-core/src/_generate-matrix.ts - About 2 hrs to fix

              Function createReflowContext has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const createReflowContext = function(filepath) {
                const self = this;
                return {
                  describe(name) {
                    self.suites[name] = filepath
              Severity: Major
              Found in packages/reflow-core/lib/reflow.js - About 2 hrs to fix

                Function createReflowContext has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const createReflowContext = function(filepath) {
                  const self = this;
                  return {
                    describe(name) {
                      self.suites[name] = filepath
                Severity: Major
                Found in packages/reflow-core/src/context.ts - About 2 hrs to fix

                  Function render has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const { data: {loading, error, node }} = this.props;
                      console.log('node:::, ', node)
                  
                      const { onlyFailures } = this.state
                  Severity: Major
                  Found in packages/reflow-board/src/pages/CombinationsList/Page.js - About 2 hrs to fix

                    Function executeMatrix has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const executeMatrix = function(matrix, config) {
                      const {
                        mocha: mochaConfig,
                        jobDetails,
                        flowDetails,
                    Severity: Major
                    Found in packages/reflow-core/src/execute.ts - About 2 hrs to fix

                      Function getByProjectID has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        getByProjectID(encodedProjectID, cursorInfo) {
                          const projectID = globalID.decode(encodedProjectID).id;
                          return models.instance.jobsByProjectId.findAsync({
                              project_id: models.datatypes.Long.fromString(projectID),
                            }, {
                      Severity: Minor
                      Found in packages/reflow-cassandra-connection/lib/connection/reflow/job.js - About 2 hrs to fix

                        Function createMatrixGenerator has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                        Open

                        const createMatrixGenerator = async function(reflowConfig: ReflowConfig) {
                          const {
                            // flowPaths,
                            hooks,
                            suites,
                        Severity: Minor
                        Found in packages/reflow-core/src/generate-matrix.ts - About 1 hr 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 createReflowContext has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const createReflowContext = () => {
                            const matrix:MatrixEntries = [];
                            const reflowContext = {
                              matrix,
                              flow(title: Title, flowDetails: any) {
                        Severity: Minor
                        Found in packages/reflow-core/src/generate-matrix.ts - About 1 hr to fix

                          Function runFlows has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            runFlows() {
                              const flowsList = Object.values(this.flows);
                              console.log(`${flowsList.length} total flows.`)
                              let totalCombinations = 0;
                          
                          
                          Severity: Minor
                          Found in packages/reflow-core/lib/reflow.js - About 1 hr to fix

                            Function executeMatrix has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const executeMatrix = function(matrix, pool, config) {
                              const {
                                mocha: mochaConfig,
                                jobDetails,
                                flowDetails,
                            Severity: Minor
                            Found in packages/reflow-core/lib/execute.js - About 1 hr to fix

                              Function submitReport has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function submitReport() {
                                  try {
                              
                                    process.stdout.write('\nGenerating Report ... ');
                                    const report = {
                              Severity: Minor
                              Found in packages/reflow-reporter/index.js - About 1 hr to fix

                                Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const data = this.props.data || { skipped: true };
                                
                                    const {loading, viewer, error, skipped, refetch } = data;
                                    // console.log('refetch::', refetch)
                                Severity: Minor
                                Found in packages/reflow-board/src/containers/JobsList/JobsList.js - About 1 hr to fix

                                  Function render has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      const { data: {loading, error, viewer }} = this.props;
                                      const {
                                        onlyFailures,
                                      } = this.state;
                                  Severity: Minor
                                  Found in packages/reflow-board/src/pages/CombinationReport/Page.js - About 1 hr to fix

                                    Function exports has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = function() {
                                      const router = express.Router();
                                    
                                      router.get('/', async function(req, res) {
                                        try {
                                    Severity: Minor
                                    Found in packages/reflow-appium/lib/routes/devices.js - About 1 hr to fix

                                      Function handler has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      exports.handler = function (config) {
                                        console.log('config::', config)
                                        const _ = require('lodash');
                                        const path = require('path');
                                        const fs = require('fs');
                                      Severity: Minor
                                      Found in packages/reflow-cli/bin/commands/run.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language