glitch-soc/mastodon

View on GitHub

Showing 1,278 of 4,906 total issues

Method initialize has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def initialize(prefix, operator, term, options = {})
      @prefix = prefix
      @negated = operator == '-'
      @options = options
      @operator = :filter
Severity: Minor
Found in app/lib/search_query_transformer.rb - About 1 hr to fix

    Method call has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def call(row)
        @account = row.bulk_import.account
        @data    = row.data
        @type    = row.bulk_import.type.to_sym
    
    
    Severity: Minor
    Found in app/services/bulk_import_row_service.rb - About 1 hr to fix

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

        getTicks (count, size, radius, scaleCoefficient) {
          const ticks = this.getTickPoints(count);
          const lesser = 200;
          const m = [];
          const bufferLength = this.analyser ? this.analyser.frequencyBinCount : 0;
      Severity: Minor
      Found in app/javascript/flavours/glitch/features/audio/visualizer.js - About 1 hr to fix

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

        const stringFromCodePoint = _String.fromCodePoint || function () {
          let MAX_SIZE = 0x4000;
          let codeUnits = [];
          let highSurrogate;
          let lowSurrogate;
        Severity: Minor
        Found in app/javascript/flavours/glitch/features/emoji/emoji_utils.js - About 1 hr to fix

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

            render () {
              const { loading, data } = this.state;
          
              return (
                <div className='dimension'>
          Severity: Minor
          Found in app/javascript/flavours/glitch/components/admin/ImpactReport.jsx - About 1 hr to fix

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

                const searchValue = (value) => {
                  let aPool = pool,
                    aIndex = index,
                    length = 0;
            
            

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

                render () {
                  const { limit } = this.props;
                  const { loading, data } = this.state;
              
                  let content;
              Severity: Minor
              Found in app/javascript/flavours/glitch/components/admin/Trends.jsx - About 1 hr to fix

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

                  render () {
                    const { value, intl, frequentlyUsedLanguages } = this.props;
                    const { open, placement } = this.state;
                    const current = preloadedLanguages.find(lang => lang[0] === value) ?? [];
                
                

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

                      const searchValue = (value) => {
                        let aPool = pool,
                          aIndex = index,
                          length = 0;
                  
                  
                  Severity: Minor
                  Found in app/javascript/mastodon/features/emoji/emoji_mart_search_light.js - About 1 hr to fix

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

                      render () {
                        const { limit } = this.props;
                        const { loading, data } = this.state;
                    
                        let content;
                    Severity: Minor
                    Found in app/javascript/mastodon/components/admin/Trends.jsx - About 1 hr to fix

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

                        render () {
                          const { value, container, disabled, intl } = this.props;
                          const { open, placement } = this.state;
                      
                          const valueOption = this.options.find(item => item.value === value);

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

                        const stringFromCodePoint = _String.fromCodePoint || function () {
                          let MAX_SIZE = 0x4000;
                          let codeUnits = [];
                          let highSurrogate;
                          let lowSurrogate;
                        Severity: Minor
                        Found in app/javascript/mastodon/features/emoji/emoji_utils.js - About 1 hr to fix

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

                            render () {
                              const { loading, data } = this.state;
                          
                              return (
                                <div className='dimension'>
                          Severity: Minor
                          Found in app/javascript/mastodon/components/admin/ImpactReport.jsx - About 1 hr to fix

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

                              getTicks (count, size, radius, scaleCoefficient) {
                                const ticks = this.getTickPoints(count);
                                const lesser = 200;
                                const m = [];
                                const bufferLength = this.analyser ? this.analyser.frequencyBinCount : 0;
                            Severity: Minor
                            Found in app/javascript/mastodon/features/audio/visualizer.js - About 1 hr to fix

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

                                renderPoll (notification, account) {
                                  const { intl, unread, status } = this.props;
                                  const ownPoll  = me === account.get('id');
                                  const message  = ownPoll ? intl.formatMessage(messages.ownPoll) : intl.formatMessage(messages.poll);
                              
                              

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

                                  render () {
                                    const { value, intl, frequentlyUsedLanguages } = this.props;
                                    const { open, placement } = this.state;
                                    const current = preloadedLanguages.find(lang => lang[0] === value) ?? [];
                                
                                

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

                                    render () {
                                      const { value, container, disabled, intl } = this.props;
                                      const { open, placement } = this.state;
                                  
                                      const valueOption = this.options.find(item => item.value === value);

                                    Method log_target has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def log_target(log)
                                        case log.target_type
                                        when 'Account'
                                          link_to (log.human_identifier.presence || I18n.t('admin.action_logs.deleted_account')), admin_account_path(log.target_id)
                                        when 'User'
                                    Severity: Minor
                                    Found in app/helpers/admin/action_logs_helper.rb - About 1 hr to fix

                                      Method remove_orphans_conversations has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def remove_orphans_conversations
                                            start_at = Time.now.to_f
                                      
                                            unless options[:continue] && ActiveRecord::Base.connection.table_exists?('conversations_to_be_deleted')
                                              say('Creating temporary database indices...')
                                      Severity: Minor
                                      Found in lib/mastodon/cli/statuses.rb - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if current_account_id.nil?
                                              @reblogs_map    = {}
                                              @favourites_map = {}
                                              @bookmarks_map  = {}
                                              @mutes_map      = {}
                                        Severity: Critical
                                        Found in app/presenters/status_relationships_presenter.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language