vegantech/sims

View on GitHub

Showing 210 of 433 total issues

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

function startCheck( wordWindowObj, controlWindowObj ) {

    // set properties from args
    this.wordWin = wordWindowObj;
    this.controlWin = controlWindowObj;
Severity: Major
Found in public/speller/spellChecker.js and 1 other location - About 7 hrs to fix
app/assets/javascripts/spellerpages/spellChecker.js on lines 102..124

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

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

function startCheck( wordWindowObj, controlWindowObj ) {

    // set properties from args
    this.wordWin = wordWindowObj;
    this.controlWin = controlWindowObj;
Severity: Major
Found in app/assets/javascripts/spellerpages/spellChecker.js and 1 other location - About 7 hrs to fix
public/speller/spellChecker.js on lines 92..114

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

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

function replaceWord() {
    var wi = this.currentWordIndex;
    var ti = this.currentTextIndex;
    if( !this.wordWin ) {
        alert( 'Error: Word frame not available.' );
Severity: Major
Found in public/speller/spellChecker.js and 1 other location - About 7 hrs to fix
app/assets/javascripts/spellerpages/spellChecker.js on lines 181..203

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

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

function replaceWord() {
    var wi = this.currentWordIndex;
    var ti = this.currentTextIndex;
    if( !this.wordWin ) {
        alert( 'Error: Word frame not available.' );
Severity: Major
Found in app/assets/javascripts/spellerpages/spellChecker.js and 1 other location - About 7 hrs to fix
public/speller/spellChecker.js on lines 171..193

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

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

describe Interventions::ParticipantsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "interventions/participants", :intervention_id => "2", :action => "index").should == "/interventions/2/participants"
    end
pending-spec/routing-pending/interventions/comments_routing_spec.rb on lines 3..56

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

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

describe Interventions::CommentsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "interventions/comments",:intervention_id => "2", :action => "index").should == "/interventions/2/comments"
    end
pending-spec/routing-pending/interventions/participants_routing_spec.rb on lines 3..56

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

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

describe FlagDescriptionsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "flag_descriptions", :action => "index").should == "/flag_descriptions"
    end
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe ConsultationFormsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "consultation_forms", :action => "index").should == "/consultation_forms"
    end
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe TiersController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "tiers", :action => "index").should == "/tiers"
    end
Severity: Major
Found in pending-spec/routing-pending/tiers_routing_spec.rb and 7 other locations - About 6 hrs to fix
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe SchoolTeamsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "school_teams", :action => "index").should == "/school_teams"
    end
Severity: Major
Found in pending-spec/routing-pending/school_teams_routing_spec.rb and 7 other locations - About 6 hrs to fix
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe TeamConsultationsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "team_consultations", :action => "index").should == "/team_consultations"
    end
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe ConsultationFormRequestsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "consultation_form_requests", :action => "index").should == "/consultation_form_requests"
    end
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe GroupedProgressEntriesController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "grouped_progress_entries", :action => "index").should == "/grouped_progress_entries"
    end
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/personal_groups_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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

describe PersonalGroupsController do
  describe "route generation" do
    it "maps #index" do
      route_for(:controller => "personal_groups", :action => "index").should == "/personal_groups"
    end
pending-spec/routing-pending/consultation_form_requests_routing_spec.rb on lines 3..60
pending-spec/routing-pending/consultation_forms_routing_spec.rb on lines 3..60
pending-spec/routing-pending/flag_descriptions_routing_spec.rb on lines 3..60
pending-spec/routing-pending/grouped_progress_entries_routing_spec.rb on lines 3..60
pending-spec/routing-pending/school_teams_routing_spec.rb on lines 3..60
pending-spec/routing-pending/team_consultations_routing_spec.rb on lines 3..60
pending-spec/routing-pending/tiers_routing_spec.rb on lines 3..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 215.

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 _getTotalReplaced() {
    var i_replaced = 0;
    for( var i = 0; i < this.wordFlags.length; i++ ) {
        for( var j = 0; j < this.wordFlags[i].length; j++ ) {
            if(( this.wordFlags[i][j] == this.replWordFlag )
Severity: Major
Found in public/speller/spellChecker.js and 1 other location - About 6 hrs to fix
app/assets/javascripts/spellerpages/spellChecker.js on lines 426..438

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

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 _getTotalReplaced() {
    var i_replaced = 0;
    for( var i = 0; i < this.wordFlags.length; i++ ) {
        for( var j = 0; j < this.wordFlags[i].length; j++ ) {
            if(( this.wordFlags[i][j] == this.replWordFlag )
Severity: Major
Found in app/assets/javascripts/spellerpages/spellChecker.js and 1 other location - About 6 hrs to fix
public/speller/spellChecker.js on lines 416..428

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

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

                        } else if ( kc == 38 ) {
                                // ctrl + up = next year
                                if( e.ctrlKey ) {
                                        d = new Date( o.date );
                                        d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() + 1)) );
Severity: Major
Found in app/assets/javascripts/datepicker.js and 1 other location - About 6 hrs to fix
app/assets/javascripts/datepicker.js on lines 167..176

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

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

                        } else if ( kc == 40 ) {
                                // ctrl + down = prev year
                                if( e.ctrlKey ) {
                                        d = new Date( o.date );
                                        d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() - 1)) );
Severity: Major
Found in app/assets/javascripts/datepicker.js and 1 other location - About 6 hrs to fix
app/assets/javascripts/datepicker.js on lines 158..176

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

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

                        } else if ( kc == 39 ) {
                                // ctrl + right = next month
                                if( e.ctrlKey ) {
                                        d = new Date( o.date );
                                        d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() + 1,d.getFullYear())) );
Severity: Major
Found in app/assets/javascripts/datepicker.js and 1 other location - About 6 hrs to fix
app/assets/javascripts/datepicker.js on lines 140..176

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

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

                        if ( kc == 37 ) {
                                // ctrl + left = previous month
                                if( e.ctrlKey ) {
                                        d = new Date( o.date );
                                        d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() - 1,d.getFullYear())) );
Severity: Major
Found in app/assets/javascripts/datepicker.js and 1 other location - About 6 hrs to fix
app/assets/javascripts/datepicker.js on lines 149..176

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

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