Bamieh/reflow

View on GitHub

Showing 112 of 112 total issues

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

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      describe('Suite E', function() {
        before(function() {
          console.log('Suite E before!')
        })
        it('does assertions', function() {
      Severity: Major
      Found in examples/example-e2e-project/suites/suite-e.spec.js and 1 other location - About 1 hr to fix
      examples/example-native-project/suites/suite-e.spec.js on lines 1..8

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 68.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      describe('Suite E', function() {
        before(function() {
          console.log('Suite E before!')
        })
        it('does assertions', function() {
      Severity: Major
      Found in examples/example-native-project/suites/suite-e.spec.js and 1 other location - About 1 hr to fix
      examples/example-e2e-project/suites/suite-e.spec.js on lines 1..8

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 68.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      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

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        describe('Suite D', function() {
          it('does assertions', function() {
            expect(1).to.equal(1);
            return new Promise((resolve, reject) => {
              setTimeout(resolve, 600)
        Severity: Major
        Found in examples/example-native-project/suites/suite-d.spec.js and 1 other location - About 1 hr to fix
        examples/example-e2e-project/suites/suite-d.spec.js on lines 1..8

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 67.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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 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

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

            describe('Suite D', function() {
              it('does assertions', function() {
                expect(1).to.equal(1);
                return new Promise((resolve, reject) => {
                  setTimeout(resolve, 600)
            Severity: Major
            Found in examples/example-e2e-project/suites/suite-d.spec.js and 1 other location - About 1 hr to fix
            examples/example-native-project/suites/suite-d.spec.js on lines 1..8

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 67.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            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

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

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

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

                  async function generateMatrix(filePath: string): Promise<MatrixEntries> {
                    let finalResult: any = [];
                
                    const reflowContext = createReflowContext()
                    await runInSandbox(filePath, reflowContext)
                Severity: Minor
                Found in packages/reflow-core/src/generate-matrix.ts - About 1 hr to fix

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

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

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

                    module.exports = async function(config) {
                      console.log('Binding models.');
                      const bindModels = util.promisify(models.setDirectory( __dirname + '/models').bind);
                    
                      try {
                    Severity: Minor
                    Found in packages/reflow-cassandra-connection/lib/index.js - About 1 hr to fix

                      Function runFlows has 36 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;
                          const matrices = flowsList.map(({name, fn}) => {
                      Severity: Minor
                      Found in packages/reflow-core/src/reflow.ts - About 1 hr to fix

                        Function createReflowContext has 36 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 _execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          async function _execute (elementId, methodName, args = [], skipScreenshotAndSource = false) {
                            let cachedEl;
                            let res = {};
                          
                            if (elementId) {
                          Severity: Minor
                          Found in examples/example-native-project/actions/execute/command.js - About 1 hr to fix

                            Identical blocks of code found in 2 locations. Consider refactoring.
                            Open

                            async function getAndroidDevices() {
                              console.log('Getting Android Devices.');
                            
                              return client.listDevices()
                                .then(getAndroidFeatures)
                            Severity: Major
                            Found in packages/reflow-appium/lib/devices.js and 1 other location - About 1 hr to fix
                            packages/reflow-appium/lib/routes/devices.js on lines 74..101

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 62.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Identical blocks of code found in 2 locations. Consider refactoring.
                            Open

                            async function getAndroidDevices() {
                              console.log('Getting Android Devices.');
                            
                              return client.listDevices()
                                .then(getAndroidFeatures)
                            Severity: Major
                            Found in packages/reflow-appium/lib/routes/devices.js and 1 other location - About 1 hr to fix
                            packages/reflow-appium/lib/devices.js on lines 74..101

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 62.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                              {
                                Header: "Details",
                                columns: [{
                                  Header: "Result",
                                  accessor: "node.result"
                            Severity: Major
                            Found in packages/reflow-board/src/containers/FlowsList/columns.js and 1 other location - About 1 hr to fix
                            packages/reflow-board/src/pages/CombinationsList/columns.js on lines 8..23

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 61.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Severity
                            Category
                            Status
                            Source
                            Language