vegantech/sims

View on GitHub

Showing 433 of 433 total issues

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

Function Screen has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

var Screen = (function() {
    var screen = {};

    // Get a reference to the body
    // --------------------------------------------------------------------
Severity: Minor
Found in app/assets/javascripts/popup.js - About 6 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

function _getFormInputs( inputPattern ) {
    var inputs = new Array();
    for( var i = 0; i < document.forms.length; i++ ) {
        for( var j = 0; j < document.forms[i].elements.length; j++ ) {
            if( document.forms[i].elements[j].type.match( inputPattern )) {
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 438..448

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

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 _getFormInputs( inputPattern ) {
    var inputs = new Array();
    for( var i = 0; i < document.forms.length; i++ ) {
        for( var j = 0; j < document.forms[i].elements.length; j++ ) {
            if( document.forms[i].elements[j].type.match( inputPattern )) {
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 448..458

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

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

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

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

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

Refactorings

Further Reading

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

describe InterventionBuilder::GoalsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "intervention_builder/goals", :action => "index").should == "/intervention_builder/goals"
    end
pending-spec/routing-pending/district/flag_categories_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/schools_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/students_routing_spec.rb on lines 3..58
pending-spec/routing-pending/district/users_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/probes_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 200.

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

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

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

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

Refactorings

Further Reading

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

describe InterventionBuilder::ProbesController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "intervention_builder/probes", :action => "index").should == "/intervention_builder/probes"
    end
pending-spec/routing-pending/district/flag_categories_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/schools_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/students_routing_spec.rb on lines 3..58
pending-spec/routing-pending/district/users_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/goals_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 200.

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

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

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

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

Refactorings

Further Reading

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

describe District::StudentsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "district/students", :action => "index").should == "/district/students"
    end
pending-spec/routing-pending/district/flag_categories_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/schools_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/users_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/goals_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/probes_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 200.

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

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

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

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

Refactorings

Further Reading

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

describe District::FlagCategoriesController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "district/flag_categories", :action => "index").should == "/district/flag_categories"
    end
pending-spec/routing-pending/district/schools_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/students_routing_spec.rb on lines 3..58
pending-spec/routing-pending/district/users_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/goals_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/probes_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 200.

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

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

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

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

Refactorings

Further Reading

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

describe District::UsersController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "district/users", :action => "index").should == "/district/users"
    end
Severity: Major
Found in pending-spec/routing-pending/district/users_routing_spec.rb and 5 other locations - About 6 hrs to fix
pending-spec/routing-pending/district/flag_categories_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/schools_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/students_routing_spec.rb on lines 3..58
pending-spec/routing-pending/intervention_builder/goals_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/probes_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 200.

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

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

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

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

Refactorings

Further Reading

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

describe District::SchoolsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "district/schools", :action => "index").should == "/district/schools"
    end
pending-spec/routing-pending/district/flag_categories_routing_spec.rb on lines 3..56
pending-spec/routing-pending/district/students_routing_spec.rb on lines 3..58
pending-spec/routing-pending/district/users_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/goals_routing_spec.rb on lines 3..56
pending-spec/routing-pending/intervention_builder/probes_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 200.

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

describe PrincipalOverridesController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "principal_overrides", :action => "index").should == "/principal_overrides"
    end
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_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 199.

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

describe CustomFlagsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "custom_flags", :action => "index").should == "/custom_flags"
    end
Severity: Major
Found in pending-spec/routing-pending/custom_flags_routing_spec.rb and 6 other locations - About 6 hrs to fix
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_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 199.

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