glitch-soc/mastodon

View on GitHub

Showing 4,938 of 4,938 total issues

File request.rb has 252 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'ipaddr'
require 'socket'
require 'resolv'

# Use our own timeout class to avoid using HTTP.rb's timeout block
Severity: Minor
Found in app/lib/request.rb - About 2 hrs to fix

    Function register has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function register () {
      return (dispatch, getState) => {
        dispatch(setBrowserSupport(supportsPushNotifications));
    
        if (supportsPushNotifications) {

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

        render () {
          const { index, versions, language, onClose } = this.props;
          const currentVersion = versions.get(index);
      
          const emojiMap = currentVersion.get('emojis').reduce((obj, emoji) => {

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

          render () {
            const { loading, style, intl, custom_emojis, skinTone, frequentlyUsedEmojis } = this.props;
        
            if (loading) {
              return <div style={{ width: 299 }} />;

          Function content has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              const content = media.map((image) => {
                const width  = image.getIn(['meta', 'original', 'width']) || null;
                const height = image.getIn(['meta', 'original', 'height']) || null;
                const description = image.getIn(['translation', 'description']) || image.get('description');
          
          
          Severity: Major
          Found in app/javascript/flavours/glitch/features/ui/components/media_modal.jsx - About 2 hrs to fix

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

              render () {
                const { media, lang, sensitive, defaultWidth, autoplay } = this.props;
                const { visible } = this.state;
                const width = this.state.width || defaultWidth;
            
            
            Severity: Major
            Found in app/javascript/mastodon/components/media_gallery.jsx - About 2 hrs to fix

              Function timelines has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function timelines(state = initialState, action) {
                switch(action.type) {
                case TIMELINE_LOAD_PENDING:
                  return state.update(action.timeline, initialTimeline, map =>
                    map.update('items', list => map.get('pendingItems').concat(list.take(40))).set('pendingItems', ImmutableList()).set('unread', 0));
              Severity: Major
              Found in app/javascript/flavours/glitch/reducers/timelines.js - About 2 hrs to fix

                Function register has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function register () {
                  return (dispatch, getState) => {
                    dispatch(setBrowserSupport(supportsPushNotifications));
                
                    if (supportsPushNotifications) {
                Severity: Major
                Found in app/javascript/mastodon/actions/push_notifications/registerer.js - About 2 hrs to fix

                  Function statusLists has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function statusLists(state = initialState, action) {
                    switch(action.type) {
                    case FAVOURITED_STATUSES_FETCH_REQUEST:
                    case FAVOURITED_STATUSES_EXPAND_REQUEST:
                      return state.setIn(['favourites', 'isLoading'], true);
                  Severity: Major
                  Found in app/javascript/flavours/glitch/reducers/status_lists.js - About 2 hrs to fix

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

                      render () {
                        const { index, versions, language, onClose } = this.props;
                        const currentVersion = versions.get(index);
                    
                        const emojiMap = currentVersion.get('emojis').reduce((obj, emoji) => {

                      Function timelines has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function timelines(state = initialState, action) {
                        switch(action.type) {
                        case TIMELINE_LOAD_PENDING:
                          return state.update(action.timeline, initialTimeline, map =>
                            map.update('items', list => map.get('pendingItems').concat(list.take(40))).set('pendingItems', ImmutableList()).set('unread', 0));
                      Severity: Major
                      Found in app/javascript/mastodon/reducers/timelines.js - About 2 hrs to fix

                        Function statusLists has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function statusLists(state = initialState, action) {
                          switch(action.type) {
                          case FAVOURITED_STATUSES_FETCH_REQUEST:
                          case FAVOURITED_STATUSES_EXPAND_REQUEST:
                            return state.setIn(['favourites', 'isLoading'], true);
                        Severity: Major
                        Found in app/javascript/mastodon/reducers/status_lists.js - About 2 hrs to fix

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

                            render() {
                              const { intl, multiColumn, isSearching } = this.props;
                              const { signedIn } = this.props.identity;
                          
                              return (
                          Severity: Minor
                          Found in app/javascript/flavours/glitch/features/explore/index.jsx - About 2 hrs to fix

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

                              render () {
                                const { label, href, target } = this.props;
                                const { loading, data } = this.state;
                            
                                let content;
                            Severity: Minor
                            Found in app/javascript/flavours/glitch/components/admin/Counter.jsx - About 2 hrs to fix

                              Function normalizeStatus has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function normalizeStatus(status, normalOldStatus, settings) {
                                const normalStatus   = { ...status };
                                normalStatus.account = status.account.id;
                              
                                if (status.reblog && status.reblog.id) {
                              Severity: Minor
                              Found in app/javascript/flavours/glitch/actions/importer/normalizer.js - About 2 hrs to fix

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

                                  render () {
                                    const { signedIn } = this.props.identity;
                                    const { location, openClosedRegistrationsModal, signupUrl, intl } = this.props;
                                
                                    let content;
                                Severity: Minor
                                Found in app/javascript/flavours/glitch/features/ui/components/header.jsx - About 2 hrs to fix

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

                                    render () {
                                      const { label, href, target } = this.props;
                                      const { loading, data } = this.state;
                                  
                                      let content;
                                  Severity: Minor
                                  Found in app/javascript/mastodon/components/admin/Counter.jsx - About 2 hrs to fix

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

                                      render () {
                                        const { signedIn } = this.props.identity;
                                        const { location, openClosedRegistrationsModal, signupUrl, intl } = this.props;
                                    
                                        let content;
                                    Severity: Minor
                                    Found in app/javascript/mastodon/features/ui/components/header.jsx - About 2 hrs to fix

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

                                        render() {
                                          const { intl, multiColumn, isSearching } = this.props;
                                          const { signedIn } = this.props.identity;
                                      
                                          return (
                                      Severity: Minor
                                      Found in app/javascript/mastodon/features/explore/index.jsx - About 2 hrs to fix

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

                                          render () {
                                            const { loading, style, intl, custom_emojis, skinTone, frequentlyUsedEmojis } = this.props;
                                        
                                            if (loading) {
                                              return <div style={{ width: 299 }} />;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language