pinclub/pinclub

View on GitHub

Showing 850 of 1,424 total issues

Function ontouchmove has 115 lines of code (exceeds 25 allowed). Consider refactoring.
Open

          self.ontouchmove = function (e, byiframe) {

            if (!self.rail.drag) return true;

            if (e.targetTouches && opt.preventmultitouchscrolling) {
Severity: Major
Found in public/libs/jquery.nicescroll.js - About 4 hrs to fix

    Function factory has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    })( window, function factory() {
    'use strict';
    
    // -------------------------- helpers -------------------------- //
    
    
    Severity: Minor
    Found in public/libs/masonry.pkgd.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

    Function factory has 114 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    })( window, function factory() {
    'use strict';
    
    // -------------------------- helpers -------------------------- //
    
    
    Severity: Major
    Found in public/libs/masonry.pkgd.js - About 4 hrs to fix

      File board.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var _ = require('lodash');
      var Board = require('../proxy').Board;
      var BoardCollect = require('../proxy').BoardCollect;
      var Topic = require('../proxy').Topic;
      var User = require('../proxy').User;
      Severity: Minor
      Found in controllers/board.js - About 4 hrs to fix

        Function baseIsEqual has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
              // used to indicate that when comparing objects, `a` has at least the properties of `b`
              if (callback) {
                var result = callback(a, b);
                if (typeof result != 'undefined') {
        Severity: Major
        Found in public/libs/lodash.compat.js - About 4 hrs to fix

          Function factory has 112 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          }( window, function factory( Outlayer, getSize ) {
          
          
          
          // -------------------------- masonryDefinition -------------------------- //
          Severity: Major
          Found in public/libs/masonry.pkgd.js - About 4 hrs to fix

            File prettify.js has 353 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var q = null;
            window.PR_SHOULD_USE_CONTINUATION = !0;
            (function () {
              function L(a) {
                function m(a) {
            Severity: Minor
            Found in public/libs/code-prettify/prettify.js - About 4 hrs to fix

              Function index has 109 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              exports.index = function (req, res, next) {
                  var page = parseInt(req.query.page, 10) || 1;
                  page = page > 0 ? page : 1;
                  var tab = req.query.tab;
                  var forum = req.query.forum;
              Severity: Major
              Found in controllers/site.js - About 4 hrs to fix

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

                },{}],29:[function(require,module,exports){
                'use strict';
                
                
                var parseLinkDestination = require('../helpers/parse_link_destination');
                Severity: Major
                Found in public/libs/markdownit.js - About 4 hrs to fix

                  Function 45 has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"../common/html_re":3}],45:[function(require,module,exports){
                  // Process ![image](<src> "title")
                  
                  'use strict';
                  
                  
                  Severity: Major
                  Found in public/libs/markdownit.js - About 4 hrs to fix

                    File image.js has 338 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    var _ = require('lodash');
                    var TopicProxy = require('../../proxy').Topic;
                    var TopicLike = require('../../proxy').TopicLike;
                    var TopicBoard = require('../../proxy').TopicBoard;
                    var BoardProxy = require('../../proxy').Board;
                    Severity: Minor
                    Found in api/v2/image.js - About 4 hrs to fix

                      Function 11 has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{"../common/utils":5}],11:[function(require,module,exports){
                      // Main perser class
                      
                      'use strict';
                      
                      
                      Severity: Major
                      Found in public/libs/markdownit.js - About 4 hrs to fix

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

                        },{}],31:[function(require,module,exports){
                        // GFM table, non-standard
                        
                        'use strict';
                        
                        
                        Severity: Major
                        Found in public/libs/markdownit.js - About 4 hrs to fix

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

                          },{"../helpers/normalize_reference":7,"../helpers/parse_link_destination":8,"../helpers/parse_link_title":10}],30:[function(require,module,exports){
                          // Parser state class
                          
                          'use strict';
                          
                          
                          Severity: Major
                          Found in public/libs/markdownit.js - About 4 hrs to fix

                            Function reference has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function reference(state, startLine, _endLine, silent) {
                              var ch,
                                  destEndPos,
                                  destEndLineNo,
                                  endLine,
                            Severity: Major
                            Found in public/libs/markdownit.js - About 3 hrs to fix

                              File ext.js has 331 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              (function(Editor, markdownit, WebUploader){
                              
                                  function _replaceSelection(cm, active, start, end) {
                                      var text;
                                      var startPoint = cm.getCursor('start');
                              Severity: Minor
                              Found in public/libs/editor/ext.js - About 3 hrs to fix

                                Function index has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                var index = function (req, res, next) {
                                    var type = req.query.type || 'text';
                                    var page = parseInt(req.query.page, 10) || 1;
                                    page = page > 0 ? page : 1;
                                    var forum = req.query.forum;
                                Severity: Major
                                Found in api/v2/topic.js - About 3 hrs to fix

                                  Function factory has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  }( window, function factory( window, matchesSelector ) {
                                  
                                  
                                  
                                  var utils = {};
                                  Severity: Minor
                                  Found in public/libs/masonry.pkgd.js - About 3 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

                                  Function defaultPrefilter has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function defaultPrefilter(elem, props, opts) {
                                      /* jshint validthis: true */
                                      var prop, value, toggle, tween, hooks, oldfire, display,
                                        anim = this,
                                        orig = {},
                                  Severity: Major
                                  Found in public/libs/jquery-2.1.0.js - About 3 hrs to fix

                                    Function image has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = function image(state, silent) {
                                      var code,
                                          href,
                                          label,
                                          labelEnd,
                                    Severity: Major
                                    Found in public/libs/markdownit.js - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language