NLeSC/PattyVis

View on GitHub

Showing 91 of 91 total issues

Function exports has 397 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

    Function PointcloudService has 390 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function PointcloudService(THREE, Potree, $window, $rootScope,
        DrivemapService,
        SitesService, CameraService, SceneService,
        PathControls, SiteBoxService, MeasuringService, Messagebus) {
    
    
    Severity: Major
    Found in app/scripts/pointcloud/pointcloud.service.js - About 1 day to fix

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

            if (sitePointcloud) {
              sitePointcloud.material.clipMode = me.siteSettings.clipMode;
              sitePointcloud.material.size = me.siteSettings.pointSize;
              sitePointcloud.visiblePointsTarget = me.siteSettings.pointCountTarget * 1000 * 1000;
              sitePointcloud.material.opacity = me.siteSettings.opacity;
      Severity: Major
      Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 1 day to fix
      app/scripts/pointcloud/pointcloud.service.js on lines 489..505

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

      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 (pointcloud) {
              pointcloud.material.clipMode = me.settings.clipMode;
              pointcloud.material.size = me.settings.pointSize;
              pointcloud.visiblePointsTarget = me.settings.pointCountTarget * 1000 * 1000;
              pointcloud.material.opacity = me.settings.opacity;
      Severity: Major
      Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 1 day to fix
      app/scripts/pointcloud/pointcloud.service.js on lines 507..522

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

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

        function SiteBoxService(THREE, SitesService, CameraService, SceneService, Messagebus) {
          var me = this;
      
          var raycaster = new THREE.Raycaster();
          raycaster.params = {
      Severity: Major
      Found in app/scripts/pointcloud/site-box.service.js - About 1 day to fix

        Function MinimapController has 195 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function MinimapController(ol, proj4, SitesService, CamFrustumService, Messagebus, DrivemapService) {
            var me = this;
        
            var olProjectionCode = 'EPSG:3857';
            var siteProjectionCode = null;
        Severity: Major
        Found in app/scripts/minimap/minimap.controller.js - About 7 hrs to fix

          Function SitesService has 171 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function SitesService($http, $q, $rootScope, pattyConf, Messagebus) {
          
              function onLoad(data) {
                service.all = data;
                service.filtered = data;
          Severity: Major
          Found in app/scripts/core/sites.service.js - About 6 hrs to fix

            Function MeasuringService has 159 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function MeasuringService($rootScope, Potree, THREE, $window) {
                this.tools = {
                  distance: null,
                  angle: null,
                  area: null,
            Severity: Major
            Found in app/scripts/measuring/measuring.service.js - About 6 hrs to fix

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

              // Generated on 2015-01-07 using generator-angular 0.10.0
              'use strict';
              
              // # Globbing
              // for performance reasons we're only matching one level down:
              Severity: Minor
              Found in Gruntfile.js - About 5 hrs to fix

                File pointcloud.service.js has 400 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* global requestAnimationFrame:false */
                (function() {
                  'use strict';
                
                  function PointcloudService(THREE, Potree, $window, $rootScope,
                Severity: Minor
                Found in app/scripts/pointcloud/pointcloud.service.js - About 5 hrs to fix

                  Function MeasuringController has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function MeasuringController(MeasuringService) {
                      this.showToolboxTray = false;
                      this.showTransformationToolboxTray = false;
                  
                      this.distanceActive = false;
                  Severity: Major
                  Found in app/scripts/measuring/measuring.controller.js - About 4 hrs to fix

                    File path.controls.js has 371 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     *  PathControls
                     *  by Ben van Werkhoven (Netherlands eScience Center)
                     *
                     *  free look around with mouse drag
                    Severity: Minor
                    Found in app/scripts/pointcloud/path.controls.js - About 4 hrs to fix

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

                                  if (query.toLowerCase().indexOf('condition:') !== -1) {
                                    var conditionSearches = queryLowCase.split('condition:').slice(1);
                                    conditionMatched = conditionSearches.some(function(conditionSearch) {
                                      var taggedWord = conditionSearch.trim().split(' ')[0];
                                      return allConditionText.toLowerCase().indexOf(taggedWord) !== -1;
                      Severity: Major
                      Found in app/scripts/core/sites.service.js and 1 other location - About 4 hrs to fix
                      app/scripts/core/sites.service.js on lines 264..270

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

                      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 (query.toLowerCase().indexOf('material:') !== -1) {
                                    var materialSearches = queryLowCase.split('material:').slice(1);
                                    materialMatched = materialSearches.some(function(materialSearch) {
                                      var taggedWord = materialSearch.trim().split(' ')[0];
                                      return allMaterialText.toLowerCase().indexOf(taggedWord) !== -1;
                      Severity: Major
                      Found in app/scripts/core/sites.service.js and 1 other location - About 4 hrs to fix
                      app/scripts/core/sites.service.js on lines 273..279

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

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

                        function SearchPanelController(SitesService, PointcloudService, NexusService, Messagebus) {
                          this.pageSize = 2;
                          this.currentPage = 1;
                          this.SitesService = SitesService;
                          this.Messagebus = Messagebus;
                      Severity: Major
                      Found in app/scripts/searchbox/searchbox.controller.js - About 3 hrs to fix

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

                          describe('click on settings gear', function() {
                            beforeEach(function() {
                              element(by.css('.icon-big.gear-icon')).click();
                            });
                        
                        
                        Severity: Major
                        Found in e2e/scenario.js and 1 other location - About 3 hrs to fix
                        e2e/scenario.js on lines 69..78

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

                        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

                          describe('click on help icon', function() {
                            beforeEach(function() {
                              element(by.css('.icon-big.help-icon')).click();
                            });
                        
                        
                        Severity: Major
                        Found in e2e/scenario.js and 1 other location - About 3 hrs to fix
                        e2e/scenario.js on lines 58..67

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

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

                              set: function(query) {
                                if (this._query === query) {
                                  return;
                                }
                                this._query = query;
                        Severity: Major
                        Found in app/scripts/core/sites.service.js - About 2 hrs to fix

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

                                sitePc: {
                                  get: function() {
                                    return this._sitePc;
                                  },
                                  set: function(bool) {
                          Severity: Major
                          Found in app/scripts/searchbox/searchbox.controller.js and 1 other location - About 2 hrs to fix
                          app/scripts/searchbox/searchbox.controller.js on lines 63..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 87.

                          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

                                siteMesh: {
                                  get: function() {
                                    return this._siteMesh;
                                  },
                                  set: function(bool) {
                          Severity: Major
                          Found in app/scripts/searchbox/searchbox.controller.js and 1 other location - About 2 hrs to fix
                          app/scripts/searchbox/searchbox.controller.js on lines 34..48

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

                          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