vegantech/sims

View on GitHub

Showing 433 of 433 total issues

Function CSS has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
Open

var CSS = (function(){
    var css = {};

    // Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
    css.rgb2hex = function(rgbString) {
Severity: Minor
Found in app/assets/javascripts/popup.js - About 1 day 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

File tablesort.js has 616 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
        TableSort revisited v5.0 by frequency-decoder.com

        Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/)
Severity: Major
Found in app/assets/javascripts/tablesort.js - About 1 day to fix

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

    function setText( textIndex, wordIndex, newText ) {
        var word = this._getWordObject( textIndex, wordIndex );
        var beginStr;
        var endStr;
        if( word ) {
    Severity: Major
    Found in app/assets/javascripts/spellerpages/wordWindow.js and 1 other location - About 1 day to fix
    public/speller/wordWindow.js on lines 109..133

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

    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 setText( textIndex, wordIndex, newText ) {
        var word = this._getWordObject( textIndex, wordIndex );
        var beginStr;
        var endStr;
        if( word ) {
    Severity: Major
    Found in public/speller/wordWindow.js and 1 other location - About 1 day to fix
    app/assets/javascripts/spellerpages/wordWindow.js on lines 109..133

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

    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 DOM has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

    var DOM = (function() { 
        var dom = {};
        
        // Get a parent tag with a given nodename
        dom.getParentByTagName = function(o,tagNames) {
    Severity: Minor
    Found in app/assets/javascripts/popup.js - About 1 day 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

    Function undo has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

    function undo() {
        // skip if this is the first word!
        var ti = this.currentTextIndex;
        var wi = this.currentWordIndex
        
    Severity: Minor
    Found in app/assets/javascripts/spellerpages/spellChecker.js - About 1 day 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

    Function undo has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

    function undo() {
        // skip if this is the first word!
        var ti = this.currentTextIndex;
        var wi = this.currentWordIndex
        
    Severity: Minor
    Found in public/speller/spellChecker.js - About 1 day 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 controlWindow( controlForm ) {
        // private properties
        this._form = controlForm;
    
        // public properties
    Severity: Major
    Found in app/assets/javascripts/spellerpages/controlWindow.js and 1 other location - About 1 day to fix
    public/speller/controlWindow.js on lines 4..25

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

    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 controlWindow( controlForm ) {
        // private properties
        this._form = controlForm;
    
        // public properties
    Severity: Major
    Found in public/speller/controlWindow.js and 1 other location - About 1 day to fix
    app/assets/javascripts/spellerpages/controlWindow.js on lines 4..25

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

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

    Severity
    Category
    Status
    Source
    Language