pinclub/pinclub

View on GitHub

Showing 850 of 1,424 total issues

Function ToolImage has 163 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var ToolImage = function(){
        var self = this;
        this.$win = $([
            '<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editorToolImageTitle" aria-hidden="true">',
                '<div class="modal-dialog" role="document">',
Severity: Major
Found in public/libs/editor/ext.js - About 6 hrs to fix

    Function 5 has 156 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],5:[function(require,module,exports){
    // Utilities
    //
    'use strict';
    
    
    Severity: Major
    Found in public/libs/markdownit.js - About 6 hrs to fix

      Function createFromChrome has 154 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.createFromChrome = function (req, res, next) {
          req.checkBody({
              'media': {
                  notEmpty: {
                      options: [true],
      Severity: Major
      Found in controllers/image.js - About 6 hrs to fix

        File qrcode.js has 414 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * @fileoverview
         * - Using the 'QRCode for Javascript library'
         * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
         * - this library has no dependencies.
        Severity: Minor
        Found in public/libs/qrcode.js - About 5 hrs to fix

          File topic.js has 407 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * nodeclub - controllers/topic.js
           */
          
          /**
          Severity: Minor
          Found in controllers/topic.js - About 5 hrs to fix

            Function 18 has 144 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],18:[function(require,module,exports){
            /**
             * class Renderer
             *
             * Generates HTML from parsed token stream. Each instance has independent
            Severity: Major
            Found in public/libs/markdownit.js - About 5 hrs to fix

              Function ScrollMomentumClass2D has 140 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var ScrollMomentumClass2D = function (nc) {
                  var self = this;
                  this.nc = nc;
              
                  this.lastx = 0;
              Severity: Major
              Found in public/libs/jquery.nicescroll.js - About 5 hrs to fix

                Function inlineNormal has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function inlineNormal(stream, state) {
                    var style = state.text(stream, state);
                    if (typeof style !== 'undefined')
                      return style;
                
                
                Severity: Major
                Found in public/libs/editor/editor.js - About 5 hrs to fix

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

                  }( window, function factory( window, matchesSelector ) {
                  
                  
                  
                  var utils = {};
                  Severity: Major
                  Found in public/libs/masonry.pkgd.js - About 5 hrs to fix

                    Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      jQuery.Callbacks = function (options) {
                    
                        // Convert options from String-formatted to Object-formatted if needed
                        // (we check in cache first)
                        options = typeof options === "string" ?
                    Severity: Major
                    Found in public/libs/jquery-2.1.0.js - About 5 hrs to fix

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

                      }( window, function factory( Outlayer, getSize ) {
                      
                      
                      
                      // -------------------------- masonryDefinition -------------------------- //
                      Severity: Minor
                      Found in public/libs/masonry.pkgd.js - About 5 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

                      Consider simplifying this complex logical expression.
                      Open

                              if (event.pageX == null && original.clientX != null) {
                                eventDoc = event.target.ownerDocument || document;
                                doc = eventDoc.documentElement;
                                body = eventDoc.body;
                      
                      
                      Severity: Critical
                      Found in public/libs/jquery-2.1.0.js - About 5 hrs to fix

                        Function upload has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function upload (req, res, next) {
                            var isFileLimit = false;
                            var uploadResult;
                            var topicImage = {profile_source: 'upload'};
                            req.busboy.on('field', function(fieldname, value, fieldnameTruncated, valTruncated, encoding, mimetype) {
                        Severity: Major
                        Found in controllers/image.js - About 5 hrs to fix

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

                            pJS.fn.particle = function(color, opacity, position){
                          
                              /* size */
                              this.radius = (pJS.particles.size.random ? Math.random() : 1) * pJS.particles.size.value;
                              if(pJS.particles.size.anim.enable){
                          Severity: Major
                          Found in public/libs/particles/particles.js - About 4 hrs to fix

                            Function list has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            module.exports = function list(state, startLine, endLine, silent) {
                              var nextLine,
                                  indent,
                                  oldTShift,
                                  oldIndent,
                            Severity: Major
                            Found in public/libs/markdownit.js - About 4 hrs to fix

                              File jquery.tmpl.js has 365 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*!
                               * jQuery Templates Plugin
                               * http://github.com/jquery/jquery-tmpl
                               *
                               * Copyright Software Freedom Conservancy, Inc.
                              Severity: Minor
                              Found in public/libs/jquery.tmpl.js - About 4 hrs to fix

                                Function 34 has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{}],34:[function(require,module,exports){
                                // Replace link-like texts with link nodes.
                                //
                                // Currently restricted by `inline.validateLink()` to http/https/ftp
                                //
                                Severity: Major
                                Found in public/libs/markdownit.js - About 4 hrs to fix

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

                                  },{}],41:[function(require,module,exports){
                                  // Process *this* and _that_
                                  
                                  'use strict';
                                  
                                  
                                  Severity: Major
                                  Found in public/libs/markdownit.js - About 4 hrs to fix

                                    Function 19 has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"./common/utils":5}],19:[function(require,module,exports){
                                    /**
                                     * class Ruler
                                     *
                                     * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
                                    Severity: Major
                                    Found in public/libs/markdownit.js - About 4 hrs to fix

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

                                        function onMouseDown(e) {
                                          if (signalDOMEvent(this, e)) return;
                                          var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
                                          sel.shift = e.shiftKey;
                                      
                                      
                                      Severity: Major
                                      Found in public/libs/editor/editor.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language