tangosource/tangoestimate

View on GitHub

Showing 82 of 82 total issues

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

module.exports = function (grunt) {
  var localConfig;
  try {
    localConfig = require('./server/config/ennvironment');
  } catch(e) {
Severity: Major
Found in Gruntfile.js - About 3 days to fix

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

        it('s able to join a session as player', function() {
          page.usernameInput.sendKeys('Arya');
          page.startBtn.click();
          page.goBtn.click();
    
    
    Severity: Major
    Found in e2e/main/main.spec.js and 1 other location - About 2 days to fix
    e2e/main/main.spec.js on lines 122..154

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

    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('s able to join a retrospective session', function() {
          page.usernameInput.sendKeys('Arya');
          page.retrospectiveOpt.click();
          page.startBtn.click();
    
    
    Severity: Major
    Found in e2e/main/main.spec.js and 1 other location - About 2 days to fix
    e2e/main/main.spec.js on lines 88..120

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

    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('can close modal if user does not enter username', function(){
        browser.getCurrentUrl().then(function(url){
          browser.driver.executeScript('window.open();');
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
    Severity: Major
    Found in e2e/retrospective/retrospective.spec.js and 1 other location - About 1 day to fix
    e2e/session/session.spec.js on lines 86..112

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

    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('can close modal if user does not enter username', function(){
        browser.getCurrentUrl().then(function(url){
          browser.driver.executeScript('window.open();');
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
    Severity: Major
    Found in e2e/session/session.spec.js and 1 other location - About 1 day to fix
    e2e/retrospective/retrospective.spec.js on lines 91..117

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

    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

      it('s prompts username request if user does not have', function(){
        browser.getCurrentUrl().then(function(url){
          browser.driver.executeScript('window.open();');
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
    Severity: Major
    Found in e2e/session/session.spec.js and 1 other location - About 1 day to fix
    e2e/retrospective/retrospective.spec.js on lines 68..89

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

    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

      it('s prompts username request if user does not have', function(){
        browser.getCurrentUrl().then(function(url){
          browser.driver.executeScript('window.open();');
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
    Severity: Major
    Found in e2e/retrospective/retrospective.spec.js and 1 other location - About 1 day to fix
    e2e/session/session.spec.js on lines 63..84

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

    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

    File Gruntfile.js has 636 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Generated on 2015-01-19 using generator-angular-fullstack 2.0.13
    'use strict';
    
    module.exports = function (grunt) {
      var localConfig;
    Severity: Major
    Found in Gruntfile.js - About 1 day to fix

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

        it('s able to copy link and id to share session', function() {
          browser.getCurrentUrl().then(function(url){
            expect(page.shareUrl.getAttribute('value')).toEqual(url);
            expect(page.shareId.getAttribute('value')).toEqual(id);
            page.shareUrlBtn.click();
      Severity: Major
      Found in e2e/session/session.spec.js and 1 other location - About 1 day to fix
      e2e/retrospective/retrospective.spec.js on lines 119..131

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

      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('s able to copy link and id to share session', function() {
          browser.getCurrentUrl().then(function(url){
            expect(page.shareUrl.getAttribute('value')).toEqual(url);
            expect(page.shareId.getAttribute('value')).toEqual(id);
            page.shareUrlBtn.click();
      Severity: Major
      Found in e2e/retrospective/retrospective.spec.js and 1 other location - About 1 day to fix
      e2e/session/session.spec.js on lines 30..42

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

      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('s able to share via linkedin', function(done) {
          page.linkedInBtn.click();
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
            var newWindowHandle = handles[1];
      Severity: Major
      Found in e2e/footer/footer.spec.js and 1 other location - About 1 day to fix
      e2e/footer/footer.spec.js on lines 13..28

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

      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('s able to share via facebook', function(done) {
          page.fbBtn.click();
          var appWindow = browser.getWindowHandle();
          browser.getAllWindowHandles().then(function (handles) {
            var newWindowHandle = handles[1];
      Severity: Major
      Found in e2e/footer/footer.spec.js and 1 other location - About 1 day to fix
      e2e/footer/footer.spec.js on lines 50..65

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

      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

      File retrospective.spec.js has 507 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      var config = require('../../server/config/environment');
      
      describe('Retrospective View', function() {
        var page;
      Severity: Major
      Found in e2e/retrospective/retrospective.spec.js - About 1 day to fix

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

          it('changes previous entry as edit entry in previous function', function() {
            scope.init();
            scope.session = {good: [{text: 'text', username: 'Tester'}, {text: 'second', username: 'Tester'}], bad: [], improvements: []};
            scope.openEntry('good', scope.session.good[0]);
            expect(scope.currentEntry).toBe(scope.session.good[0])
        Severity: Major
        Found in client/app/retrospective/retrospective.controller.spec.js and 1 other location - About 7 hrs to fix
        client/app/retrospective/retrospective.controller.spec.js on lines 305..312

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

        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('changes next entry as edit entry in next function', function() {
            scope.init();
            scope.session = {good: [{text: 'text', username: 'Tester'}, {text: 'second', username: 'Tester'}], bad: [], improvements: []};
            scope.openEntry('good', scope.session.good[0]);
            expect(scope.currentEntry).toBe(scope.session.good[0])
        Severity: Major
        Found in client/app/retrospective/retrospective.controller.spec.js and 1 other location - About 7 hrs to fix
        client/app/retrospective/retrospective.controller.spec.js on lines 314..321

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

        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

        File main.spec.js has 415 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        
        var should = require('should');
        var io = require('socket.io-client');
        var _ = require('lodash');
        Severity: Minor
        Found in server/components/sockets/main.spec.js - About 5 hrs to fix

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

            $scope.previous = function(entry){
              var type  = $scope.entryType;
              var index = _.indexOf($scope.session[type], entry);
          
              if(index != -1 && $scope.session[type][index - 1]){
          Severity: Major
          Found in client/app/retrospective/retrospective.controller.js and 1 other location - About 5 hrs to fix
          client/app/retrospective/retrospective.controller.js on lines 146..154

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

          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

            $scope.next = function(entry){
              var type  = $scope.entryType;
              var index = _.indexOf($scope.session[type], entry);
          
              if(index != -1 && $scope.session[type][index + 1]){
          Severity: Major
          Found in client/app/retrospective/retrospective.controller.js and 1 other location - About 5 hrs to fix
          client/app/retrospective/retrospective.controller.js on lines 156..164

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

          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

            var  defaultValues = [
              {label: 0, value: 0},
              {label: 1, value: 1},
              {label: 2, value: 2},
              {label: 3, value: 3},
          Severity: Major
          Found in client/app/voteValues/voteValues.controller.spec.js and 1 other location - About 4 hrs to fix
          client/components/socket/socket.mock.js on lines 5..15

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

          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

            var  defaultValues = [
              {label: 0, value: 0},
              {label: 1, value: 1},
              {label: 2, value: 2},
              {label: 3, value: 3},
          Severity: Major
          Found in client/components/socket/socket.mock.js and 1 other location - About 4 hrs to fix
          client/app/voteValues/voteValues.controller.spec.js on lines 10..20

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

          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