cfpb/owning-a-home

View on GitHub
src/static/js/modules/monthly-payment-worksheet.js

Summary

Maintainability
F
2 wks
Test Coverage

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

    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

      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

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

                            <div className="content-l input-row">
                              <div className="label-col">
                                <label htmlFor="propertyTax">
                                  Property tax rate (annual)
                                </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 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="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

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

                          <div className="total-row output-row summary-row">
                            <div className="content-l">
                              <div className="label-col">
                                <div className="label">
                                  Estimated monthly principal and interest
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 5 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 200..215

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

      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

                            <div className="total-row output-row">
                              <div className="content-l">
                                <div className="label-col">
                                  <div className="label">
                                    Total monthly spending and savings
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 5 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 530..544

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

      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

                          <div className="content-l output-row">
                            <div className="label-col">
                              <div className="label">Debts</div>
                            </div>
                            <div className="input-col">
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 3 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 437..446

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

      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

                          <div className="content-l output-row">
                            <div className="label-col">
                              <div className="label">Living expenses</div>
                            </div>
                            <div className="input-col">
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 1 other location - About 3 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 427..436

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

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

                          <div className="content-l output-row">
                            <div className="label-col">
                              <div className="label">Total available for monthly housing obligations</div>
                            </div>
                            <div className="input-col">
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 2 other locations - About 3 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 419..426
      src/static/js/modules/monthly-payment-worksheet.js on lines 509..518

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

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

                            <div className="content-l">
                              <div className="label-col">
                                <div className="label">
                                  Estimated total monthly payment*
                                </div>
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 2 other locations - About 3 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 419..426
      src/static/js/modules/monthly-payment-worksheet.js on lines 487..494

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

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

                          <div className="content-l output-row">
                            <div className="label-col">
                              <div className="label">Take-home income</div>
                            </div>
                            <div className="input-col">
      Severity: Major
      Found in src/static/js/modules/monthly-payment-worksheet.js and 2 other locations - About 3 hrs to fix
      src/static/js/modules/monthly-payment-worksheet.js on lines 487..494
      src/static/js/modules/monthly-payment-worksheet.js on lines 509..518

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

      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

      There are no issues that match your filters.

      Category
      Status