funretro/distributed

View on GitHub

Showing 15 of 15 total issues

File mainController.js has 279 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global EmojiPicker */
'use strict';

angular
  .module('fireideaz')
Severity: Minor
Found in js/mainController.js - About 2 hrs to fix

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

        function createUserId() {
            return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
                var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
                return v.toString(16);
            });
    Severity: Major
    Found in js/utils.js and 1 other location - About 2 hrs to fix
    functions/index.js on lines 13..18

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

    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

      function createUserId() {
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
          var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
          return v.toString(16);
        });
    Severity: Major
    Found in functions/index.js and 1 other location - About 2 hrs to fix
    js/utils.js on lines 6..11

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

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

    exports.newboard = functions.https.onRequest(function(req, res) {
      function createUserId() {
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
          var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
          return v.toString(16);
    Severity: Major
    Found in functions/index.js - About 2 hrs to fix

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

                $(filteredArray).each(function(index2, message) {
                  if (message.type.id === column.id) {
                    clipboard += '- ' + message.text + ' (' + message.votes + ' votes) \n';
                  }
                });
      Severity: Major
      Found in js/services/importExportService.js and 1 other location - About 2 hrs to fix
      js/services/importExportService.js on lines 58..62

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

      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

                $(filteredArray).each(function(index2, message) {
                  if (message.type.id === column.id) {
                    clipboard += '- ' + message.text + ' (' + message.votes + ' votes) <br />';
                  }
                });
      Severity: Major
      Found in js/services/importExportService.js and 1 other location - About 2 hrs to fix
      js/services/importExportService.js on lines 84..88

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

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

      module.exports = function(config) {
        config.set({
      
          basePath: '',
          frameworks: ['mocha', 'chai', 'sinon'],
      Severity: Minor
      Found in karma.conf.js - About 1 hr to fix

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

        angular.module('fireideaz').directive('mainPage', ['ModalService', function(modalService) {
            return {
              restrict: 'E',
              templateUrl : 'components/mainPage.html',
              link: function($scope) {
        Severity: Major
        Found in js/directives/mainPage.js and 1 other location - About 1 hr to fix
        js/directives/dialogs.js on lines 3..12

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

        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

        angular.module('fireideaz').directive('dialogs', ['ImportExportService', function(importExportService) {
            return {
              restrict: 'E',
              templateUrl : 'components/dialogs.html',
              link: function($scope) {
        Severity: Major
        Found in js/directives/dialogs.js and 1 other location - About 1 hr to fix
        js/directives/mainPage.js on lines 3..12

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

        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

        angular.module('fireideaz').directive('pageHeader', ['ModalService', function(modalService) {
            return {
              templateUrl : 'components/header.html',
              link: function($scope) {
                $scope.modalService = modalService;
        Severity: Major
        Found in js/directives/header.js and 2 other locations - About 1 hr to fix
        js/directives/menu.js on lines 3..11
        js/directives/sidebar.js on lines 3..11

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

        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

        angular.module('fireideaz').directive('menu', ['VoteService', function(voteService) {
            return {
              templateUrl : 'components/menu.html',
              link: function($scope) {
                $scope.voteService = voteService;
        Severity: Major
        Found in js/directives/menu.js and 2 other locations - About 1 hr to fix
        js/directives/header.js on lines 3..11
        js/directives/sidebar.js on lines 3..11

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

        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

        angular.module('fireideaz').directive('sidebar', ['ModalService', function(modalService) {
            return {
              templateUrl : 'components/sidebar.html',
              link: function($scope) {
                $scope.modalService = modalService;
        Severity: Major
        Found in js/directives/sidebar.js and 2 other locations - About 1 hr to fix
        js/directives/header.js on lines 3..11
        js/directives/menu.js on lines 3..11

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

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

          function createNewBoard(userId) {
            var board = admin.database().ref('/boards/' + userId);
        
            board.set({
              boardId: req.query.name,
        Severity: Minor
        Found in functions/index.js - About 1 hr to fix

          Function generatePdf has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              importExportService.generatePdf = function(board, messages, sortField) {
                /* globals jsPDF */
                var pdf = new jsPDF();
                var currentHeight = 10;
          
          
          Severity: Minor
          Found in js/services/importExportService.js - About 1 hr to fix

            Function vote has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                voteService.vote = function(userId, maxVotes, messages, messageKey, votes) {
            Severity: Minor
            Found in js/services/voteService.js - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language