sweetp/dashboard

View on GitHub

Showing 21 of 21 total issues

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

module.exports = function (grunt) {
  require('load-grunt-tasks')(grunt);
  require('time-grunt')(grunt);

  // configurable paths
Severity: Major
Found in Gruntfile.js - About 1 day to fix

    Function controller has 110 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            controller: function ($scope, $log, Sweetp, Notifications, KeyboardShortcutsFromSettings) {
                var ctrl;
    
                ctrl = this;
    
    
    Severity: Major
    Found in app/scripts/dashboardApp/widgets/spScmCommitWidget.directive.js - About 4 hrs to fix

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

      // Generated on 2013-10-05 using generator-angular 0.4.0
      'use strict';
      var LIVERELOAD_PORT = 35729;
      var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
      var mountFolder = function (connect, dir) {
      Severity: Minor
      Found in Gruntfile.js - About 4 hrs to fix

        Function controller has 76 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                controller: function ($scope, $log, Sweetp) {
                    var setBranchName, checkForRemoteBranch,
                        checkForCommitsAheadOfRemote, finish;
        
                    $scope.state = {
        Severity: Major
        Found in app/scripts/dashboardApp/widgets/spGitStatusWidget.directive.js - About 3 hrs to fix

          Function $get has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.$get = function($window, $log) {
                  var KeyboardShortcuts, lib;
          
                  lib = $window.keypress;
          
          
          Severity: Minor
          Found in app/scripts/keyboardShortcuts/keyboardShortcuts.service.js - About 1 hr to fix

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

                    createBasicNotification:function (optionsParam, cb) {
                        this.withConfig(function (err, config) {
                            var options, dismissDelay;
                            if (err) {
                                $log.error(err);
            Severity: Minor
            Found in app/scripts/dashboardApp/common/notifications.service.js - About 1 hr to fix

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

              module.exports = function(config) {
                config.set({
                  // base path, that will be used to resolve files and exclude
                  basePath: 'app/',
              
              
              Severity: Minor
              Found in karma.conf.js - About 1 hr to fix

                Function controller has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        controller: function ($scope, $log, Sweetp) {
                            var params, limit;
                
                            $scope.state = {
                                errors:null,

                  Function controller has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          controller: function ($scope, $log, Sweetp) {
                              $scope.state = {
                                  errors:null,
                                  stagingText:null
                              };

                    Function callService has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            callService:function (projectName, path, params, callback) {
                                var url, httpConfig;
                    
                                if (!projectName) {
                                    callback("Can't call service without project name!");
                    Severity: Minor
                    Found in app/scripts/dashboardApp/common/sweetp.service.js - About 1 hr to fix

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

                                          if (combo.on_keyup) {
                                              onKeyUp = combo.on_keyup;
                                              combo.on_keyup = function () {
                                                  onKeyUp();
                                                  scope.$apply();
                      Severity: Minor
                      Found in app/scripts/keyboardShortcuts/keyboardShortcuts.service.js and 1 other location - About 55 mins to fix
                      app/scripts/keyboardShortcuts/keyboardShortcuts.service.js on lines 63..69

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

                      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 (combo.on_keydown) {
                                              onKeyDown = combo.on_keydown;
                                              combo.on_keydown = function () {
                                                  onKeyDown();
                                                  scope.$apply();
                      Severity: Minor
                      Found in app/scripts/keyboardShortcuts/keyboardShortcuts.service.js and 1 other location - About 55 mins to fix
                      app/scripts/keyboardShortcuts/keyboardShortcuts.service.js on lines 71..77

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

                      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

                                      if (err) {
                                          $scope.state.errors = [
                                              err,
                                              "Service message: " + data.service
                                          ];
                      Severity: Minor
                      Found in app/scripts/dashboardApp/widgets/spGitStatusWidget.directive.js and 1 other location - About 55 mins to fix
                      app/scripts/dashboardApp/widgets/spGitStatusWidget.directive.js on lines 78..86

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

                      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

                                          if (err) {
                                              $scope.state.errors = [
                                                  err,
                                                  "Service message: " + data.service
                                              ];
                      Severity: Minor
                      Found in app/scripts/dashboardApp/widgets/spGitStatusWidget.directive.js and 1 other location - About 55 mins to fix
                      app/scripts/dashboardApp/widgets/spGitStatusWidget.directive.js on lines 23..31

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

                      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

                              s.callService('projectName', null, null, function (error, data, status) {
                                  expect(error).toContain("path");
                                  expect(data).toBeUndefined();
                                  expect(status).toBeUndefined();
                              });
                      Severity: Minor
                      Found in app/scripts/dashboardApp/common/sweetp.spec.js and 1 other location - About 50 mins to fix
                      app/scripts/dashboardApp/common/sweetp.spec.js on lines 137..141

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

                      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

                              s.loadProjects(function(err, loadedConfigs) {
                                  expect(err).toEqual(null);
                                  expect(loadedConfigs).toEqual(fakeConfigs);
                              });
                      Severity: Minor
                      Found in app/scripts/dashboardApp/common/sweetp.spec.js and 1 other location - About 50 mins to fix
                      app/scripts/dashboardApp/common/sweetp.spec.js on lines 63..66

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

                      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

                              s.callService(null, null, null, function (error, data, status) {
                                  expect(error).toContain("project name");
                                  expect(data).toBeUndefined();
                                  expect(status).toBeUndefined();
                              });
                      Severity: Minor
                      Found in app/scripts/dashboardApp/common/sweetp.spec.js and 1 other location - About 50 mins to fix
                      app/scripts/dashboardApp/common/sweetp.spec.js on lines 145..149

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

                      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

                              s.loadProjects(function(err, loadedConfigs) {
                                  expect(err).toEqual(null);
                                  expect(loadedConfigs).toEqual(fakeConfigs);
                              });
                      Severity: Minor
                      Found in app/scripts/dashboardApp/common/sweetp.spec.js and 1 other location - About 50 mins to fix
                      app/scripts/dashboardApp/common/sweetp.spec.js on lines 77..80

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

                      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 controller has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              controller: function ($scope, $log, Sweetp, Notifications, KeyboardShortcutsFromSettings) {
                      Severity: Minor
                      Found in app/scripts/dashboardApp/widgets/spScmCommitWidget.directive.js - About 35 mins to fix

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

                                            if (err) {
                                                $scope.state.errors = [
                                                    err,
                                                    "Service message: " + data.service
                                                ];
                        app/scripts/dashboardApp/widgets/spGitRecentCommitsWidget.directive.js on lines 29..35

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

                        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