crewmate/crewmate

View on GitHub

Showing 148 of 358 total issues

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

    {
      actions.removeClassName('loading');
      actions.down('span.loading').hide();
      actions.down('span.actiondate').show();    
    }
Severity: Minor
Found in app/javascripts/actions.js and 1 other location - About 45 mins to fix
app/javascripts/actions.js on lines 17..21

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

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', 'a.inline_form_create_cancel', function(e, el) {
  e.stop();
  ToggleForm.handleCancelForm(el.up('form')); // hide form
});
Severity: Minor
Found in app/javascripts/toggleform.js and 1 other location - About 45 mins to fix
app/javascripts/toggleform.js on lines 125..128

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

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', 'a.inline_form_update_cancel', function(e, el) {
  e.stop();
  ToggleForm.handleCancelForm(el.up('form')); // hide form
});
Severity: Minor
Found in app/javascripts/toggleform.js and 1 other location - About 45 mins to fix
app/javascripts/toggleform.js on lines 119..122

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

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

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

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

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

Refactorings

Further Reading

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

    respond_to do |format|
      format.html { redirect_to projects_path }
      format.js { render :layout => false }
      format.xml  { render :xml     => @activities.to_xml }
      format.json { render :as_json => @activities.to_xml }
Severity: Minor
Found in app/controllers/activities_controller.rb and 1 other location - About 45 mins to fix
app/controllers/activities_controller.rb on lines 39..44

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

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

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

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

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

Refactorings

Further Reading

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

    respond_to do |format|
      format.html { redirect_to projects_path }
      format.js   { render :layout  => false }
      format.xml  { render :xml     => @activities.to_xml }
      format.json { render :as_json => @activities.to_xml }
Severity: Minor
Found in app/controllers/activities_controller.rb and 1 other location - About 45 mins to fix
app/controllers/activities_controller.rb on lines 53..58

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

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 filter_project_dropdown(target_id)
    options = [[t('hours.filter_project.all'),     0]]
    options += [['--------', 'divider']]
    options += current_user.projects.sort_by(&:name).collect { |p| [p.name, p.id] }
    select(:hours_project_filter, :assigned, options, :disabled => 'divider', :id => target_id)
Severity: Minor
Found in app/helpers/calendars_helper.rb and 1 other location - About 45 mins to fix
app/helpers/calendars_helper.rb on lines 294..298

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

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 filter_organization_dropdown(target_id)
    options = [[t('hours.filter_organization.all'),     0]]
    options += [['--------', 'divider']]
    options += current_user.organizations.sort_by(&:name).collect { |p| [p.name, p.id] }
    select(:hours_organization_filter, :assigned, options, :disabled => 'divider', :id => target_id)
Severity: Minor
Found in app/helpers/calendars_helper.rb and 1 other location - About 45 mins to fix
app/helpers/calendars_helper.rb on lines 287..291

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("M T W T F S S");
} else {
    Date.weekdays = $w("S M T W T F S");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/en.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("L Ma Me J V S D");
} else {
    Date.weekdays = $w("D L Ma Me J V S");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/fr.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("Ma Ti Ke To Pe La Su");
} else {
    Date.weekdays = $w("Su Ma Ti Ke To Pe La");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/fi.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("Lu Ma Mi Ju Vi Sa Do");
} else {
    Date.weekdays = $w("Do Lu Ma Mi Ju Vi Sa");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/es.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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', 'a.unarchive_task_list_link', function(e, el) {
  e.stop();
  TaskList.unarchive(el, el.readAttribute('action_url'));
});
Severity: Minor
Found in app/javascripts/task_list.js and 1 other location - About 40 mins to fix
app/javascripts/task_list.js on lines 330..333

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("Пн Вт Ср Чт Пт Сб Вс");
} else {
    Date.weekdays = $w("Вс Пн Вт Ср Чт Пт Сб");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/ru.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("P W Ś C P S N");
} else {
    Date.weekdays = $w("N P W Ś C P S");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/pl.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w('Mo Di Mi Do Fr Sa So');
} else {
    Date.weekdays = $w('So Mo Di Mi Do Fr Sa');
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/de.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/pt.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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

if (Date.first_day_of_week == 1) {
    Date.weekdays = $w("D S T Q Q S S");
} else {
    Date.weekdays = $w("S D S T Q Q S");
}
Severity: Major
Found in public/javascripts/calendar_date_select/locale/pt.js and 7 other locations - About 40 mins to fix
public/javascripts/calendar_date_select/locale/de.js on lines 1..5
public/javascripts/calendar_date_select/locale/en.js on lines 1..5
public/javascripts/calendar_date_select/locale/es.js on lines 1..5
public/javascripts/calendar_date_select/locale/fi.js on lines 1..5
public/javascripts/calendar_date_select/locale/fr.js on lines 1..5
public/javascripts/calendar_date_select/locale/pl.js on lines 1..5
public/javascripts/calendar_date_select/locale/ru.js on lines 1..5

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

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', 'a.taskListUpdate', function(e, el) {
  e.stop();
  TaskList.updateForm(el, el.readAttribute('href'));
});
Severity: Minor
Found in app/javascripts/task_list.js and 1 other location - About 40 mins to fix
app/javascripts/task_list.js on lines 359..362

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

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

  str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear();
Severity: Minor
Found in public/javascripts/calendar_date_select/format_italian.js and 1 other location - About 40 mins to fix
public/javascripts/calendar_date_select/format_finnish.js on lines 6..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 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

  str = this.getDate() + "." + (this.getMonth() + 1) + "." + this.getFullYear();
Severity: Minor
Found in public/javascripts/calendar_date_select/format_finnish.js and 1 other location - About 40 mins to fix
public/javascripts/calendar_date_select/format_italian.js on lines 5..5

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

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

  if (TaskList.in_sort) {
    setTimeout(function(){
      TaskList.setReorder(false);    
      TaskList.setReorder(true);
    }, 0);
Severity: Minor
Found in app/javascripts/task_list.js and 1 other location - About 40 mins to fix
app/javascripts/task_list.js on lines 291..296

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

Severity
Category
Status
Source
Language