NLeSC/ahn-pointcloud-viewer

View on GitHub

Showing 154 of 154 total issues

Function HighQualityRenderer has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var HighQualityRenderer = function() {

      var depthMaterial = null;
      var attributeMaterial = null;
      var normalizationMaterial = null;
Severity: Major
Found in app/scripts/pointcloud/pointcloud.service.js - About 5 hrs to fix

    Function MinimapExtractionSelectionService has 127 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function MinimapExtractionSelectionService(ExtractionSelectionService, ol, Messagebus) {
        this.source = new ol.source.Vector({
          wrapX: false
        });
    
    
    Severity: Major
    Found in app/scripts/extract/minimap.extraction.selection.service.js - About 5 hrs to fix

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

        function MinimapController(ol, proj4, CamFrustumService, Messagebus, MinimapExtractionSelectionService) {
          proj4.defs('EPSG:28992','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs');
      
          var projection = ol.proj.get('EPSG:28992');
          var projectionExtent = [-285401.92,22598.08,595401.9199999999,903401.9199999999];
      Severity: Major
      Found in app/scripts/minimap/minimap.controller.js - About 4 hrs to fix

        Function CameraService has 118 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function CameraService($rootScope, $window, $log, $location, THREE, Messagebus, SceneService) {
            var me = this;
            var fov = 75;
            var width = $window.innerWidth;
            var height = $window.innerHeight;
        Severity: Major
        Found in app/scripts/pointcloud/camera.service.js - About 4 hrs to fix

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

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

            Function Measure has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

            Potree.Measure = function(){
                var scope = this;
            
                THREE.Object3D.call( this );
            
            
            Severity: Minor
            Found in app/scripts/utils/MeasuringTool.js - About 4 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            File path.controls.js has 341 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

              Function EDLRenderer has 91 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var EDLRenderer = function() {
              
                    var edlMaterial = null;
                    var attributeMaterial = null;
              
              
              Severity: Major
              Found in app/scripts/pointcloud/pointcloud.service.js - About 3 hrs to fix

                Function PointcloudExtractionSelectionService has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function PointcloudExtractionSelectionService(THREE, SceneService, ExtractionSelectionService, ExtractionDrawingService, Messagebus, Potree) {
                    var me = this;
                
                    this.selectionActive = false;
                    this.mouseDownPoint = null;
                Severity: Major
                Found in app/scripts/extract/pointcloud.extraction.selection.service.js - About 3 hrs to fix

                  Function BigLegendController has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function BigLegendController($scope, DecimalAdjust, Messagebus, UserAgent, PointcloudService) {
                      this.PointcloudService = PointcloudService;
                  
                      this.mobile = UserAgent.mobile;
                  
                  
                  Severity: Major
                  Found in app/scripts/biglegend/biglegend.controller.js - About 3 hrs to fix

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

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

                    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 59..68

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

                      function ExtractionSelectionService(Messagebus, debounce) {
                        this._active = false;
                    
                        this._left = 93720.22;
                        this._bottom = 436899.97;
                    Severity: Major
                    Found in app/scripts/extract/extraction.selection.service.js - About 3 hrs to fix

                      Function ExtractionDrawingService has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function ExtractionDrawingService(THREE, SceneService, Messagebus) {
                          this.color = new THREE.Color(0xffffff);
                      
                          this.renderer = null;
                          this.scene = null;
                      Severity: Major
                      Found in app/scripts/extract/pointcloud.extraction.drawing.service.js - About 3 hrs to fix

                        Function render has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              this.render = function(renderer) {
                        
                                var width = me.elRenderArea.clientWidth;
                                var height = me.elRenderArea.clientHeight;
                        
                        
                        Severity: Major
                        Found in app/scripts/pointcloud/pointcloud.service.js - About 3 hrs to fix

                          Function update2DFrustum has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.update2DFrustum = function() {
                                rightBottomCorner = rightBottomCorner.set(1, -1, 1).unproject(this.camera).normalize();
                                leftBottomCorner = leftBottomCorner.set(-1, -1, 1).unproject(this.camera).normalize();
                          
                                leftTopCorner = leftTopCorner.set(-1, 1, 1).unproject(this.camera).normalize();
                          Severity: Major
                          Found in app/scripts/pointcloud/camera.service.js - About 2 hrs to fix

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

                                this.toggleTranslate = function() {
                                  this.measuringService.activeTransformationTool = this.measuringService.transformationTools.TRANSLATE;
                                  this.resetState();
                                  this.showTransformationToolboxTray = true;
                                  this.measuringService.tools.transformation.translate();
                            Severity: Major
                            Found in app/scripts/measuring/measuring.controller.js and 2 other locations - About 2 hrs to fix
                            app/scripts/measuring/measuring.controller.js on lines 120..125
                            app/scripts/measuring/measuring.controller.js on lines 134..139

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

                            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

                                this.toggleRotate = function() {
                                  this.measuringService.activeTransformationTool = this.measuringService.transformationTools.ROTATE;
                                  this.resetState();
                                  this.showTransformationToolboxTray = true;
                                  this.measuringService.tools.transformation.rotate();
                            Severity: Major
                            Found in app/scripts/measuring/measuring.controller.js and 2 other locations - About 2 hrs to fix
                            app/scripts/measuring/measuring.controller.js on lines 127..132
                            app/scripts/measuring/measuring.controller.js on lines 134..139

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

                            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

                                this.toggleScale = function() {
                                  this.measuringService.activeTransformationTool = this.measuringService.transformationTools.SCALE;
                                  this.resetState();
                                  this.showTransformationToolboxTray = true;
                                  this.measuringService.tools.transformation.scale();
                            Severity: Major
                            Found in app/scripts/measuring/measuring.controller.js and 2 other locations - About 2 hrs to fix
                            app/scripts/measuring/measuring.controller.js on lines 120..125
                            app/scripts/measuring/measuring.controller.js on lines 127..132

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

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

                                this.update = function(){
                                var i, point, msg;
                            
                                    if (this.points.length === 0){
                                        return;
                            Severity: Major
                            Found in app/scripts/utils/MeasuringTool.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language