glitch-soc/mastodon

View on GitHub

Showing 4,938 of 4,938 total issues

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

  handleOpenProfile = () => {
    const { notification } = this.props;
    this.props.history.push(`/@${notification.getIn(['account', 'acct'])}`);
  };
app/javascript/flavours/glitch/features/notifications/components/notification.jsx on lines 86..89

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

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

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

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

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

Refactorings

Further Reading

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

        <div className='edit-indicator__cancel'>
          <IconButton title={intl.formatMessage(messages.cancel)} icon='times' iconComponent={CloseIcon} onClick={handleCancelClick} inverted />
        </div>
app/javascript/mastodon/features/compose/components/edit_indicator.jsx on lines 46..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

        <div className='edit-indicator__cancel'>
          <IconButton title={intl.formatMessage(messages.cancel)} icon='times' iconComponent={CloseIcon} onClick={handleCancelClick} inverted />
        </div>
app/javascript/flavours/glitch/features/compose/components/edit_indicator.jsx on lines 45..47

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

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

        {alertsEnabled && browserSupport && browserPermission === 'denied' && (
          <section>
            <span className='warning-hint'>
              <FormattedMessage id='notifications.permission_denied' defaultMessage='Desktop notifications are unavailable due to previously denied browser permissions request' />
            </span>
app/javascript/flavours/glitch/features/notifications/components/column_settings.jsx on lines 53..59

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

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

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

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

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

Refactorings

Further Reading

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

  onMuteConversation (status) {
    if (status.get('muted')) {
      dispatch(unmuteStatus(status.get('id')));
    } else {
      dispatch(muteStatus(status.get('id')));
Severity: Major
Found in app/javascript/mastodon/containers/status_container.jsx and 1 other location - About 1 hr to fix
app/javascript/flavours/glitch/containers/status_container.js on lines 182..188

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

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

    return (
      <ScrollableList {...other} showLoading={isLoading && statusIds.size === 0} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}>
        {scrollableContent}
      </ScrollableList>
    );
Severity: Major
Found in app/javascript/flavours/glitch/components/status_list.jsx and 1 other location - About 1 hr to fix
app/javascript/mastodon/components/status_list.jsx on lines 146..150

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

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

        {alertsEnabled && browserSupport && browserPermission === 'denied' && (
          <section>
            <span className='warning-hint'>
              <FormattedMessage id='notifications.permission_denied' defaultMessage='Desktop notifications are unavailable due to previously denied browser permissions request' />
            </span>
app/javascript/mastodon/features/notifications/components/column_settings.jsx on lines 51..57

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

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

    return (
      <ScrollableList {...other} showLoading={isLoading && statusIds.size === 0} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}>
        {scrollableContent}
      </ScrollableList>
    );
Severity: Major
Found in app/javascript/mastodon/components/status_list.jsx and 1 other location - About 1 hr to fix
app/javascript/flavours/glitch/components/status_list.jsx on lines 146..150

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

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

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

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

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

Refactorings

Further Reading

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

function isSetHeightMessage(data: unknown): data is SetHeightMessage {
  if (
    data &&
    typeof data === 'object' &&
    'type' in data &&
Severity: Major
Found in app/javascript/flavours/glitch/entrypoints/embed.tsx and 1 other location - About 1 hr to fix
app/javascript/entrypoints/embed.tsx on lines 46..55

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

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

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

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

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

Refactorings

Further Reading

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

function isSetHeightMessage(data: unknown): data is SetHeightMessage {
  if (
    data &&
    typeof data === 'object' &&
    'type' in data &&
Severity: Major
Found in app/javascript/entrypoints/embed.tsx and 1 other location - About 1 hr to fix
app/javascript/flavours/glitch/entrypoints/embed.tsx on lines 46..55

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

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

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

  render () {
    const { isLoading, links } = this.props;

    const banner = (
      <DismissableBanner id='explore/links'>
Severity: Minor
Found in app/javascript/flavours/glitch/features/explore/links.jsx - About 1 hr to fix

    Function ColumnSettings has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const ColumnSettings = () => {
      const intl = useIntl();
      const dispatch = useAppDispatch();
      const settings = useAppSelector((state) => state.getIn(['settings', 'firehose']));
      const onChange = useCallback(
    Severity: Minor
    Found in app/javascript/flavours/glitch/features/firehose/index.jsx - About 1 hr to fix

      Function announcementsReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function announcementsReducer(state = initialState, action) {
        switch(action.type) {
        case ANNOUNCEMENTS_TOGGLE_SHOW:
          return state.withMutations(map => {
            map.set('show', !map.get('show'));
      Severity: Minor
      Found in app/javascript/flavours/glitch/reducers/announcements.js - About 1 hr to fix

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

          render () {
            const { isLoading, links } = this.props;
        
            const banner = (
              <DismissableBanner id='explore/links'>
        Severity: Minor
        Found in app/javascript/mastodon/features/explore/links.jsx - About 1 hr to fix

          Function announcementsReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function announcementsReducer(state = initialState, action) {
            switch(action.type) {
            case ANNOUNCEMENTS_TOGGLE_SHOW:
              return state.withMutations(map => {
                map.set('show', !map.get('show'));
          Severity: Minor
          Found in app/javascript/mastodon/reducers/announcements.js - About 1 hr to fix

            Method initialize has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def initialize
                @flavours = {}
            
                Rails.root.glob('app/javascript/flavours/*/theme.yml') do |pathname|
                  data = YAML.load_file(pathname)
            Severity: Minor
            Found in app/lib/themes.rb - About 1 hr to fix

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

                settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: {
                  filter: {
                    english_stop: {
                      type: 'stop',
                      stopwords: '_english_',
              Severity: Major
              Found in app/chewy/statuses_index.rb and 1 other location - About 1 hr to fix
              app/chewy/public_statuses_index.rb on lines 6..55

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

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

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

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

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

              Refactorings

              Further Reading

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

                settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: {
                  filter: {
                    english_stop: {
                      type: 'stop',
                      stopwords: '_english_',
              Severity: Major
              Found in app/chewy/public_statuses_index.rb and 1 other location - About 1 hr to fix
              app/chewy/statuses_index.rb on lines 6..55

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

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

                            <tr>
                              <td><kbd>p</kbd></td>
                              <td><FormattedMessage id='keyboard_shortcuts.profile' defaultMessage="to open author's profile" /></td>
                            </tr>
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 51..54
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 55..58
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 59..62
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 63..66
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 67..70
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 71..74
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 79..82
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 83..86
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 87..90
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 109..112
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 121..124
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 133..136
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 137..140
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 45..48
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 49..52
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 57..60
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 61..64
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 69..72
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 73..76
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 77..80
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 93..96
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 105..108
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 113..116
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 165..168

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

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

                            <tr>
                              <td><kbd>h</kbd></td>
                              <td><FormattedMessage id='keyboard_shortcuts.toggle_sensitivity' defaultMessage='to show/hide media' /></td>
                            </tr>
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 51..54
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 55..58
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 59..62
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 63..66
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 67..70
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 71..74
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 79..82
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 83..86
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 87..90
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 109..112
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 121..124
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 133..136
              app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 137..140
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 45..48
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 49..52
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 53..56
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 57..60
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 61..64
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 69..72
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 73..76
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 93..96
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 105..108
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 113..116
              app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 165..168

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

              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