TracksApp/tracks

View on GitHub

Showing 27 of 2,932 total issues

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-es.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-fr.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-fi.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-nb_NO.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-ru.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-nl.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-sv.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-tr.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-he.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-cs.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

( function( factory ) {
    "use strict";

    if ( typeof define === "function" && define.amd ) {

Severity: Major
Found in app/assets/javascripts-jquery-ui/datepicker-de.js and 10 other locations - About 1 day to fix
app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 241.

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

        onHide: function() { /* remove hightlight from todo */
            $(this.parent().parent().parent()).removeClass("sf-item-selected");
        }
Severity: Minor
Found in app/assets/javascripts/tracks_pages.js and 1 other location - About 40 mins to fix
app/assets/javascripts/tracks_pages.js on lines 137..139

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

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

        onBeforeShow: function() { /* highlight todo */
            $(this.parent().parent().parent()).addClass("sf-item-selected");
        },
Severity: Minor
Found in app/assets/javascripts/tracks_pages.js and 1 other location - About 40 mins to fix
app/assets/javascripts/tracks_pages.js on lines 140..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 48.

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

      format.xml do
        if @saved
          render :xml => @context.to_xml(:except => :user_id)
        else
          render :body => "Error on update: #{@context.errors.full_messages.inject("") { |v, e| v + e + " " }}", :status => 409
Severity: Minor
Found in app/controllers/contexts_controller.rb and 1 other location - About 30 mins to fix
app/controllers/projects_controller.rb on lines 249..254

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

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

      format.xml do
        if @saved
          render :xml => @project.to_xml(:except => :user_id)
        else
          render :body => "Error on update: #{@project.errors.full_messages.inject("") { |v, e| v + e + " " }}", :status => 409
Severity: Minor
Found in app/controllers/projects_controller.rb and 1 other location - About 30 mins to fix
app/controllers/contexts_controller.rb on lines 113..118

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

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

      page.project do
        container_id = project_container_empty_id(@original_item) if @remaining_in_context == 0
        container_id = "deferred_pending_container-empty-d" if todo_was_removed_from_deferred_or_blocked_container && @remaining_deferred_or_pending_count == 0
        container_id = "completed_container-empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
      end
Severity: Minor
Found in app/helpers/todos_helper.rb and 1 other location - About 25 mins to fix
app/helpers/todos_helper.rb on lines 674..678

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

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

      page.context do
        container_id = context_container_empty_id(@original_item) if @remaining_in_context == 0
        container_id = "deferred_pending_container-empty-d" if todo_was_removed_from_deferred_or_blocked_container && @remaining_deferred_or_pending_count == 0
        container_id = "completed_container-empty-d" if @completed_count && @completed_count == 0 && !@todo.completed?
      end
Severity: Minor
Found in app/helpers/todos_helper.rb and 1 other location - About 25 mins to fix
app/helpers/todos_helper.rb on lines 662..666

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

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

  def update_state_counts
    @active_contexts_count = current_user.contexts.active.count
    @hidden_contexts_count = current_user.contexts.hidden.count
    @closed_contexts_count = current_user.contexts.closed.count
    @show_active_contexts = @active_contexts_count > 0
Severity: Minor
Found in app/controllers/contexts_controller.rb and 1 other location - About 25 mins to fix
app/controllers/projects_controller.rb on lines 313..319

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

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

  def update_state_counts
    @active_projects_count = current_user.projects.active.count
    @hidden_projects_count = current_user.projects.hidden.count
    @completed_projects_count = current_user.projects.completed.count
    @show_active_projects = @active_projects_count > 0
Severity: Minor
Found in app/controllers/projects_controller.rb and 1 other location - About 25 mins to fix
app/controllers/contexts_controller.rb on lines 174..180

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

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

  def alphabetize
    @state = params['state']
    @projects = current_user.projects.alphabetize(:state => @state) if @state
    @contexts = current_user.contexts
    init_not_done_counts(['project'])
Severity: Minor
Found in app/controllers/projects_controller.rb and 1 other location - About 20 mins to fix
app/controllers/projects_controller.rb on lines 295..300

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

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