NodeBB/NodeBB

View on GitHub

Showing 487 of 503 total issues

Avoid too many return statements within this function.
Open

    return true;
Severity: Major
Found in src/routes/feeds.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return next();
    Severity: Major
    Found in src/controllers/accounts/chats.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return helpers.redirect(res, validator.unescape(categoryFields.link));
      Severity: Major
      Found in src/controllers/category.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return next(new Error('[[error:invalid-login-credentials]]'));
        Severity: Major
        Found in src/controllers/authentication.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return res.render('chats', {
                      rooms: recentChats.rooms,
                      uid: uid,
                      userslug: req.params.userslug,
                      nextStart: recentChats.nextStart,
          Severity: Major
          Found in src/controllers/accounts/chats.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return helpers.redirect(res, `/topic/${tid}/${req.params.slug}${postIndex > topicData.postcount ? `/${topicData.postcount}` : ''}${generateQueryString(req.query)}`);
            Severity: Major
            Found in src/controllers/topics.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return next();
              Severity: Major
              Found in src/controllers/groups.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return helpers.redirect(res, 'admin/manage/admins-mods');
                Severity: Major
                Found in src/controllers/admin.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return next();
                  Severity: Major
                  Found in src/controllers/category.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return 'hash';
                    Severity: Major
                    Found in src/database/mongo/main.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return helpers.redirect(res, 'admin/manage/groups');
                      Severity: Major
                      Found in src/controllers/admin.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return next();
                        Severity: Major
                        Found in src/controllers/category.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return 'string';
                          Severity: Major
                          Found in src/database/mongo/main.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return helpers.formatApiResponse(403, res, new Error(`[[error:invite-maximum-met, ${invites}, ${max}]]`));
                            Severity: Major
                            Found in src/controllers/write/users.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return next(new Error('[[error:local-login-disabled]]'));
                              Severity: Major
                              Found in src/controllers/authentication.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return helpers.redirect(res, 'admin/settings/general');
                                Severity: Major
                                Found in src/controllers/admin.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return helpers.notAllowed(req, res);
                                  Severity: Major
                                  Found in src/controllers/admin.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                            return helpers.redirect(res, `/category/${categoryData.slug}/${categoryData.topic_count}?${qs.stringify(req.query)}`);
                                    Severity: Major
                                    Found in src/controllers/category.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return helpers.formatApiResponse(403, res, new Error('[[error:no-privileges]]'));
                                      Severity: Major
                                      Found in src/controllers/write/users.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return helpers.formatApiResponse(200, res);
                                        Severity: Major
                                        Found in src/controllers/write/users.js - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language