glitch-soc/mastodon

View on GitHub

Showing 4,938 of 4,938 total issues

Function ActionBar has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const ActionBar = () => {
  const dispatch = useDispatch();
  const intl = useIntl();

  const handleLogoutClick = useCallback(() => {

    Function push_subscriptions has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function push_subscriptions(state = initialState, action) {
      switch(action.type) {
      case STORE_HYDRATE: {
        const push_subscription = action.state.get('push_subscription');
    
    
    Severity: Minor
    Found in app/javascript/flavours/glitch/reducers/push_notifications.js - About 1 hr to fix

      Function selectComposeSuggestion has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function selectComposeSuggestion(position, token, suggestion, path) {
        return (dispatch, getState) => {
          let completion, startPosition;
      
          if (suggestion.type === 'emoji') {
      Severity: Minor
      Found in app/javascript/mastodon/actions/compose.js - About 1 hr to fix

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

          render () {
            const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
            const pinned = !!columnId;
        
            const emptyMessage = <FormattedMessage id='empty_column.bookmarked_statuses' defaultMessage="You don't have any bookmarked posts yet. When you bookmark one, it will show up here." />;
        Severity: Minor
        Found in app/javascript/mastodon/features/bookmarked_statuses/index.jsx - About 1 hr to fix

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

            render () {
              const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
              const pinned = !!columnId;
          
              const emptyMessage = <FormattedMessage id='empty_column.favourited_statuses' defaultMessage="You don't have any favorite posts yet. When you favorite one, it will show up here." />;
          Severity: Minor
          Found in app/javascript/mastodon/features/favourited_statuses/index.jsx - About 1 hr to fix

            Function ActionBar has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const ActionBar = () => {
              const dispatch = useDispatch();
              const intl = useIntl();
            
              const handleLogoutClick = useCallback(() => {
            Severity: Minor
            Found in app/javascript/mastodon/features/compose/components/action_bar.jsx - About 1 hr to fix

              Function ReplyIndicator has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const ReplyIndicator = () => {
                const inReplyToId = useSelector(state => state.getIn(['compose', 'in_reply_to']));
                const status = useSelector(state => state.getIn(['statuses', inReplyToId]));
                const account = useSelector(state => state.getIn(['accounts', status?.get('account')]));
              
              

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

                  render () {
                    const { status, intl, withOpenButton } = this.props;
                
                    const publicStatus  = ['public', 'unlisted'].includes(status.get('visibility'));
                    const reblogPrivate = status.getIn(['account', 'id']) === me && status.get('visibility') === 'private';

                  Function configFromEnv has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function configFromEnv(env) {
                    const redisNamespace = env.REDIS_NAMESPACE;
                  
                    // These options apply for both REDIS_URL based connections and connections
                    // using the other REDIS_* environment variables:
                  Severity: Minor
                  Found in streaming/redis.js - About 1 hr to fix

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

                      render () {
                        const { notification } = this.props;
                        const account          = notification.get('account');
                        const displayNameHtml  = { __html: account.get('display_name_html') };
                        const link             = <bdi><Link className='notification__display-name' href={`/@${account.get('acct')}`} title={account.get('acct')} data-hover-card-account={account.get('id')} to={`/@${account.get('acct')}`} dangerouslySetInnerHTML={displayNameHtml} /></bdi>;

                      Method remotable_attachment has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def remotable_attachment(attachment_name, limit, suppress_errors: true, download_on_assign: true, attribute_name: nil)
                            attribute_name ||= :"#{attachment_name}_remote_url"
                      
                            define_method(:"download_#{attachment_name}!") do |url = nil|
                              url ||= self[attribute_name]
                      Severity: Minor
                      Found in app/models/concerns/remotable.rb - About 1 hr to fix

                        Function push_subscriptions has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function push_subscriptions(state = initialState, action) {
                          switch(action.type) {
                          case STORE_HYDRATE: {
                            const push_subscription = action.state.get('push_subscription');
                        
                        
                        Severity: Minor
                        Found in app/javascript/mastodon/reducers/push_notifications.js - About 1 hr to fix

                          Method elastic_search_query has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def elastic_search_query
                              {
                                function_score: {
                                  query: {
                                    multi_match: {
                          Severity: Minor
                          Found in app/services/tag_search_service.rb - About 1 hr to fix

                            Method import has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def import(path)
                                  imported = 0
                                  skipped  = 0
                                  failed   = 0
                                  category = options[:category] ? CustomEmojiCategory.find_or_create_by(name: options[:category]) : nil
                            Severity: Minor
                            Found in lib/mastodon/cli/emoji.rb - About 1 hr to fix

                              Method reset_relationships has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def reset_relationships(username)
                                    fail_with_message 'Please specify either --follows or --followers, or both' unless options[:follows] || options[:followers]
                              
                                    account = Account.find_local(username)
                              
                              
                              Severity: Minor
                              Found in lib/mastodon/cli/accounts.rb - About 1 hr to fix

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

                                    def add(*domains)
                                      fail_with_message 'No domain(s) given' if domains.empty?
                                
                                      skipped = 0
                                      processed = 0
                                Severity: Minor
                                Found in lib/mastodon/cli/email_domain_blocks.rb - About 1 hr to fix

                                  Function SensitiveButton has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const SensitiveButton = () => {
                                    const intl = useIntl();
                                  
                                    const spoilersAlwaysOn = useAppSelector((state) => state.getIn(['local_settings', 'always_show_spoilers_field']));
                                    const spoilerText = useAppSelector((state) => state.getIn(['compose', 'spoiler_text']));

                                    Function scrollableContent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          statusIds.map((statusId, index) => {
                                            switch(statusId) {
                                            case TIMELINE_SUGGESTIONS:
                                              return (
                                                <InlineFollowSuggestions
                                    Severity: Minor
                                    Found in app/javascript/mastodon/components/status_list.jsx - About 1 hr to fix

                                      Function conversations has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function conversations(state = initialState, action) {
                                        switch (action.type) {
                                        case CONVERSATIONS_FETCH_REQUEST:
                                          return state.set('isLoading', true);
                                        case CONVERSATIONS_FETCH_FAIL:
                                      Severity: Minor
                                      Found in app/javascript/flavours/glitch/reducers/conversations.js - About 1 hr to fix

                                        Function conversations has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function conversations(state = initialState, action) {
                                          switch (action.type) {
                                          case CONVERSATIONS_FETCH_REQUEST:
                                            return state.set('isLoading', true);
                                          case CONVERSATIONS_FETCH_FAIL:
                                        Severity: Minor
                                        Found in app/javascript/mastodon/reducers/conversations.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language