pinclub/pinclub

View on GitHub

Showing 850 of 1,424 total issues

Function _doSend has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            _doSend: function (block) {
                var me = this,
                    owner = me.owner,
                    opts = me.options,
                    file = block.file,
Severity: Major
Found in public/libs/webuploader/webuploader.withoutimage.js - About 3 hrs to fix

    Function verifyTwoFactor has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.verifyTwoFactor = function (req, res, next) {
        req.checkBody({
            'name': {
                notEmpty: {
                    options: [true],
    Severity: Major
    Found in api/v2/auth.js - About 3 hrs to fix

      Function create has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.create = function (req, res, next) {
          req.checkBody({
              'title': {
                  notEmpty: {
                      options: [true],
      Severity: Major
      Found in controllers/forum.js - About 3 hrs to fix

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

        exports.index = function (req, res, next) {
            var user_name = req.params.name;
            var currentUser = req.session.user;
            User.getUserByLoginName(user_name, function (err, user) {
                if (err) {
        Severity: Major
        Found in controllers/user.js - About 3 hrs to fix

          Function linkify has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function linkify(state) {
            var i, j, l, tokens, token, text, nodes, ln, pos, level, htmlLinkLevel,
                blockTokens = state.tokens,
                linkifier = null, links, autolinker;
          
          
          Severity: Major
          Found in public/libs/markdownit.js - About 3 hrs to fix

            Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function Sizzle(selector, context, results, seed) {
                    var match, elem, m, nodeType,
                    // QSA vars
                      i, groups, old, nid, newContext, newSelector;
            
            
            Severity: Major
            Found in public/libs/jquery-2.1.0.js - About 3 hrs to fix

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

                Search.prototype.bind = function (decorated, container, $container) {
                  var self = this;
              
                  decorated.call(this, container, $container);
              
              
              Severity: Major
              Found in public/libs/select2/js/select2.js - About 3 hrs to fix

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

                  Search.prototype.bind = function (decorated, container, $container) {
                    var self = this;
                
                    decorated.call(this, container, $container);
                
                
                Severity: Major
                Found in public/libs/select2/js/select2.full.js - About 3 hrs to fix

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

                    pJS.fn.particle.prototype.draw = function() {
                  
                      var p = this;
                  
                      if(p.radius_bubble != undefined){
                  Severity: Major
                  Found in public/libs/particles/particles.js - About 3 hrs to fix

                    Function onkeypress has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            self.onkeypress = function (e) {
                              if (self.railslocked && self.page.maxh === 0) return true;
                    
                              e = e || _win.event;
                              var tg = self.getTarget(e);
                    Severity: Major
                    Found in public/libs/jquery.nicescroll.js - About 2 hrs to fix

                      Function 49 has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],49:[function(require,module,exports){
                      'use strict';
                      
                      
                      // parse sequence of markers,
                      Severity: Major
                      Found in public/libs/markdownit.js - About 2 hrs to fix

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

                        exports.index = function (req, res, next) {
                            function isUped(user, reply) {
                                if (!reply.ups) {
                                    return false;
                                }
                        Severity: Major
                        Found in controllers/topic.js - About 2 hrs to fix

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

                          }( window, function factory( window, jQuery ) {
                          'use strict';
                          
                          // ----- utils ----- //
                          
                          
                          Severity: Minor
                          Found in public/libs/masonry.pkgd.js - About 2 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 smartquotes has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function smartquotes(state) {
                            /*eslint max-depth:0*/
                            var i, token, text, t, pos, max, thisLevel, lastSpace, nextSpace, item,
                                canOpen, canClose, j, isSingle, blkIdx, tokens,
                                stack;
                          Severity: Major
                          Found in public/libs/markdownit.js - About 2 hrs to fix

                            Function create has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            exports.create = function (req, res, next) {
                                var profile = req.session.profile;
                            
                                var isnew = req.body.isnew;
                                var loginname = validator.trim(req.body.name || '').toLowerCase();
                            Severity: Major
                            Found in controllers/github.js - About 2 hrs to fix

                              Function signup has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              exports.signup = function (req, res, next) {
                                  var loginname = validator.trim(req.body.loginname).toLowerCase();
                                  var email = validator.trim(req.body.email).toLowerCase();
                                  var pass = validator.trim(req.body.pass);
                                  var rePass = validator.trim(req.body.re_pass);
                              Severity: Major
                              Found in controllers/sign.js - About 2 hrs to fix

                                Function like has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                exports.like = function (req, res, next) {
                                    if (!req.body.id) {
                                        return res.status(500).send({success: false, error_msg: "必要参数id未传."});
                                    }
                                
                                
                                Severity: Major
                                Found in api/v2/image.js - About 2 hrs to fix

                                  Function updateDisplayInner has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function updateDisplayInner(cm, changes, visible, forced) {
                                      var display = cm.display, doc = cm.doc;
                                      if (!display.wrapper.clientWidth) {
                                        display.showingFrom = display.showingTo = doc.first;
                                        display.viewOffset = 0;
                                  Severity: Major
                                  Found in public/libs/editor/editor.js - About 2 hrs to fix

                                    Function handler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function handler(event) {
                                            var orgEvent   = event || window.event,
                                                args       = slice.call(arguments, 1),
                                                delta      = 0,
                                                deltaX     = 0,
                                    Severity: Major
                                    Found in public/libs/select2/js/select2.full.js - About 2 hrs to fix

                                      Function emphasis has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports = function emphasis(state, silent) {
                                        var startCount,
                                            count,
                                            found,
                                            oldCount,
                                      Severity: Major
                                      Found in public/libs/markdownit.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language