fossasia/loklak_webclient

View on GitHub

Showing 566 of 915 total issues

File highlight.js has 7027 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!function(e) {
    "undefined" != typeof exports ? e(exports) : (window.hljs = e({}),
    "function" == typeof define && define.amd && define("hljs", [], function() {
        return window.hljs
    }
Severity: Major
Found in app/js/components/highlight.js - About 2 wks to fix

    File leaflet.js has 5216 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
     (c) 2010-2013, Vladimir Agafonkin
     (c) 2010-2011, CloudMade
    */
    Severity: Major
    Found in app/js/components/leaflet.js - About 2 wks to fix

      File hello.all.js has 3731 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! hellojs v1.12.0 | (c) 2012-2016 Andrew Dodson | MIT https://adodson.com/hello.js/LICENSE */
      // ES5 Object.create
      if (!Object.create) {
      
          // Shim, Object create
      Severity: Major
      Found in app/js/components/hello.all.js - About 1 wk to fix

        Function WallDisplay has a Cognitive Complexity of 195 (exceeds 5 allowed). Consider refactoring.
        Open

        function WallDisplay($scope, $stateParams, $interval, $timeout, $location, $http, $window, $resource, AppSettings, SearchService, StatisticsService, AppsService, Fullscreen) {
        
            var vm, flag, allStatuses, nextStatuses, term, count, searchParams, maxStatusCount;
            vm = this;
            vm.invalidId = false;
        Severity: Minor
        Found in app/js/controllers/wallDisplay.js - About 3 days 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 select.js has 1348 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         * ui-select
         * http://github.com/angular-ui/ui-select
         * Version: 0.12.1 - 2015-07-28T03:50:59.076Z
         * License: MIT
        Severity: Major
        Found in app/js/components/select.js - About 3 days to fix

          Function PhotoSwipeUI_Default has 640 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

           function(pswp, framework) {
          
              var ui = this;
              var _overlayUIUpdated = false,
                  _controlsVisible = true,
          Severity: Major
          Found in app/js/components/photoswipe-ui-default.js - About 3 days to fix

            File core.js has 857 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            (function(core) {
            
                var _ = require('underscore'),
                    request = require('request'),
                    urlLib = require('url');
            Severity: Major
            Found in iframely/lib/core.js - About 2 days to fix

              Function WallDisplay has 403 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function WallDisplay($scope, $stateParams, $interval, $timeout, $location, $http, $window, $resource, AppSettings, SearchService, StatisticsService, AppsService, Fullscreen) {
              
                  var vm, flag, allStatuses, nextStatuses, term, count, searchParams, maxStatusCount;
                  vm = this;
                  vm.invalidId = false;
              Severity: Major
              Found in app/js/controllers/wallDisplay.js - About 2 days to fix

                File marked.js has 824 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * marked - a markdown parser
                 * Copyright (c) 2011-2013, Christopher Jeffrey. (MIT Licensed)
                 * https://github.com/chjj/marked
                 */
                Severity: Major
                Found in app/js/components/marked.js - About 1 day to fix

                  Function datetimepickerDirective has 297 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      .directive('datetimepicker', ['$log', 'dateTimePickerConfig', function datetimepickerDirective($log, defaultConfig) {
                  
                        function DateObject() {
                  
                          var tempDate = new Date();
                  Severity: Major
                  Found in app/js/components/datetimepicker.js - About 1 day to fix

                    File photoswipe-ui-default.js has 655 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*! PhotoSwipe Default UI - 4.0.7 - 2015-03-18
                    * http://photoswipe.com
                    * Copyright (c) 2015 Dmitry Semenov; */
                    /**
                    *
                    Severity: Major
                    Found in app/js/components/photoswipe-ui-default.js - About 1 day to fix

                      Function post has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
                      Open

                          post: function(url, data, options, callback, callbackID, timeout) {
                      
                              var _this = this;
                              var error = _this.error;
                              var doc = document;
                      Severity: Minor
                      Found in app/js/components/hello.all.js - About 1 day 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

                      Function AdvancedSearchCtrl has 275 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function AdvancedSearchCtrl($http, $scope, $filter, $location, $stateParams, AppSettings, SearchService, MapPopUpTemplateService, MapCreationService) {
                      
                          var vm = this;
                          var map = false;
                          var prevZoomAction, prevPanAction, newZoomAction, newPanAction;
                      Severity: Major
                      Found in app/js/controllers/advanced-search.js - About 1 day to fix

                        Function link has 262 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            link: function(scope, element, attrs, ctrls) {
                        
                              var $select = ctrls[0];
                              var ngModel = scope.ngModel = ctrls[1];
                              var $selectMultiple = scope.$selectMultiple;
                        Severity: Major
                        Found in app/js/components/select.js - About 1 day to fix

                          Function onopentag has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
                          Open

                          HTMLMetaHandler.prototype.onopentag = function(name, attributes) {
                          
                              if (this._end) return;
                          
                              name = name.toUpperCase();
                          Severity: Minor
                          Found in iframely/lib/plugins/system/meta/HTMLMetaHandler.js - About 1 day 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

                          Function _finalMerge has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
                          Open

                          HTMLMetaHandler.prototype._finalMerge = function() {
                          
                              this._end = true;
                          
                              var that = this;
                          Severity: Minor
                          Found in iframely/lib/plugins/system/meta/HTMLMetaHandler.js - About 1 day 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

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

                          module.exports = function(app) {
                          
                              app.get('/iframely', function(req, res, next) {
                          
                                  var uri = prepareUri(req.query.uri || req.query.url);
                          Severity: Major
                          Found in iframely/modules/api/views.js - About 1 day to fix

                            File utils.js has 590 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            var events = require('events');
                            var request = require('request');
                            var zlib = require('zlib');
                            var iconv = require('iconv-lite');
                            var async = require('async');
                            Severity: Major
                            Found in iframely/lib/utils.js - About 1 day to fix

                              File iframely.js has 572 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              ;(function ( $ ) {
                              
                                  /*
                              
                                   Iframely consumer client lib.
                              Severity: Major
                              Found in iframely/static/js/iframely.js - About 1 day to fix

                                Function WallCtrl has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function WallCtrl($scope, $rootScope, $window, $timeout, AppsService, HelloService, SearchService) {
                                
                                    var vm = this;
                                    var term = '';
                                    var isEditing = -1;
                                Severity: Major
                                Found in app/js/controllers/wall.js - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language