cfpb/owning-a-home

View on GitHub

Showing 154 of 154 total issues

Function render has 515 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render: function() {
        var worksheet = this.state.worksheet || {};
        return (
          <div className="monthly-payment_worksheet">
            <section>
Severity: Major
Found in src/static/js/modules/monthly-payment-worksheet.js - About 2 days to fix

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

                          <fieldset>
                            <legend className="h5">
                              Pre-tax income
                            </legend>
                            <div className="content-l input-row">
    Severity: Major
    Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 2 days to fix
    src/static/js/modules/monthly-payment-worksheet.js on lines 90..127

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

    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

                          <fieldset>
                            <legend className="h5">
                              Take-home income
                            </legend>
                            <div className="content-l input-row">
    Severity: Major
    Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 2 days to fix
    src/static/js/modules/monthly-payment-worksheet.js on lines 51..87

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

    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

    File explore-rates.js has 851 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    'use strict';
    
    var $ = require( 'jquery' );
    var jQuery = $;
    require( 'highcharts' );
    Severity: Major
    Found in src/static/js/modules/explore-rates.js - About 2 days to fix

      Function exports has 388 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function( grunt ) {
      
        'use strict';
      
        var path = require( 'path' );
      Severity: Major
      Found in Gruntfile.js - About 1 day to fix

        Function createNewForm has 336 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function createNewForm( id, loanData ) {
        
          var loan = objectify( '#lc-input-' + id, [
            {
              name:   'amount-borrowed',
        Severity: Major
        Found in src/static/js/modules/formalize.js - About 1 day to fix

          File monthly-payment-worksheet.js has 550 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var React = require( 'react' );
          var $ = jQuery = require( 'jquery' );
          require( 'jquery.scrollto' );
          
          var InputUSD = require( './react-components/input-usd.jsx' );
          Severity: Major
          Found in src/static/js/modules/monthly-payment-worksheet.js - About 1 day to fix

            Function process_journey has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
            Open

            def process_journey(item):
            
                del item['comments']
                del item['date']
                custom_fields = item['custom_fields']
            Severity: Minor
            Found in src/_lib/wordpress_journey_processor.py - 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 Notifier has 158 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var Notifier = function(watching){
                var _listeners = [], _acceptLists = [], _updates = [], _updater = false, properties = [], values = [];
                  var self = this;
                  Object.defineProperty(self, '_watching', {
                              enumerable: true,
            Severity: Major
            Found in src/static/js/modules/object.observe-polyfill.js - About 6 hrs to fix

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="debtPayments">
                                          Debt payments
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="emergencySavings">
                                          Emergency savings
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="utilities">
                                          Utilities
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="longTermSavings">
                                          Long-term savings
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="condoHOA">
                                          Condo/HOA fees
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="homeMaintenance">
                                          Home maintenance
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="homeImprovement">
                                          Home improvement
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="livingExpenses">
                                          Living and other expenses
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="savings">
                                          Savings
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="homeownersInsurance">
                                          Annual homeowner's insurance
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 353..365
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378

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

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

                                    <div className="content-l input-row">
                                      <div className="label-col">
                                        <label htmlFor="homePrice">
                                          Home value
                                        </label>
              Severity: Major
              Found in src/static/js/modules/monthly-payment-worksheet.js and 11 other locations - About 5 hrs to fix
              src/static/js/modules/monthly-payment-worksheet.js on lines 147..159
              src/static/js/modules/monthly-payment-worksheet.js on lines 160..172
              src/static/js/modules/monthly-payment-worksheet.js on lines 173..185
              src/static/js/modules/monthly-payment-worksheet.js on lines 186..198
              src/static/js/modules/monthly-payment-worksheet.js on lines 232..244
              src/static/js/modules/monthly-payment-worksheet.js on lines 245..257
              src/static/js/modules/monthly-payment-worksheet.js on lines 277..289
              src/static/js/modules/monthly-payment-worksheet.js on lines 290..302
              src/static/js/modules/monthly-payment-worksheet.js on lines 303..315
              src/static/js/modules/monthly-payment-worksheet.js on lines 366..378
              src/static/js/modules/monthly-payment-worksheet.js on lines 379..391

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

              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