glitch-soc/mastodon

View on GitHub

Showing 3,648 of 4,938 total issues

Similar blocks of code found in 28 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/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

              <tr>
                <td><kbd>s</kbd>, <kbd>/</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></td>
              </tr>
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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 28 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/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

              <tr>
                <td><kbd>alt</kbd>+<kbd>x</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.spoilers' defaultMessage='to show/hide CW field' /></td>
              </tr>
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

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

  handleVolumeMouseUp = () => {
    document.removeEventListener('mousemove', this.handleMouseVolSlide, true);
    document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);
    document.removeEventListener('touchmove', this.handleMouseVolSlide, true);
    document.removeEventListener('touchend', this.handleVolumeMouseUp, true);
Severity: Major
Found in app/javascript/flavours/glitch/features/video/index.jsx and 3 other locations - About 2 hrs to fix
app/javascript/flavours/glitch/features/audio/index.jsx on lines 249..254
app/javascript/mastodon/features/audio/index.jsx on lines 243..248
app/javascript/mastodon/features/video/index.jsx on lines 218..223

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 28 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/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

              <tr>
                <td><kbd>alt</kbd>+<kbd>x</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.spoilers' defaultMessage='to show/hide CW field' /></td>
              </tr>
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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 28 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/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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 28 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/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 157..160
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

              <tr>
                <td><kbd>g</kbd>+<kbd>m</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.muted' defaultMessage='to open muted users list' /></td>
              </tr>
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 75..78
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 92..95
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 105..108
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 113..116
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 65..68
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 81..84
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 85..88
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 89..92
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 97..100
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 101..104
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 109..112
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 117..120
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 121..124
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 125..128
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 129..132
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 133..136
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 137..140
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 141..144
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 145..148
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 149..152
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 153..156
app/javascript/mastodon/features/keyboard_shortcuts/index.jsx on lines 161..164

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

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

  handleVolumeMouseUp = () => {
    document.removeEventListener('mousemove', this.handleMouseVolSlide, true);
    document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);
    document.removeEventListener('touchmove', this.handleMouseVolSlide, true);
    document.removeEventListener('touchend', this.handleVolumeMouseUp, true);
Severity: Major
Found in app/javascript/flavours/glitch/features/audio/index.jsx and 3 other locations - About 2 hrs to fix
app/javascript/flavours/glitch/features/video/index.jsx on lines 221..226
app/javascript/mastodon/features/audio/index.jsx on lines 243..248
app/javascript/mastodon/features/video/index.jsx on lines 218..223

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

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

  handleVolumeMouseUp = () => {
    document.removeEventListener('mousemove', this.handleMouseVolSlide, true);
    document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);
    document.removeEventListener('touchmove', this.handleMouseVolSlide, true);
    document.removeEventListener('touchend', this.handleVolumeMouseUp, true);
Severity: Major
Found in app/javascript/mastodon/features/audio/index.jsx and 3 other locations - About 2 hrs to fix
app/javascript/flavours/glitch/features/audio/index.jsx on lines 249..254
app/javascript/flavours/glitch/features/video/index.jsx on lines 221..226
app/javascript/mastodon/features/video/index.jsx on lines 218..223

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

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

  handleVolumeMouseUp = () => {
    document.removeEventListener('mousemove', this.handleMouseVolSlide, true);
    document.removeEventListener('mouseup', this.handleVolumeMouseUp, true);
    document.removeEventListener('touchmove', this.handleMouseVolSlide, true);
    document.removeEventListener('touchend', this.handleVolumeMouseUp, true);
Severity: Major
Found in app/javascript/mastodon/features/video/index.jsx and 3 other locations - About 2 hrs to fix
app/javascript/flavours/glitch/features/audio/index.jsx on lines 249..254
app/javascript/flavours/glitch/features/video/index.jsx on lines 221..226
app/javascript/mastodon/features/audio/index.jsx on lines 243..248

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

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

export const navigateToProfile = (accountId) => {
  return (_dispatch, getState) => {
    const acct = getState().accounts.getIn([accountId, 'acct']);
  
    if (acct) {
Severity: Major
Found in app/javascript/flavours/glitch/actions/accounts.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/actions/accounts.js on lines 682..690

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

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

  componentDidMount () {
    const { dispatch, suggestions, history } = this.props;

    // If we're navigating back to the screen, do not trigger a reload
    if (history.action === 'POP' && suggestions.size > 0) {
app/javascript/mastodon/features/explore/suggestions.jsx on lines 31..40

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

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

NotificationRequest.propTypes = {
  id: PropTypes.string.isRequired,
  accountId: PropTypes.string.isRequired,
  notificationsCount: PropTypes.string.isRequired,
  checked: PropTypes.bool,
app/javascript/flavours/glitch/features/notifications/components/notification_request.jsx on lines 120..127

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

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

export const hydrateSearch = () => (dispatch, getState) => {
  const me = getState().getIn(['meta', 'me']);
  const history = searchHistory.get(me);

  if (history !== null) {
Severity: Major
Found in app/javascript/mastodon/actions/search.js and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/actions/search.js on lines 208..215

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

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

NotificationRequest.propTypes = {
  id: PropTypes.string.isRequired,
  accountId: PropTypes.string.isRequired,
  notificationsCount: PropTypes.string.isRequired,
  checked: PropTypes.bool,
app/javascript/mastodon/features/notifications/components/notification_request.jsx on lines 120..127

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

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

const filterContexts = (state, relationship, statuses) => {
  const ownedStatusIds = statuses
    .filter(status => status.get('account') === relationship.id)
    .map(status => status.get('id'));

Severity: Major
Found in app/javascript/mastodon/reducers/contexts.js and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/reducers/contexts.js on lines 71..77

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

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

const normalizeFollowRequest = (state, notification) => {
  return state.updateIn(['follow_requests', 'items'], list => {
    return list.filterNot(item => item === notification.account.id).unshift(notification.account.id);
  });
};
Severity: Major
Found in app/javascript/mastodon/reducers/user_lists.js and 1 other location - About 2 hrs to fix
app/javascript/flavours/glitch/reducers/user_lists.js on lines 98..102

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