TWtablero/tablero

View on GitHub

Showing 35 of 35 total issues

Function githubIssues has 364 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function githubIssues() {

      this.defaultAttrs({
        issues: []
      });
Severity: Major
Found in app/js/component/data/github_issues.js - About 1 day to fix

    Function issuesExporter has 177 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function issuesExporter() {
          this.defaultAttrs({
            customColumns: ['1 - Ready', '2 - Development', '3 - Quality Assurance']
          });
    
    
    Severity: Major
    Found in app/js/component/data/issues_exporter.js - About 7 hrs to fix

      Function track has 128 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function track() {
              this.defaultAttrs({
                issueItemSelector: '.issue',
                issuesCount: 0,
                extraAllowedTags: ['1 - Ready', '2 - Development', '3 - Quality Assurance'],
      Severity: Major
      Found in app/js/component/track.js - About 5 hrs to fix

        File github_issues.js has 376 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright 2014 Thoughtworks Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
        Severity: Minor
        Found in app/js/component/data/github_issues.js - About 5 hrs to fix

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

              client.hgetall('priority:' + project, function (err, reply) {
                var answer = [];
                if (err) {
                  console.log('[ERROR] Error while retrieving priorities: ' + err);
                }
          Severity: Major
          Found in lib/priorization.js and 1 other location - About 4 hrs to fix
          lib/columns.js on lines 34..52

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

          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

              client.hgetall('columns', function (err, reply) {
                var answer = [];
                if (err) {
                  console.log('[ERROR] Error while retrieving priorities: ' + err);
                }
          Severity: Major
          Found in lib/columns.js and 1 other location - About 4 hrs to fix
          lib/priorization.js on lines 33..51

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

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

              function columnsModal() {
                this.defaultAttrs({
                  columnsContainerSeletor: '.columns-container'
                })
                this.showModal = function () {
          Severity: Major
          Found in app/js/component/ui/columns_modal.js - About 3 hrs to fix

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

              function columnsRender() {
                this.defaultAttrs({
                  columnsContainer: '.board-columns'
                });
            
            
            Severity: Major
            Found in app/js/component/ui/columns_render.js - About 2 hrs to fix

              Function assignMyselfToIssue has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    this.assignMyselfToIssue = function (ev, assignData) {
              
                      var user, issue, url;
                      if (assignData != undefined) {
                        user = assignData.user;
              Severity: Major
              Found in app/js/component/data/github_issues.js - About 2 hrs to fix

                Function issueTemplate has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function issueTemplate() {
                      var repoNames = config.getReposNames();
                      this.getRepoColor = function (projectName) {
                        var idx = repoNames.indexOf(projectName);
                        return 'color' + idx;
                Severity: Major
                Found in app/js/component/templates/issue_template.js - About 2 hrs to fix

                  Function draggable has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        this.draggable = function (ev, data) {
                          var customColumns = _.map(data.boardColumns, function (column) {
                            return '.' + column;
                          });
                          var draggables = ['.backlog', '.done'].concat(customColumns);
                  Severity: Minor
                  Found in app/js/component/data/github_issues.js - About 1 hr to fix

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

                      function prioritizationManager() {
                    
                        this.changePriority = function (event, params) {
                          var newPriority;
                          if (Number(params.nextElement.priority) === 0) {
                    Severity: Minor
                    Found in app/js/component/data/prioritization_manager.js - About 1 hr to fix

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

                            this.unassignMyselfToIssue = function (ev, assignData) {
                              var user, issue, url, currentData;
                              if (assignData != undefined) {
                                user = assignData.user;
                                issue = assignData.issue;
                      Severity: Minor
                      Found in app/js/component/data/github_issues.js - About 1 hr to fix

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

                            function component() {
                        
                              this.setUp = function () {
                                var context = this;
                                $("#create_issue").click(function () {
                        Severity: Minor
                        Found in app/js/component/ui/new_issue.js - About 1 hr to fix

                          Function columnsManager has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function columnsManager() {
                              this.retrieve = function () {
                                $(document).trigger('ui:blockUI');
                                var that = this;
                                var defaultColumns = [{
                          Severity: Minor
                          Found in app/js/component/data/columns_manager.js - About 1 hr to fix

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

                                  this.fetchIssues = function (ev, data) {
                                    $(document).trigger('ui:blockUI');
                            
                                    data.page = ('page' in data) ? (data.page + 1) : 1;
                            
                            
                            Severity: Minor
                            Found in app/js/component/data/github_issues.js - About 1 hr to fix

                              Function permissionsGateway has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function permissionsGateway() {
                                    var that = this;
                                    this.defaultAttrs({
                              
                                    });
                              Severity: Minor
                              Found in app/js/component/ui/permissions_gateway.js - About 1 hr to fix

                                Function receive has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                          receive: function (event, ui) {
                                            var label, url, oldLabel, state;
                                
                                            if (!this.getCurrentAuthToken()) {
                                              this.trigger(document, 'ui:needs:githubUser');
                                Severity: Minor
                                Found in app/js/component/data/github_issues.js - About 1 hr to fix

                                  Function renderColumns has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      this.renderColumns = function (event, data) {
                                        this.cleanColumns();
                                  
                                        var columns = _.sortBy(data.columns, function (column) {
                                          return Number(column['order']);
                                  Severity: Minor
                                  Found in app/js/component/ui/columns_render.js - About 1 hr to fix

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

                                    module.exports = function (config) {
                                      'use strict';
                                    
                                      config.set({
                                        autoWatch: true,
                                    Severity: Minor
                                    Found in karma.conf.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language