mashirozx/mastodon

View on GitHub

Showing 1,785 of 1,785 total issues

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

  def update_media_attachments!
    previous_media_attachments     = @status.media_attachments.to_a
    previous_media_attachments_ids = @status.ordered_media_attachment_ids || previous_media_attachments.map(&:id)
    next_media_attachments         = []

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

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

      def import!
        # The idea is that instead of iterating over all statuses in the database
        # and calculating the searchable_by for each of them (majority of which
        # would be empty), we approach the index from the other end
    
    
    Severity: Minor
    Found in app/lib/importer/statuses_index_importer.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

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

            def upgrade_storage_filesystem(progress, attachment, style)
              previous_storage_schema_version = attachment.storage_schema_version
              previous_path                   = attachment.path(style)
              success                         = true
        
        
        Severity: Minor
        Found in lib/mastodon/upgrade_cli.rb - About 1 hr to fix

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          Severity: Major
          Found in app/javascript/mastodon/components/dropdown_menu.js and 6 other locations - About 1 hr to fix
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              statusId: PropTypes.string.isRequired,
              timestamp: PropTypes.string.isRequired,
              intl: PropTypes.object.isRequired,
              onItemClick: PropTypes.func.isRequired,
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              settings: ImmutablePropTypes.map.isRequired,
              onChange: PropTypes.func.isRequired,
              onLoad: PropTypes.func.isRequired,
              intl: PropTypes.object.isRequired,
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/language_dropdown.js on lines 44..48
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              settings: ImmutablePropTypes.map.isRequired,
              settingKey: PropTypes.array.isRequired,
              label: PropTypes.string.isRequired,
              onChange: PropTypes.func.isRequired,
          Severity: Major
          Found in app/javascript/mastodon/components/setting_text.js and 8 other locations - About 1 hr to fix
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              url: PropTypes.string.isRequired,
              onClose: PropTypes.func.isRequired,
              onError: PropTypes.func.isRequired,
              intl: PropTypes.object.isRequired,
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 7 locations. Consider refactoring.
          Open

            handleDocumentClick = e => {
              if (this.node && !this.node.contains(e.target)) {
                this.props.onClose();
              }
            }
          app/javascript/mastodon/components/dropdown_menu.js on lines 45..49
          app/javascript/mastodon/features/compose/components/content_type_dropdown.js on lines 35..39
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 74..78
          app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js on lines 176..180
          app/javascript/mastodon/features/compose/components/federation_dropdown.js on lines 36..40
          app/javascript/mastodon/features/compose/components/privacy_dropdown.js on lines 41..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

              <NavLink className='column-link column-link--transparent' to='/conversations'><Icon className='column-link__icon' id='at' fixedWidth /><FormattedMessage id='navigation_bar.direct' defaultMessage='Direct messages' /></NavLink>
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 20..20
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 21..21
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 22..22
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 28..28
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 29..29

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              media: ImmutablePropTypes.map.isRequired,
              onUndo: PropTypes.func.isRequired,
              onOpenFocalPoint: PropTypes.func.isRequired,
              isEditingStatus: PropTypes.func.isRequired,
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              onClose: PropTypes.func.isRequired,
              index: PropTypes.number.isRequired,
              statusId: PropTypes.string.isRequired,
              versions: ImmutablePropTypes.list.isRequired,
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 9 locations. Consider refactoring.
          Open

            static propTypes = {
              selectFilter: PropTypes.func.isRequired,
              selectedFilter: PropTypes.string.isRequired,
              advancedMode: PropTypes.bool.isRequired,
              intl: PropTypes.object.isRequired,
          app/javascript/mastodon/components/edited_timestamp/index.js on lines 23..28
          app/javascript/mastodon/components/setting_text.js on lines 7..12
          app/javascript/mastodon/features/compose/components/upload.js on lines 16..21
          app/javascript/mastodon/features/follow_requests/components/account_authorize.js on lines 19..24
          app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js on lines 18..23
          app/javascript/mastodon/features/notifications/components/follow_request.js on lines 19..24
          app/javascript/mastodon/features/ui/components/compare_history_modal.js on lines 29..34
          app/javascript/mastodon/features/ui/components/embed_modal.js on lines 15..20

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

              <a className='column-link column-link--transparent' href='/relationships'><Icon className='column-link__icon' id='users' fixedWidth /><FormattedMessage id='navigation_bar.follows_and_followers' defaultMessage='Follows and followers' /></a>
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 19..19
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 20..20
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 21..21
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 22..22
          app/javascript/mastodon/features/ui/components/navigation_panel.js on lines 28..28

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 58.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language