glitch-soc/mastodon

View on GitHub

Showing 4,938 of 4,938 total issues

Method from_notifications has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.from_notifications(notifications, pagination_range: nil, grouped_types: nil)
    return [] if notifications.empty?

    grouped_types = grouped_types.presence&.map(&:to_sym) || Notification::GROUPABLE_NOTIFICATION_TYPES

Severity: Minor
Found in app/models/notification_group.rb - About 1 hr to fix

    Method build_status_translation has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def build_status_translation(translations)
        status_translation = Translation.new(
          detected_source_language: translations.first&.detected_source_language,
          language: @target_language,
          provider: translations.first&.provider,
    Severity: Minor
    Found in app/services/translate_status_service.rb - About 1 hr to fix

      Method process_attachments has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def process_attachments
          return [] if @object['attachment'].nil?
      
          media_attachments = []
      
      
      Severity: Minor
      Found in app/lib/activitypub/activity/create.rb - About 1 hr to fix

        Method klass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def klass
              case @json['type']
              when 'Create'
                ActivityPub::Activity::Create
              when 'Announce'
        Severity: Minor
        Found in app/lib/activitypub/activity.rb - About 1 hr to fix

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

          function processNewNotification(
            groups: NotificationGroupsState['groups'],
            notification: ApiNotificationJSON,
          ) {
            const existingGroupIndex = groups.findIndex(
          Severity: Minor
          Found in app/javascript/flavours/glitch/reducers/notification_groups.ts - About 1 hr to fix

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

            function processNewNotification(
              groups: NotificationGroupsState['groups'],
              notification: ApiNotificationJSON,
            ) {
              const existingGroupIndex = groups.findIndex(
            Severity: Minor
            Found in app/javascript/mastodon/reducers/notification_groups.ts - About 1 hr to fix

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

              const usesRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='hashtag.counter_by_uses'
                  defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}}'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

                        <LocalSettingsPageItem
                          settings={settings}
                          item={['status_icons', 'language']}
                          id='mastodon-settings--status-icons-language'
                          onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const usesRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='hashtag.counter_by_uses'
                  defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}}'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

                      <LocalSettingsPageItem
                        settings={settings}
                        item={['media', 'reveal_behind_cw']}
                        id='mastodon-settings--reveal-behind-cw'
                        onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const sharesCountRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='link_preview.shares'
                  defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}}'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const usesTodayRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='hashtag.counter_by_uses_today'
                  defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}} today'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35

              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 59.

              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 8 locations. Consider refactoring.
              Open

                        <LocalSettingsPageItem
                          settings={settings}
                          item={['status_icons', 'visibility']}
                          id='mastodon-settings--status-icons-visibility'
                          onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

                        <LocalSettingsPageItem
                          settings={settings}
                          item={['status_icons', 'media']}
                          id='mastodon-settings--status-icons-media'
                          onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

                      <LocalSettingsPageItem
                        settings={settings}
                        item={['media', 'fullwidth']}
                        id='mastodon-settings--media-fullwidth'
                        onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const sharesCountRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='link_preview.shares'
                  defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}}'
                  values={{
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const peopleRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='hashtag.counter_by_accounts'
                  defaultMessage='{count, plural, one {{counter} participant} other {{counter} participants}}'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

                        <LocalSettingsPageItem
                          settings={settings}
                          item={['status_icons', 'local_only']}
                          id='mastodon-settings--status-icons-local_only'
                          onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 128..135
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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 8 locations. Consider refactoring.
              Open

              const peopleRenderer = (displayNumber, pluralReady) => (
                <FormattedMessage
                  id='hashtag.counter_by_accounts'
                  defaultMessage='{count, plural, one {{counter} participant} other {{counter} participants}}'
                  values={{
              app/javascript/flavours/glitch/features/explore/components/story.jsx on lines 18..27
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/flavours/glitch/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46
              app/javascript/mastodon/features/explore/components/story.jsx on lines 18..27
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 15..24
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 26..35
              app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx on lines 37..46

              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 59.

              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 8 locations. Consider refactoring.
              Open

                        <LocalSettingsPageItem
                          settings={settings}
                          item={['status_icons', 'reply']}
                          id='mastodon-settings--status-icons-reply'
                          onChange={onChange}
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 120..127
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 136..143
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 144..151
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 152..159
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 454..461
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 470..477
              app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 478..485

              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 59.

              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