TheBrainFamily/chimpy

View on GitHub

Showing 136 of 136 total issues

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

    it('parses https URLs', function () {
      var url = new DDP()._getUrl('https://somewhere:3000');
      expect(url.hostname).toEqual('somewhere');
      expect(url.port).toEqual('3000');
      expect(url.protocol).toEqual('https:');
Severity: Major
Found in src/__tests__/ddp-spec.js and 1 other location - About 2 hrs to fix
src/__tests__/ddp-spec.js on lines 53..58

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

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

    if (booleanHelper.isTruthy(this.options.debugCucumber)) {
      port = parseInt(this.options.debugCucumber, 10);
      if (port > 1) {
        opts.execArgv = ['--debug=' + port];
      } else {
Severity: Major
Found in src/lib/cucumberjs/cucumber.js and 1 other location - About 2 hrs to fix
src/lib/cucumberjs/cucumber.js on lines 54..61

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

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 start has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  start(callback) {
    const args = this._getExecOptions(this.options);

    if (!fs.existsSync(this.options.path)) {
      const infoMessage = `[chimp][cucumber] Directory ${this.options.path} does not exist. Not running`;
Severity: Major
Found in src/lib/cucumberjs/cucumber.js - About 2 hrs to fix

    Function Cli has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Cli(argv) {
      var Cucumber = require('cucumber');
      var Command = require('commander').Command;
      var path = require('path');
    
    
    Severity: Major
    Found in src/lib/cucumberjs/cucumber-wrapper.js - About 2 hrs to fix

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

          it('sets the ssl to true when the protocol is https', function () {
            var ddp = new DDP();
            ddp.url = {
              hostname: 'the.host',
              port: 3130,
      Severity: Major
      Found in src/__tests__/ddp-spec.js and 1 other location - About 2 hrs to fix
      src/__tests__/ddp-spec.js on lines 78..87

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

      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

          it('sets the ssl to false when the protocol is http', function () {
            var ddp = new DDP();
            ddp.url = {
              hostname: 'the.host',
              port: 3130,
      Severity: Major
      Found in src/__tests__/ddp-spec.js and 1 other location - About 2 hrs to fix
      src/__tests__/ddp-spec.js on lines 88..97

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

      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 start has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Jasmine.prototype.start = function (callback) {
      
        var self = this;
        if (glob.sync(self.options.path).length === 0) {
          const infoMessage = `[chimp][jasmine] Directory ${self.options.path} does not exist. Not running`;
      Severity: Major
      Found in src/lib/jasmine/jasmine.js - About 2 hrs to fix

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

        SauceLabsSessionManager.prototype.killCurrentSession = function (callback) {
        
          var self = this;
          var killSession = function (job) {
            // This will stop the session, causing a 'User terminated' error.
        Severity: Major
        Found in src/lib/saucelabs-manager.js - About 2 hrs to fix

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

                request(options, function (error, response) {
                  if (!error && response.statusCode === 200) {
                    log.debug('[chimp][testingbot-session-manager]', 'stopped session');
                    callback();
                  } else {
          Severity: Major
          Found in src/lib/testingbot-manager.js and 1 other location - About 2 hrs to fix
          src/lib/saucelabs-manager.js on lines 92..100

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

          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

              request(options, function (error, response) {
                if (!error && response.statusCode === 200) {
                  log.debug('[chimp][saucelabs-session-manager]', 'stopped session');
                  callback();
                } else {
          Severity: Major
          Found in src/lib/saucelabs-manager.js and 1 other location - About 2 hrs to fix
          src/lib/testingbot-manager.js on lines 84..92

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

          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 getCurrentBrowserVersion has 57 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.getCurrentBrowserVersion = (callback) => {
                  if (booleanHelper.isTruthy(this.options.browser)) {
                      const seleniumOptions = _.clone(this.options.seleniumStandaloneOptions);
                      seleniumOptions.port = 1;
          
          
          Severity: Major
          Found in src/lib/versions.js - About 2 hrs to fix

            File selenium-spec.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            jest.dontMock('../lib/selenium');
            jest.dontMock('../lib/boolean-helper');
            jest.dontMock('underscore');
            
            describe('Selenium', function () {
            Severity: Minor
            Found in src/__tests__/selenium-spec.js - About 2 hrs to fix

              Function _getExecOptions has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                _getExecOptions(options) {
                  const execOptions = ['node', path.resolve(__dirname,
                    path.join('..', '..', '..', 'node_modules', '.bin', 'cucumber.js')
                  )];
              
              
              Severity: Major
              Found in src/lib/cucumberjs/cucumber.js - About 2 hrs to fix

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

                  if (this.options.inspectBrkMocha) {
                    port = parseInt(this.options.inspectBrkMocha);
                    if (port > 1) {
                      opts.execArgv = ['--inspect-brk=' + port];
                    } else {
                Severity: Major
                Found in src/lib/mocha/mocha.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 53..60
                src/lib/jasmine/jasmine.js on lines 62..69
                src/lib/mocha/mocha.js on lines 53..60
                src/lib/mocha/mocha.js on lines 62..69
                src/lib/mocha/mocha.js on lines 71..78

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

                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 6 locations. Consider refactoring.
                Open

                  if (this.options.inspectMocha) {
                    port = parseInt(this.options.inspectMocha);
                    if (port > 1) {
                      opts.execArgv = ['--inspect=' + port];
                    } else {
                Severity: Major
                Found in src/lib/mocha/mocha.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 53..60
                src/lib/jasmine/jasmine.js on lines 62..69
                src/lib/mocha/mocha.js on lines 53..60
                src/lib/mocha/mocha.js on lines 62..69
                src/lib/mocha/mocha.js on lines 80..87

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

                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 6 locations. Consider refactoring.
                Open

                  if (this.options.debugJasmine) {
                    port = parseInt(this.options.debugJasmine);
                    if (port > 1) {
                      opts.execArgv = ['--debug=' + port];
                    } else {
                Severity: Major
                Found in src/lib/jasmine/jasmine.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 62..69
                src/lib/mocha/mocha.js on lines 53..60
                src/lib/mocha/mocha.js on lines 62..69
                src/lib/mocha/mocha.js on lines 71..78
                src/lib/mocha/mocha.js on lines 80..87

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

                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 6 locations. Consider refactoring.
                Open

                  if (this.options.debugMocha) {
                    port = parseInt(this.options.debugMocha);
                    if (port > 1) {
                      opts.execArgv = ['--debug=' + port];
                    } else {
                Severity: Major
                Found in src/lib/mocha/mocha.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 53..60
                src/lib/jasmine/jasmine.js on lines 62..69
                src/lib/mocha/mocha.js on lines 62..69
                src/lib/mocha/mocha.js on lines 71..78
                src/lib/mocha/mocha.js on lines 80..87

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

                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 6 locations. Consider refactoring.
                Open

                  if (this.options.debugBrkMocha) {
                    port = parseInt(this.options.debugBrkMocha);
                    if (port > 1) {
                      opts.execArgv = ['--debug-brk=' + port];
                    } else {
                Severity: Major
                Found in src/lib/mocha/mocha.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 53..60
                src/lib/jasmine/jasmine.js on lines 62..69
                src/lib/mocha/mocha.js on lines 53..60
                src/lib/mocha/mocha.js on lines 71..78
                src/lib/mocha/mocha.js on lines 80..87

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

                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 6 locations. Consider refactoring.
                Open

                  if (this.options.debugBrkMocha) {
                    port = parseInt(this.options.debugBrkMocha);
                    if (port > 1) {
                      opts.execArgv = ['--debug-brk=' + port];
                    } else {
                Severity: Major
                Found in src/lib/jasmine/jasmine.js and 5 other locations - About 2 hrs to fix
                src/lib/jasmine/jasmine.js on lines 53..60
                src/lib/mocha/mocha.js on lines 53..60
                src/lib/mocha/mocha.js on lines 62..69
                src/lib/mocha/mocha.js on lines 71..78
                src/lib/mocha/mocha.js on lines 80..87

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

                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 3 locations. Consider refactoring.
                Open

                        request(options, function (error, response) {
                          if (!error && response.statusCode === 200) {
                            log.debug('[chimp][browserstack-session-manager]', 'stopped session');
                            callback();
                          } else {
                Severity: Major
                Found in src/lib/browserstack-manager.js and 2 other locations - About 2 hrs to fix
                src/lib/saucelabs-manager.js on lines 111..119
                src/lib/testingbot-manager.js on lines 103..111

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

                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