mashirozx/mastodon

View on GitHub

Showing 720 of 1,785 total issues

Method cc has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def cc(status)
    cc = []

    cc << uri_for(status.reblog.account) if status.reblog?

Severity: Minor
Found in app/lib/activitypub/tag_manager.rb - About 1 hr to fix

    Function submitSearch has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function submitSearch() {
      return (dispatch, getState) => {
        const value = getState().getIn(['search', 'value']);
    
        if (value.length === 0) {
    Severity: Minor
    Found in app/javascript/mastodon/actions/search.js - About 1 hr to fix

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

        render() {
          const { hasError, copied, errorMessage } = this.state;
      
          if (!hasError) {
            return this.props.children;
      Severity: Minor
      Found in app/javascript/mastodon/components/error_boundary.js - About 1 hr to fix

        Function onReceive has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              onReceive (data) {
                switch(data.event) {
                case 'update':
                  dispatch(updateTimeline(timelineId, JSON.parse(data.payload), options.accept));
                  break;
        Severity: Minor
        Found in app/javascript/mastodon/actions/streaming.js - About 1 hr to fix

          Function renderUpdate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            renderUpdate (notification, link) {
              const { intl, unread } = this.props;
          
              return (
                <HotKeys handlers={this.getHandlers()}>

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

              render () {
                const { intl, columnId, hasUnread, multiColumn, onlyMedia, onlyRemote } = this.props;
                const pinned = !!columnId;
            
                return (
            Severity: Minor
            Found in app/javascript/mastodon/features/public_timeline/index.js - About 1 hr to fix

              Function renderReblog has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                renderReblog (notification, link) {
                  const { intl, unread } = this.props;
              
                  return (
                    <HotKeys handlers={this.getHandlers()}>

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

                  render () {
                    const status = this.props.status && (
                      <div className='status light'>
                        <div className='boost-modal__status-header'>
                          <div className='boost-modal__status-time'>
                Severity: Minor
                Found in app/javascript/mastodon/features/ui/components/actions_modal.js - About 1 hr to fix

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

                    render () {
                      const { intl, hidden, account, onAuthorize, onReject } = this.props;
                  
                      if (!account) {
                        return <div />;

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

                      render () {
                        const { announcement } = this.props;
                        const { unread } = this.state;
                        const startsAt = announcement.get('starts_at') && new Date(announcement.get('starts_at'));
                        const endsAt = announcement.get('ends_at') && new Date(announcement.get('ends_at'));

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

                        render () {
                          const { intl, hasMore, accountIds, multiColumn, isLoading } = this.props;
                      
                          if (!accountIds) {
                            return (
                      Severity: Minor
                      Found in app/javascript/mastodon/features/mutes/index.js - About 1 hr to fix

                        Function renderStatus has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          renderStatus (notification, link) {
                            const { intl, unread } = this.props;
                        
                            return (
                              <HotKeys handlers={this.getHandlers()}>

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

                            render () {
                              const { account, submitted } = this.props;
                          
                              return (
                                <React.Fragment>
                          Severity: Minor
                          Found in app/javascript/mastodon/features/report/thanks.js - About 1 hr to fix

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

                              render () {
                                const { intl, accountIds, hasMore, multiColumn, isLoading } = this.props;
                            
                                if (!accountIds) {
                                  return (
                            Severity: Minor
                            Found in app/javascript/mastodon/features/blocks/index.js - About 1 hr to fix

                              Function renderFavourite has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                renderFavourite (notification, link) {
                                  const { intl, unread } = this.props;
                              
                                  return (
                                    <HotKeys handlers={this.getHandlers()}>

                                Method privatize_media_attachments! has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def privatize_media_attachments!
                                    attachment_names = MediaAttachment.attachment_definitions.keys
                                
                                    @account.media_attachments.find_each do |media_attachment|
                                      attachment_names.each do |attachment_name|
                                Severity: Minor
                                Found in app/services/suspend_account_service.rb - About 1 hr to fix

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

                                    def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil)
                                      @json = begin
                                        if prefetched_body.nil?
                                          fetch_resource(uri, id, on_behalf_of)
                                        else
                                  Severity: Minor
                                  Found in app/services/activitypub/fetch_remote_status_service.rb - About 1 hr to fix

                                    Method publish_media_attachments! has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def publish_media_attachments!
                                        attachment_names = MediaAttachment.attachment_definitions.keys
                                    
                                        @account.media_attachments.find_each do |media_attachment|
                                          attachment_names.each do |attachment_name|
                                    Severity: Minor
                                    Found in app/services/unsuspend_account_service.rb - About 1 hr to fix

                                      Method export has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          def export(path)
                                            exported         = 0
                                            category         = CustomEmojiCategory.find_by(name: options[:category])
                                            export_file_name = File.join(path, 'export.tar.gz')
                                      
                                      
                                      Severity: Minor
                                      Found in lib/mastodon/emoji_cli.rb - About 1 hr to fix

                                        Method add has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def add(*addresses)
                                              if addresses.empty?
                                                say('No IP(s) given', :red)
                                                exit(1)
                                              end
                                        Severity: Minor
                                        Found in lib/mastodon/ip_blocks_cli.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language