glitch-soc/mastodon

View on GitHub
app/javascript/flavours/glitch/features/local_settings/page/index.jsx

Summary

Maintainability
F
1 wk
Test Coverage

File index.jsx has 495 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//  Package imports
import PropTypes from 'prop-types';
import { PureComponent } from 'react';

import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
Severity: Minor
Found in app/javascript/flavours/glitch/features/local_settings/page/index.jsx - About 7 hrs to fix

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

            <LocalSettingsPageItem
              settings={settings}
              item={['side_arm_reply_mode']}
              id='mastodon-settings--side_arm_reply_mode'
              options={[
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 83..95

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

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

            <LocalSettingsPageItem
              settings={settings}
              item={['rewrite_mentions']}
              id='mastodon-settings--rewrite_mentions'
              options={[
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 250..262

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

    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

              <LocalSettingsPageItem
                settings={settings}
                item={['notifications', 'tab_badge']}
                id='mastodon-settings--notifications-tab_badge'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 107..115
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 268..276
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 277..285
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 326..334
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 445..453

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

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['content_warnings', 'shared_state']}
              id='mastodon-settings--content_warnings-shared_state'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 98..106
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 107..115
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 277..285
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 326..334
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 445..453

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

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['collapsed', 'enabled']}
              id='mastodon-settings--collapsed-enabled'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 98..106
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 107..115
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 268..276
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 277..285
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 445..453

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

    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

              <LocalSettingsPageItem
                settings={settings}
                item={['notifications', 'favicon_badge']}
                id='mastodon-settings--notifications-favicon_badge'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 98..106
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 268..276
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 277..285
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 326..334
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 445..453

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

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['content_warnings', 'media_outside']}
              id='mastodon-settings--content_warnings-media_outside'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 98..106
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 107..115
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 268..276
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 326..334
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 445..453

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

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['media', 'letterbox']}
              id='mastodon-settings--media-letterbox'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 98..106
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 107..115
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 268..276
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 277..285
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 326..334

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

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

            <LocalSettingsPageItem
              settings={settings}
              item={['tag_misleading_links']}
              id='mastodon-settings--tag_misleading_links'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 57..65
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 163..171
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 194..202

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

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

            <LocalSettingsPageItem
              settings={settings}
              item={['hicolor_privacy_icons']}
              id='mastodon-settings--hicolor_privacy_icons'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 74..82
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 163..171
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 194..202

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['stretch']}
                id='mastodon-settings--stretch'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 57..65
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 74..82
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 194..202

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

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

            <LocalSettingsPageItem
              settings={settings}
              item={['preselect_on_reply']}
              id='mastodon-settings--preselect_on_reply'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 57..65
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 74..82
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 163..171

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'notifications']}
                id='mastodon-settings--collapsed-auto-notifications'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 365..374
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 375..384
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 385..394
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 395..404

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'reblogs']}
                id='mastodon-settings--collapsed-auto-reblogs'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 355..364
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 365..374
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 385..394
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 395..404

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'lengthy']}
                id='mastodon-settings--collapsed-auto-lengthy'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 355..364
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 375..384
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 385..394
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 395..404

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'media']}
                id='mastodon-settings--collapsed-auto-media'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 355..364
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 365..374
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 375..384
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 385..394

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'replies']}
                id='mastodon-settings--collapsed-auto-replies'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 355..364
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 365..374
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 375..384
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 395..404

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'auto', 'all']}
                id='mastodon-settings--collapsed-auto-all'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 420..428

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

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

              <LocalSettingsPageItem
                settings={settings}
                item={['collapsed', 'backgrounds', 'user_backgrounds']}
                id='mastodon-settings--collapsed-user-backgrouns'
                onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 346..354

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

    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', '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

              <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

            <LocalSettingsPageItem
              settings={settings}
              item={['media', 'pop_in_player']}
              id='mastodon-settings--pop-in-player'
              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 470..477

    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

    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

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

            <LocalSettingsPageItem
              settings={settings}
              item={['show_reply_count']}
              id='mastodon-settings--reply-count'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['always_show_spoilers_field']}
              id='mastodon-settings--always_show_spoilers_field'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['confirm_boost_missing_media_description']}
              id='mastodon-settings--confirm_boost_missing_media_description'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['show_content_type_choice']}
              id='mastodon-settings--show_content_type_choice'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['show_published_toast']}
              id='mastodon-settings--show_published_toast'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['prepend_cw_re']}
              id='mastodon-settings--prepend_cw_re'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['confirm_before_clearing_draft']}
              id='mastodon-settings--confirm_before_clearing_draft'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['inline_preview_cards']}
              id='mastodon-settings--inline-preview-cards'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 203..210
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234

    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

            <LocalSettingsPageItem
              settings={settings}
              item={['confirm_missing_media_description']}
              id='mastodon-settings--confirm_missing_media_description'
              onChange={onChange}
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 49..56
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 66..73
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 178..185
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 186..193
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 211..218
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 219..226
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 227..234
    app/javascript/flavours/glitch/features/local_settings/page/index.jsx on lines 462..469

    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

    There are no issues that match your filters.

    Category
    Status