glitch-soc/mastodon

View on GitHub

Showing 3,648 of 4,938 total issues

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

  const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']);
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 34..34
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 35..35
app/javascript/mastodon/features/community_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 33..33

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

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

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

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

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

Refactorings

Further Reading

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

  const onlyRemote = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyRemote']) : state.getIn(['settings', 'public', 'other', 'onlyRemote']);
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 34..34
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 35..35
app/javascript/mastodon/features/community_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 33..33

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
Severity: Major
Found in app/javascript/mastodon/components/inline_account.jsx and 7 other locations - About 55 mins to fix
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

  const allowLocalOnly = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'allowLocalOnly']) : state.getIn(['settings', 'public', 'other', 'allowLocalOnly']);
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 35..35
app/javascript/mastodon/features/community_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 33..33

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

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

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

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

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

Refactorings

Further Reading

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

  const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']);
Severity: Major
Found in app/javascript/mastodon/features/public_timeline/index.jsx and 8 other locations - About 55 mins to fix
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/community_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 32..32
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 33..33
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 34..34
app/javascript/flavours/glitch/features/public_timeline/index.jsx on lines 35..35
app/javascript/mastodon/features/community_timeline/index.jsx on lines 32..32
app/javascript/mastodon/features/public_timeline/index.jsx on lines 33..33

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { id }) => ({
    account: getAccount(state, id),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
Severity: Major
Found in app/javascript/flavours/glitch/components/inline_account.jsx and 7 other locations - About 55 mins to fix
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { accountId }) => ({
    account: getAccount(state, accountId),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

const makeMapStateToProps = () => {
  const getAccount = makeGetAccount();

  const mapStateToProps = (state, { id }) => ({
    account: getAccount(state, id),
app/javascript/flavours/glitch/components/inline_account.jsx on lines 9..17
app/javascript/flavours/glitch/features/compose/containers/autosuggest_account_container.js on lines 6..14
app/javascript/flavours/glitch/features/list_adder/components/account.jsx on lines 11..19
app/javascript/flavours/glitch/features/ui/components/report_modal.jsx on lines 27..35
app/javascript/mastodon/components/inline_account.jsx on lines 9..17
app/javascript/mastodon/features/list_adder/components/account.jsx on lines 11..19
app/javascript/mastodon/features/ui/components/report_modal.jsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

          {signedIn && (<ColumnLink key='blocks' icon='ban' iconComponent={BlockIcon} text={intl.formatMessage(messages.blocks)} to='/blocks' />)}
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 55..55
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 56..56
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 58..58
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 60..60

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

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

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

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

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

Refactorings

Further Reading

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

          {signedIn && (<ColumnLink key='pinned' icon='thumb-tack' iconComponent={PushPinIcon} text={intl.formatMessage(messages.pins)} to='/pinned' />)}
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 55..55
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 58..58
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 59..59
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 60..60

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

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

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

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

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

Refactorings

Further Reading

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

          {signedIn && (<ColumnLink key='favourites' icon='star' iconComponent={StarIcon} text={intl.formatMessage(messages.favourites)} to='/favourites' />)}
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 56..56
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 58..58
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 59..59
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 60..60

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

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

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

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

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

Refactorings

Further Reading

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

          {signedIn && (<ColumnLink key='mutes' icon='volume-off' iconComponent={VolumeOffIcon} text={intl.formatMessage(messages.mutes)} to='/mutes' />)}
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 55..55
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 56..56
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 59..59
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 60..60

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

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

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

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

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

Refactorings

Further Reading

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

          {signedIn && (<ColumnLink key='domain_blocks' icon='minus-circle' iconComponent={BlockIcon} text={intl.formatMessage(messages.domain_blocks)} to='/domain_blocks' />)}
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 55..55
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 56..56
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 58..58
app/javascript/flavours/glitch/features/getting_started_misc/index.jsx on lines 59..59

Duplicated Code

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

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

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

Tuning

This issue has a mass of 54.

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

      if (getState().getIn(['local_settings', 'media', 'pop_in_player'])) {
        dispatch(deployPictureInPicture({statusId: status.get('id'), accountId: status.getIn(['account', 'id']), playerType: type, props: mediaProps}));
      }
Severity: Minor
Found in app/javascript/flavours/glitch/containers/status_container.js and 1 other location - About 55 mins to fix
app/javascript/mastodon/containers/status_container.jsx on lines 204..206

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

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 () {
    setTimeout(() => this.props.dispatch(fetchAnnouncements()), 700);
    this._checkIfReloadNeeded(false, this.props.isPartial);
  }
Severity: Minor
Found in app/javascript/mastodon/features/home_timeline/index.jsx and 1 other location - About 55 mins to fix
app/javascript/flavours/glitch/features/home_timeline/index.jsx on lines 86..89

Duplicated Code

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

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

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

Tuning

This issue has a mass of 54.

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

    if (visible) {
      document.body.classList.add('with-modals--active');
      document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;
    } else {
      document.body.classList.remove('with-modals--active');
Severity: Minor
Found in app/javascript/mastodon/features/ui/components/modal_root.jsx and 1 other location - About 55 mins to fix
app/javascript/flavours/glitch/features/ui/components/modal_root.jsx on lines 101..107

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

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