diaspora/diaspora

View on GitHub

Showing 16 issues of 4,306 total

File posix-bracket-expressions.js has 883 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later

var PosixBracketExpressions = {
  // source: https://github.com/ruby/ruby/blob/ruby_2_4/enc/unicode/9.0.0/name2ctype.h#L3544
  word: "\\u0030-\\u0039" +
Severity: Major
Found in lib/assets/javascripts/posix-bracket-expressions.js - About 2 days to fix

    Class User has 63 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class User < ApplicationRecord
      include AuthenticationToken
      include Connecting
      include Querying
      include SocialActions
    Severity: Major
    Found in app/models/user.rb - About 1 day to fix

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

      function createUploader(){
         var aspectIds = gon.preloads.aspect_ids;
      
        new qq.FineUploaderBasic({
          element: document.getElementById("file-upload-publisher"),
      Severity: Major
      Found in app/assets/javascripts/mobile/mobile_file_uploader.js - About 3 hrs to fix

        Function initialize has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          initialize: function() {
            new qq.FineUploaderBasic({
              element: document.getElementById("file-upload"),
              validation: {
                allowedExtensions: ["jpg", "jpeg", "png"],
        Severity: Major
        Found in app/assets/javascripts/helpers/profile_photo_uploader.js - About 2 hrs to fix

          Function textFormatter has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            app.helpers.textFormatter = function(text, mentions) {
              mentions = mentions ? mentions : [];
          
              var md = window.markdownit({
                breaks:      true,
          Severity: Major
          Found in app/assets/javascripts/app/helpers/text_formatter.js - About 2 hrs to fix

            Function initSubviews has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              initSubviews: function() {
                this.mention = new app.views.PublisherMention({ el: this.$("#publisher-textarea-wrapper") });
                if(this.prefillMention) {
                  this.mention.prefillMention([this.prefillMention]);
                }
            Severity: Major
            Found in app/assets/javascripts/app/views/publisher_view.js - About 2 hrs to fix

              Avoid too many return statements within this function.
              Open

                              return true;
              Severity: Major
              Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return true;
                Severity: Major
                Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return true;
                  Severity: Major
                  Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return true;
                    Severity: Major
                    Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return true;
                      Severity: Major
                      Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return true;
                        Severity: Major
                        Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return true;
                          Severity: Major
                          Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return false;
                            Severity: Major
                            Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return true;
                              Severity: Major
                              Found in app/assets/javascripts/app/helpers/direction_detector.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return 0;
                                Severity: Major
                                Found in app/assets/javascripts/app/models/stream.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status