kwk/docker-registry-frontend

View on GitHub

Showing 18 of 18 total issues

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

module.exports = function (grunt) {

  // Load grunt tasks automatically
  require('load-grunt-tasks')(grunt);

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

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

      it('/repositories/20 should display repository list page', function() {
        $httpBackend.expectGET('repository/repository-list.html').respond(200);
        $location.path('/repositories/20');
        $rootScope.$digest();
        expect($route.current.templateUrl).toBe('repository/repository-list.html');
    Severity: Major
    Found in app/app.spec.js and 1 other location - About 5 hrs to fix
    app/app.spec.js on lines 45..54

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

    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('/repositories/10 should display repository list page', function() {
        $httpBackend.expectGET('repository/repository-list.html').respond(200);
        $location.path('/repositories/10');
        $rootScope.$digest();
        expect($route.current.templateUrl).toBe('repository/repository-list.html');
    Severity: Major
    Found in app/app.spec.js and 1 other location - About 5 hrs to fix
    app/app.spec.js on lines 56..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 140.

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

    // Generated on 2014-09-12 using generator-angular 0.9.8
    'use strict';
    
    // # Globbing
    // for performance reasons we're only matching one level down:
    Severity: Minor
    Found in Gruntfile.js - About 3 hrs to fix

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

        it('/unknown-url should display home page', function() {
          $httpBackend.expectGET('home.html').respond(200);
          $location.path('/unknown-url');
          $rootScope.$digest();
          expect($route.current.templateUrl).toBe('home.html');
      Severity: Major
      Found in app/app.spec.js and 4 other locations - About 3 hrs to fix
      app/app.spec.js on lines 95..101
      app/app.spec.js on lines 138..144
      app/app.spec.js on lines 146..152
      app/app.spec.js on lines 154..160

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

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

        it('/image/88e37c7099fa/tag should display create tag page', function() {
          $httpBackend.expectGET('tag/create-tag.html').respond(200);
          $location.path('/image/88e37c7099fa/tag');
          $rootScope.$digest();
          expect($route.current.templateUrl).toBe('tag/create-tag.html');
      Severity: Major
      Found in app/app.spec.js and 4 other locations - About 3 hrs to fix
      app/app.spec.js on lines 95..101
      app/app.spec.js on lines 138..144
      app/app.spec.js on lines 146..152
      app/app.spec.js on lines 162..168

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

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

        it('URL with repositoryName but no repositoryUser and no tagsPerPage should display repository detail page', function() {
          $httpBackend.expectGET('repository/repository-detail.html').respond(200);
          $location.path('/repository/cx');
          $rootScope.$digest();
          expect($route.current.templateUrl).toBe('repository/repository-detail.html');
      Severity: Major
      Found in app/app.spec.js and 4 other locations - About 3 hrs to fix
      app/app.spec.js on lines 138..144
      app/app.spec.js on lines 146..152
      app/app.spec.js on lines 154..160
      app/app.spec.js on lines 162..168

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

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

        it('/image/88e37c7099fa should display image detail page', function() {
          $httpBackend.expectGET('tag/image-detail.html').respond(200);
          $location.path('/image/88e37c7099fa');
          $rootScope.$digest();
          expect($route.current.templateUrl).toBe('tag/image-detail.html');
      Severity: Major
      Found in app/app.spec.js and 4 other locations - About 3 hrs to fix
      app/app.spec.js on lines 95..101
      app/app.spec.js on lines 138..144
      app/app.spec.js on lines 154..160
      app/app.spec.js on lines 162..168

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

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

        it('/tag/repositoryName/latest should display tag detail page', function() {
          $httpBackend.expectGET('tag/tag-detail.html').respond(200);
          $location.path('/tag/repositoryName/latest');
          $rootScope.$digest();
          expect($route.current.templateUrl).toBe('tag/tag-detail.html');
      Severity: Major
      Found in app/app.spec.js and 4 other locations - About 3 hrs to fix
      app/app.spec.js on lines 95..101
      app/app.spec.js on lines 146..152
      app/app.spec.js on lines 154..160
      app/app.spec.js on lines 162..168

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

      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

          $scope.openConfirmTagDeletionDialog = function(size) {
            var modalInstance = $modal.open({
                animation: true,
                templateUrl: 'modalConfirmDeleteItems.html',
                controller: 'DeleteTagsController',
      Severity: Major
      Found in app/tag/tag-controller.js and 2 other locations - About 2 hrs to fix
      app/repository/repository-detail-controller.js on lines 50..71
      app/repository/repository-list-controller.js on lines 60..81

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

      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

          $scope.openConfirmRepoDeletionDialog = function(size) {
            var modalInstance = $modal.open({
                animation: true,
                templateUrl: 'modalConfirmDeleteItems.html',
                controller: 'DeleteRepositoryController',
      Severity: Major
      Found in app/repository/repository-detail-controller.js and 2 other locations - About 2 hrs to fix
      app/repository/repository-list-controller.js on lines 60..81
      app/tag/tag-controller.js on lines 86..106

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

      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

          $scope.openConfirmRepoDeletionDialog = function(size) {
            var modalInstance = $modal.open({
                animation: true,
                templateUrl: 'modalConfirmDeleteItems.html',
                controller: 'DeleteRepositoryController',
      Severity: Major
      Found in app/repository/repository-list-controller.js and 2 other locations - About 2 hrs to fix
      app/repository/repository-detail-controller.js on lines 50..71
      app/tag/tag-controller.js on lines 86..106

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

      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

              Repository.delete(repo,
                // success
                function(value, responseHeaders) {
                  toastr.success('Deleted repository: ' + repoStr);
                },
      Severity: Major
      Found in app/repository/delete-repository-controller.js and 1 other location - About 1 hr to fix
      app/tag/delete-tags-controller.js on lines 36..45

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

      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

              Tag.delete(tag,
                // success
                function(value, responseHeaders) {
                  toastr.success('Deleted tag: ' + tagStr);
                },
      Severity: Major
      Found in app/tag/delete-tags-controller.js and 1 other location - About 1 hr to fix
      app/repository/delete-repository-controller.js on lines 28..37

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

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

              transformResponse: function(data, headers){
                var repos = angular.fromJson(data).repositories;
      
                // Extract the "last=" part from Link header:
                //
      Severity: Minor
      Found in app/services/registry-services.js - About 1 hr to fix

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

                transformResponse: function(data, headers){
                  var res = {};
                  var history = [];
                  var tmp;
                  var resp = angular.fromJson(data);
        Severity: Minor
        Found in app/services/registry-services.js - About 1 hr to fix

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

          angular.module('image-details-directive', [])
            .directive('imageDetails', function(){
              return {
                restrict: 'E',
                templateUrl: 'image/image-details-directive.html',
          Severity: Minor
          Found in app/image/image-details-directive.js and 1 other location - About 35 mins to fix
          app/tag/tag-list-directive.js on lines 3..10

          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

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

          angular.module('tag-list-directive', [])
            .directive('tagList', function(){
              return {
                restrict: 'E',
                templateUrl: 'tag/tag-list-directive.html',
          Severity: Minor
          Found in app/tag/tag-list-directive.js and 1 other location - About 35 mins to fix
          app/image/image-details-directive.js on lines 3..10

          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