glitch-soc/mastodon

View on GitHub

Showing 1,278 of 4,906 total issues

Function expandNormalizedConversations has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const expandNormalizedConversations = (state, conversations, next, isLoadingRecent) => {
  let items = ImmutableList(conversations.map(conversationToMap));

  return state.withMutations(mutable => {
    if (!items.isEmpty()) {
Severity: Minor
Found in app/javascript/mastodon/reducers/conversations.js - About 1 hr to fix

    Function expandNormalizedTimeline has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, isLoadingRecent, usePendingItems) => {
      // This method is pretty tricky because:
      // - existing items in the timeline might be out of order
      // - the existing timeline may have gaps, most often explicitly noted with a `null` item
      // - ideally, we don't want it to reorder existing items of the timeline
    Severity: Minor
    Found in app/javascript/mastodon/reducers/timelines.js - About 1 hr to fix

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

        def perform(subscription_id, notification_id)
          @subscription = Web::PushSubscription.find(subscription_id)
          @notification = Notification.find(notification_id)
      
          return if @notification.updated_at < TTL.ago
      Severity: Minor
      Found in app/workers/web/push_notification_worker.rb - About 1 hr to fix

        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 createPollFromServerJSON has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function createPollFromServerJSON(
            serverJSON: ApiPollJSON,
            previousPoll?: Poll,
          ) {
            const emojiMap = makeEmojiMap(serverJSON.emojis);
          Severity: Minor
          Found in app/javascript/flavours/glitch/models/poll.ts - About 1 hr to fix

            Function handleSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                (value: string) => {
                  if (searchRequestRef.current) {
                    searchRequestRef.current.abort();
                  }
            
            
            Severity: Minor
            Found in app/javascript/flavours/glitch/features/onboarding/follows.tsx - About 1 hr to fix

              Function createPollFromServerJSON has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function createPollFromServerJSON(
                serverJSON: ApiPollJSON,
                previousPoll?: Poll,
              ) {
                const emojiMap = makeEmojiMap(serverJSON.emojis);
              Severity: Minor
              Found in app/javascript/mastodon/models/poll.ts - About 1 hr to fix

                Function handleSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    (value: string) => {
                      if (searchRequestRef.current) {
                        searchRequestRef.current.abort();
                      }
                
                
                Severity: Minor
                Found in app/javascript/flavours/glitch/features/lists/members.tsx - About 1 hr to fix

                  Function handleSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      (value: string) => {
                        if (searchRequestRef.current) {
                          searchRequestRef.current.abort();
                        }
                  
                  
                  Severity: Minor
                  Found in app/javascript/mastodon/features/lists/members.tsx - About 1 hr to fix

                    Function handleSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        (value: string) => {
                          if (searchRequestRef.current) {
                            searchRequestRef.current.abort();
                          }
                    
                    
                    Severity: Minor
                    Found in app/javascript/mastodon/features/onboarding/follows.tsx - About 1 hr to fix

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

                      const makeMapStateToProps = () => {
                        const getStatus = makeGetStatus();
                        const getPictureInPicture = makeGetPictureInPicture();
                      
                        const mapStateToProps = (state, props) => {
                      Severity: Minor
                      Found in app/javascript/flavours/glitch/containers/status_container.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 ColumnSettings has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const ColumnSettings = () => {
                            const dispatch = useDispatch();
                            const settings = useSelector((state) => state.settings.get('notifications'));
                          
                            const onChange = useCallback(
                          Severity: Minor
                          Found in app/javascript/flavours/glitch/features/notifications/requests.jsx - About 1 hr to fix

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

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

                              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 continueThread has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function continueThread (state, status) {
                                  return state.withMutations(function (map) {
                                    let text = apiStatusToTextMentions(state, status);
                                    text = text + apiStatusToTextHashtags(state, status);
                                    map.set('text', text);
                                Severity: Minor
                                Found in app/javascript/flavours/glitch/reducers/compose.js - About 1 hr to fix

                                  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 ColumnSettings has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const ColumnSettings = () => {
                                      const dispatch = useDispatch();
                                      const settings = useSelector((state) => state.settings.get('notifications'));
                                    
                                      const onChange = useCallback(
                                    Severity: Minor
                                    Found in app/javascript/mastodon/features/notifications/requests.jsx - 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 { account, submitted } = this.props;
                                        
                                            return (
                                              <>
                                        Severity: Minor
                                        Found in app/javascript/mastodon/features/report/thanks.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language