abkfenris/gage-web

View on GitHub

Showing 87 of 134 total issues

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

  function showProposal(id) {
    $('#sp' + id).hide();
    $('#hp' + id).show();
    $('#pr' + id).slideDown('fast');
  }
Severity: Major
Found in doc/dead/html/_static/websupport.js and 1 other location - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 375..379

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

  function hideProposal(id) {
    $('#hp' + id).hide();
    $('#sp' + id).show();
    $('#pr' + id).slideUp('fast');
  }
Severity: Major
Found in doc/dead/html/_static/websupport.js and 1 other location - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 369..373

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 slug is None:
        gage = Gage.query.get_or_404(gid)
    else:
        gage = Gage.query.filter_by(slug=slug).first_or_404()
Severity: Major
Found in app/main/views.py and 2 other locations - About 1 hr to fix
app/main/views.py on lines 74..77
app/main/views.py on lines 139..142

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

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 slug is None:
        river = River.query.get_or_404(rid)
    else:
        river = River.query.filter_by(slug=slug).first_or_404()
Severity: Major
Found in app/main/views.py and 2 other locations - About 1 hr to fix
app/main/views.py on lines 50..53
app/main/views.py on lines 74..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 43.

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 slug is None:
        region = Region.query.get_or_404(rid)
    else:
        region = Region.query.filter_by(slug=slug).first_or_404()
Severity: Major
Found in app/main/views.py and 2 other locations - About 1 hr to fix
app/main/views.py on lines 50..53
app/main/views.py on lines 139..142

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

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

    $('a.show-proposal').live("click", function(event) {
      event.preventDefault();
      showProposal($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.close-reply').live("click", function(event) {
      event.preventDefault();
      closeReply($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.comment-markup').live("click", function(event) {
      event.preventDefault();
      toggleCommentMarkupBox($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96

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

    $('a.delete-comment').live("click", function(event) {
      event.preventDefault();
      deleteComment($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.comment-close').live("click", function(event) {
      event.preventDefault();
      hide($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.accept-comment').live("click", function(event) {
      event.preventDefault();
      acceptComment($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.reply').live("click", function(event) {
      event.preventDefault();
      openReply($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.hide-propose-change').live("click", function(event) {
      event.preventDefault();
      hideProposeChange($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.show-propose-change').live("click", function(event) {
      event.preventDefault();
      showProposeChange($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 77..80
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $('a.hide-proposal').live("click", function(event) {
      event.preventDefault();
      hideProposal($(this).attr('id').substring(2));
    });
Severity: Major
Found in doc/dead/html/_static/websupport.js and 9 other locations - About 1 hr to fix
doc/dead/html/_static/websupport.js on lines 53..56
doc/dead/html/_static/websupport.js on lines 61..64
doc/dead/html/_static/websupport.js on lines 65..68
doc/dead/html/_static/websupport.js on lines 73..76
doc/dead/html/_static/websupport.js on lines 81..84
doc/dead/html/_static/websupport.js on lines 85..88
doc/dead/html/_static/websupport.js on lines 89..92
doc/dead/html/_static/websupport.js on lines 93..96
doc/dead/html/_static/websupport.js on lines 97..100

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

    $(document).on('click', "[data-toggle='wy-nav-top']", function() {
      $("[data-toggle='wy-nav-shift']").toggleClass("shift");
      $("[data-toggle='rst-versions']").toggleClass("shift");
    });
Severity: Major
Found in doc/dead/html/_static/js/theme.js and 1 other location - About 1 hr to fix
doc/_build/html/_static/js/theme.js on lines 11..14

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

    $(document).on('click', "[data-toggle='wy-nav-top']", function() {
        $("[data-toggle='wy-nav-shift']").toggleClass("shift");
        $("[data-toggle='rst-versions']").toggleClass("shift");
    });
Severity: Major
Found in doc/_build/html/_static/js/theme.js and 1 other location - About 1 hr to fix
doc/dead/html/_static/js/theme.js on lines 3..6

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

  Tooltip.prototype.arrow = function () {
    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
  }
Severity: Minor
Found in app/static/js/bootstrap.js and 1 other location - About 55 mins to fix
app/static/js/bootstrap.js on lines 1495..1497

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

  Popover.prototype.arrow = function () {
    return this.$arrow = this.$arrow || this.tip().find('.arrow')
  }
Severity: Minor
Found in app/static/js/bootstrap.js and 1 other location - About 55 mins to fix
app/static/js/bootstrap.js on lines 1359..1361

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

@main.route('/sections/')
@main.route('/section/')
def sectionspage():
    """**/sections/**

Severity: Minor
Found in app/main/views.py and 1 other location - About 50 mins to fix
app/main/views.py on lines 57..64

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

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