mashirozx/mastodon

View on GitHub

Showing 1,785 of 1,785 total issues

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

              <tr>
                <td><kbd>g</kbd>+<kbd>f</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.favourites' defaultMessage='to open favourites 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 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>h</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.home' defaultMessage='to open home 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 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>s</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.start' defaultMessage='to open "get started" 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 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 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>1</kbd>-<kbd>9</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.column' defaultMessage='to focus a status in one of the columns' /></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 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>d</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.direct' defaultMessage='to open direct messages 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 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 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

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

              <tr>
                <td><kbd>g</kbd>+<kbd>u</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.my_profile' defaultMessage='to open your profile' /></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 135..138
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>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>g</kbd>+<kbd>b</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.blocked' defaultMessage='to open blocked users 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 135..138
app/javascript/mastodon/features/keyboard_shortcuts/index.js on lines 139..142
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>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>g</kbd>+<kbd>m</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.muted' defaultMessage='to open muted users 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 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 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>r</kbd></td>
                <td><FormattedMessage id='keyboard_shortcuts.requests' defaultMessage='to open follow requests 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 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

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

  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.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/audio/index.js on lines 229..234

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

  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.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/features/video/index.js on lines 224..229

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

  case STATUS_HIDE:
    return state.withMutations(map => {
      action.ids.forEach(id => {
        if (!(state.get(id) === undefined)) {
          map.setIn([id, 'hidden'], true);
Severity: Major
Found in app/javascript/mastodon/reducers/statuses.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/reducers/statuses.js on lines 63..70

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

  case STATUS_REVEAL:
    return state.withMutations(map => {
      action.ids.forEach(id => {
        if (!(state.get(id) === undefined)) {
          map.setIn([id, 'hidden'], false);
Severity: Major
Found in app/javascript/mastodon/reducers/statuses.js and 1 other location - About 2 hrs to fix
app/javascript/mastodon/reducers/statuses.js on lines 71..78

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

File language_dropdown.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import TextIconButton from './text_icon_button';
import Overlay from 'react-overlays/lib/Overlay';

    Function connectTimelineStream has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      connectStream(channelName, params, (dispatch, getState) => {
        const locale = getState().getIn(['meta', 'locale']);
    
        let pollingId;
    
    
    Severity: Major
    Found in app/javascript/mastodon/actions/streaming.js - About 2 hrs to fix
      Severity
      Category
      Status
      Source
      Language