Showing 63 of 163 total issues

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

const CopyIcon = () => (
  <svg
    width="24"
    height="24"
    viewBox="0 0 24 24"
Severity: Major
Found in app/javascript/article-form/components/ClipboardButton.jsx and 5 other locations - About 2 hrs to fix
app/javascript/chat/ChatChannelSettings/MembershipManager/InvitationLinkManager.jsx on lines 8..21
app/javascript/article-form/components/Close.jsx on lines 5..18
app/javascript/article-form/components/EditorActions.jsx on lines 7..20
app/javascript/article-form/components/ImageUploader.jsx on lines 10..23
app/javascript/crayons/Modal/Modal.jsx on lines 20..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 87.

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

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

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

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

Refactorings

Further Reading

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

const CopyIcon = () => (
  <svg
    width="24"
    height="24"
    viewBox="0 0 24 24"
app/javascript/article-form/components/ClipboardButton.jsx on lines 9..22
app/javascript/article-form/components/Close.jsx on lines 5..18
app/javascript/article-form/components/EditorActions.jsx on lines 7..20
app/javascript/article-form/components/ImageUploader.jsx on lines 10..23
app/javascript/crayons/Modal/Modal.jsx on lines 20..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 87.

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

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

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

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

Refactorings

Further Reading

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

  const Icon = () => (
    <svg
      width="24"
      height="24"
      viewBox="0 0 24 24"
Severity: Major
Found in app/javascript/article-form/components/Close.jsx and 5 other locations - About 2 hrs to fix
app/javascript/chat/ChatChannelSettings/MembershipManager/InvitationLinkManager.jsx on lines 8..21
app/javascript/article-form/components/ClipboardButton.jsx on lines 9..22
app/javascript/article-form/components/EditorActions.jsx on lines 7..20
app/javascript/article-form/components/ImageUploader.jsx on lines 10..23
app/javascript/crayons/Modal/Modal.jsx on lines 20..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 87.

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

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

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

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

Refactorings

Further Reading

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

const CloseIcon = () => (
  <svg
    width="24"
    height="24"
    viewBox="0 0 24 24"
Severity: Major
Found in app/javascript/crayons/Modal/Modal.jsx and 5 other locations - About 2 hrs to fix
app/javascript/chat/ChatChannelSettings/MembershipManager/InvitationLinkManager.jsx on lines 8..21
app/javascript/article-form/components/ClipboardButton.jsx on lines 9..22
app/javascript/article-form/components/Close.jsx on lines 5..18
app/javascript/article-form/components/EditorActions.jsx on lines 7..20
app/javascript/article-form/components/ImageUploader.jsx on lines 10..23

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

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

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

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

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

Refactorings

Further Reading

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

const Icon = () => (
  <svg
    width="24"
    className="crayons-icon"
    height="24"
Severity: Major
Found in app/javascript/article-form/components/EditorActions.jsx and 5 other locations - About 2 hrs to fix
app/javascript/chat/ChatChannelSettings/MembershipManager/InvitationLinkManager.jsx on lines 8..21
app/javascript/article-form/components/ClipboardButton.jsx on lines 9..22
app/javascript/article-form/components/Close.jsx on lines 5..18
app/javascript/article-form/components/ImageUploader.jsx on lines 10..23
app/javascript/crayons/Modal/Modal.jsx on lines 20..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 87.

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

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

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

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

Refactorings

Further Reading

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

const ImageIcon = () => (
  <svg
    width="24"
    height="24"
    viewBox="0 0 24 24"
Severity: Major
Found in app/javascript/article-form/components/ImageUploader.jsx and 5 other locations - About 2 hrs to fix
app/javascript/chat/ChatChannelSettings/MembershipManager/InvitationLinkManager.jsx on lines 8..21
app/javascript/article-form/components/ClipboardButton.jsx on lines 9..22
app/javascript/article-form/components/Close.jsx on lines 5..18
app/javascript/article-form/components/EditorActions.jsx on lines 7..20
app/javascript/crayons/Modal/Modal.jsx on lines 20..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 87.

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

FollowUsers.propTypes = {
  prev: PropTypes.func.isRequired,
  next: PropTypes.string.isRequired,
  slidesCount: PropTypes.number.isRequired,
  currentSlideIndex: PropTypes.func.isRequired,
Severity: Major
Found in app/javascript/onboarding/components/FollowUsers.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190

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

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

ListingForm.propTypes = {
  listing: PropTypes.string.isRequired,
  categoriesForDetails: PropTypes.string.isRequired,
  categoriesForSelect: PropTypes.string.isRequired,
  organizations: PropTypes.string.isRequired,
Severity: Major
Found in app/javascript/listings/listingForm.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

EmailPreferencesForm.propTypes = {
  prev: PropTypes.func.isRequired,
  next: PropTypes.string.isRequired,
  slidesCount: PropTypes.number.isRequired,
  currentSlideIndex: PropTypes.func.isRequired,
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

SingleRepo.propTypes = {
  name: PropTypes.string.isRequired,
  githubIdCode: PropTypes.number.isRequired,
  fork: PropTypes.bool.isRequired,
  featured: PropTypes.bool.isRequired,
Severity: Major
Found in app/javascript/githubRepos/singleRepo.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

FollowTags.propTypes = {
  prev: PropTypes.func.isRequired,
  next: PropTypes.string.isRequired,
  slidesCount: PropTypes.number.isRequired,
  currentSlideIndex: PropTypes.func.isRequired,
Severity: Major
Found in app/javascript/onboarding/components/FollowTags.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

EditorBody.propTypes = {
  onChange: PropTypes.func.isRequired,
  defaultValue: PropTypes.string.isRequired,
  switchHelpContext: PropTypes.func.isRequired,
  version: PropTypes.string.isRequired,
Severity: Major
Found in app/javascript/article-form/components/EditorBody.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

SearchForm.propTypes = {
  searchTerm: PropTypes.string.isRequired,
  searchBoxId: PropTypes.string.isRequired,
  onSearch: PropTypes.func.isRequired,
  onSubmitSearch: PropTypes.func.isRequired,
Severity: Major
Found in app/javascript/Search/SearchForm.jsx and 7 other locations - About 1 hr to fix
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/article-form/components/Help.jsx on lines 312..317
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

Help.propTypes = {
  previewShowing: PropTypes.bool.isRequired,
  helpFor: PropTypes.string.isRequired,
  helpPosition: PropTypes.string.isRequired,
  version: PropTypes.string.isRequired,
Severity: Major
Found in app/javascript/article-form/components/Help.jsx and 7 other locations - About 1 hr to fix
app/javascript/Search/SearchForm.jsx on lines 31..36
app/javascript/article-form/components/EditorBody.jsx on lines 83..88
app/javascript/githubRepos/singleRepo.jsx on lines 90..95
app/javascript/listings/listingForm.jsx on lines 144..149
app/javascript/onboarding/components/EmailPreferencesForm.jsx on lines 114..119
app/javascript/onboarding/components/FollowTags.jsx on lines 185..190
app/javascript/onboarding/components/FollowUsers.jsx on lines 213..218

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

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

    if (document.getElementById('notifications-container')) {
      notificationsLink.blur();
      notificationsLink.classList.add('crayons-header__link--current');
    } else {
      notificationsLink.classList.remove('crayons-header__link--current');
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 13..18
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 19..24

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

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

    if (document.getElementById('moderation-page')) {
      moderationLink.blur();
      moderationLink.classList.add('crayons-header__link--current');
    } else {
      moderationLink.classList.remove('crayons-header__link--current');
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 7..12
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 13..18

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

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

    if (document.getElementById('chat')) {
      connectLink.blur();
      connectLink.classList.add('crayons-header__link--current');
    } else {
      connectLink.classList.remove('crayons-header__link--current');
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 7..12
app/assets/javascripts/initializers/initializeSpecialNavigationFunctionality.js on lines 19..24

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

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

                  <tr>
                    <td className="ff-monospace">*italics* or _italics_</td>
                    <td>
                      <em>italics</em>
                    </td>
Severity: Major
Found in app/javascript/article-form/components/Help.jsx and 2 other locations - About 1 hr to fix
app/javascript/article-form/components/Help.jsx on lines 164..169
app/javascript/article-form/components/Help.jsx on lines 207..212

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

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

                  <tr>
                    <td className="ff-monospace">`inline code`</td>
                    <td>
                      <code>inline code</code>
                    </td>
Severity: Major
Found in app/javascript/article-form/components/Help.jsx and 2 other locations - About 1 hr to fix
app/javascript/article-form/components/Help.jsx on lines 158..163
app/javascript/article-form/components/Help.jsx on lines 164..169

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

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

                  <tr>
                    <td className="ff-monospace">**bold**</td>
                    <td>
                      <strong>bold</strong>
                    </td>
Severity: Major
Found in app/javascript/article-form/components/Help.jsx and 2 other locations - About 1 hr to fix
app/javascript/article-form/components/Help.jsx on lines 158..163
app/javascript/article-form/components/Help.jsx on lines 207..212

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

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