mashirozx/mastodon

View on GitHub

Showing 1,065 of 1,785 total issues

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

  class RulesController < BaseController
    before_action :set_rule, except: [:index, :create]

    def index
      authorize :rule, :index?
Severity: Major
Found in app/controllers/admin/rules_controller.rb and 1 other location - About 2 hrs to fix
app/controllers/admin/warning_presets_controller.rb on lines 4..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 84.

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

          <Permalink key={account.get('id')} className='account__display-name' title={account.get('acct')} href={account.get('url')} to={`/@${account.get('acct')}`}>
            <div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
            {mute_expires_at}
            <DisplayName account={account} />
          </Permalink>
Severity: Major
Found in app/javascript/mastodon/components/account.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/notifications/components/follow_request.js on lines 45..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 79.

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

          <Permalink key={account.get('id')} className='account__display-name' title={account.get('acct')} href={account.get('url')} to={`/@${account.get('acct')}`}>
            <div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
            <DisplayName account={account} />
          </Permalink>
app/javascript/mastodon/components/account.js on lines 128..132

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

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

        <button
          className={selectedFilter === 'status' ? 'active' : ''}
          onClick={this.onClick('status')}
          title={intl.formatMessage(tooltips.statuses)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 63..69
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 70..76
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 77..83
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 84..90
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 98..104

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

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

        <button
          className={selectedFilter === 'reblog' ? 'active' : ''}
          onClick={this.onClick('reblog')}
          title={intl.formatMessage(tooltips.boosts)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 63..69
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 70..76
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 84..90
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 91..97
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 98..104

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

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

        <button
          className={selectedFilter === 'mention' ? 'active' : ''}
          onClick={this.onClick('mention')}
          title={intl.formatMessage(tooltips.mentions)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 70..76
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 77..83
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 84..90
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 91..97
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 98..104

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

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

        <button
          className={selectedFilter === 'poll' ? 'active' : ''}
          onClick={this.onClick('poll')}
          title={intl.formatMessage(tooltips.polls)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 63..69
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 70..76
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 77..83
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 91..97
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 98..104

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

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

        <button
          className={selectedFilter === 'follow' ? 'active' : ''}
          onClick={this.onClick('follow')}
          title={intl.formatMessage(tooltips.follows)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 63..69
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 70..76
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 77..83
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 84..90
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 91..97

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

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

        <button
          className={selectedFilter === 'favourite' ? 'active' : ''}
          onClick={this.onClick('favourite')}
          title={intl.formatMessage(tooltips.favourites)}
        >
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 63..69
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 77..83
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 84..90
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 91..97
app/javascript/mastodon/features/notifications/components/filter_bar.js on lines 98..104

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

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

        <Button secondary onClick={this.handleBlockClick}>{!account.getIn(['relationship', 'blocking']) ? <FormattedMessage id='report.block' defaultMessage='Block' /> : <FormattedMessage id='account.blocked' defaultMessage='Blocked' />}</Button>
Severity: Major
Found in app/javascript/mastodon/features/report/thanks.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/report/thanks.js on lines 67..67

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

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

  seekBy (time) {
    const currentTime = this.audio.currentTime + time;

    if (!isNaN(currentTime)) {
      this.setState({ currentTime }, () => {
Severity: Major
Found in app/javascript/mastodon/features/audio/index.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/video/index.js on lines 276..284

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

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

        <Button secondary onClick={this.handleMuteClick}>{!account.getIn(['relationship', 'muting']) ? <FormattedMessage id='report.mute' defaultMessage='Mute' /> : <FormattedMessage id='account.muted' defaultMessage='Muted' />}</Button>
Severity: Major
Found in app/javascript/mastodon/features/report/thanks.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/report/thanks.js on lines 73..73

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

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

  seekBy (time) {
    const currentTime = this.video.currentTime + time;

    if (!isNaN(currentTime)) {
      this.setState({ currentTime }, () => {
Severity: Major
Found in app/javascript/mastodon/features/video/index.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/audio/index.js on lines 414..422

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

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

              <tr>
                <td><kbd>up</kbd>, <kbd>k</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.up' defaultMessage='to move up in the list' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>down</kbd>, <kbd>j</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.down' defaultMessage='to move down in the list' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>g</kbd>+<kbd>n</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.notifications' defaultMessage='to open notifications column' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>g</kbd>+<kbd>p</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.pinned' defaultMessage='to open pinned posts list' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>enter</kbd>, <kbd>o</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.enter' defaultMessage='to open status' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>g</kbd>+<kbd>l</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.local' defaultMessage='to open local timeline' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 87..90
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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

              <tr>
                <td><kbd>alt</kbd>+<kbd>n</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.toot' defaultMessage='to start a brand new post' /></td>
              </tr>
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 55..58
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 71..74
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 75..78
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 79..82
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 91..94
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 107..110
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 111..114
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 115..118
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 119..122
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 123..126
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 127..130
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 131..134
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 143..146
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 147..150
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 151..154

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

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