glitch-soc/mastodon

View on GitHub

Showing 1,278 of 4,906 total issues

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

  render () {
    const {
      status,
      mediaIcons,
      settings,
Severity: Minor
Found in app/javascript/flavours/glitch/components/status_icons.jsx - About 1 hr to fix

    Function scrollableContent has 29 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/flavours/glitch/components/status_list.jsx - About 1 hr to fix

      Function render has 29 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/flavours/glitch/components/error_boundary.jsx - About 1 hr to fix

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

          render () {
            const { alt, lang, src, width, height } = this.props;
            const { scale, lockTranslate, dragged } = this.state;
            const overflow = scale === MIN_SCALE ? 'hidden' : 'scroll';
            const cursor = scale === MIN_SCALE ? null : (dragged ? 'grabbing' : 'grab');

          Function render has 29 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.jsx - About 1 hr to fix

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

              render () {
                const { alt, lang, src, width, height } = this.props;
                const { scale, lockTranslate, dragged } = this.state;
                const overflow = scale === MIN_SCALE ? 'hidden' : 'scroll';
                const cursor = scale === MIN_SCALE ? null : (dragged ? 'grabbing' : 'grab');
            Severity: Minor
            Found in app/javascript/mastodon/features/ui/components/zoomable_image.jsx - About 1 hr to fix

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

                render () {
                  const { status, checked } = this.props;
              
                  if (status.get('reblog')) {
                    return null;

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

                    def import
                      authorize :domain_block, :create?
                
                      @import = Admin::Import.new(import_params)
                      return render :new unless @import.validate
                Severity: Minor
                Found in app/controllers/admin/export_domain_blocks_controller.rb - About 1 hr to fix

                  Method signed_request_actor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def signed_request_actor
                      return @signed_request_actor if defined?(@signed_request_actor)
                  
                      raise SignatureVerificationError, 'Request not signed' unless signed_request?
                      raise SignatureVerificationError, 'Incompatible request signature. keyId and signature are required' if missing_required_signature_parameters?
                  Severity: Minor
                  Found in app/controllers/concerns/signature_verification.rb - About 1 hr to fix

                    Method privatize_media_attachments! has 29 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 publish_media_attachments! has 29 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 message has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def message
                            if running_version.blank?
                              Admin::SystemCheck::Message.new(:elasticsearch_running_check)
                            elsif !compatible_version?
                              Admin::SystemCheck::Message.new(
                        Severity: Minor
                        Found in app/lib/admin/system_check/elasticsearch_check.rb - About 1 hr to fix

                          Method rename_column_concurrently has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def rename_column_concurrently(table, old, new, type: nil)
                                if transaction_open?
                                  raise 'rename_column_concurrently can not be run inside a transaction'
                                end
                          
                          
                          Severity: Minor
                          Found in lib/mastodon/migration_helpers.rb - About 1 hr to fix

                            Function handleClick has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const handleClick = useCallback(() => {
                                if (partOfList) {
                                  void apiRemoveAccountFromList(listId, accountId);
                                  onToggle(accountId);
                                } else {
                            Severity: Minor
                            Found in app/javascript/flavours/glitch/features/lists/members.tsx - About 1 hr to fix

                              Function handleSubmit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const handleSubmit = useCallback(() => {
                                  setSubmitting(true);
                              
                                  if (id) {
                                    void dispatch(
                              Severity: Minor
                              Found in app/javascript/flavours/glitch/features/lists/new.tsx - About 1 hr to fix

                                Function handleMessage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    const handleMessage = (event: MessageEvent<LoginFormMessage>) => {
                                      if (
                                        event.origin !== window.origin ||
                                        event.source !== iframeRef.current?.contentWindow
                                      ) {
                                Severity: Minor
                                Found in app/javascript/flavours/glitch/features/interaction_modal/index.tsx - About 1 hr to fix

                                  Function suggestionsReducer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const suggestionsReducer = createReducer(initialState, (builder) => {
                                    builder.addCase(fetchSuggestions.pending, (state) => {
                                      state.isLoading = true;
                                    });
                                  
                                  
                                  Severity: Minor
                                  Found in app/javascript/flavours/glitch/reducers/suggestions.ts - About 1 hr to fix

                                    Function suggestionsReducer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const suggestionsReducer = createReducer(initialState, (builder) => {
                                      builder.addCase(fetchSuggestions.pending, (state) => {
                                        state.isLoading = true;
                                      });
                                    
                                    
                                    Severity: Minor
                                    Found in app/javascript/mastodon/reducers/suggestions.ts - About 1 hr to fix

                                      Function handleMessage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          const handleMessage = (event: MessageEvent<LoginFormMessage>) => {
                                            if (
                                              event.origin !== window.origin ||
                                              event.source !== iframeRef.current?.contentWindow
                                            ) {
                                      Severity: Minor
                                      Found in app/javascript/mastodon/features/interaction_modal/index.tsx - About 1 hr to fix

                                        Function handleSubmit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const handleSubmit = useCallback(() => {
                                            setSubmitting(true);
                                        
                                            if (id) {
                                              void dispatch(
                                        Severity: Minor
                                        Found in app/javascript/mastodon/features/lists/new.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language