InsidersByte/honeymoon-gift-list

View on GitHub
public/components/SetupForm.jsx

Summary

Maintainability
B
5 hrs
Test Coverage

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

        <TextField
          name="password"
          type="password"
          floatingLabelText="Password"
          value={password}
Severity: Major
Found in public/components/SetupForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

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

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

        <TextField
          name="confirmPassword"
          type="password"
          floatingLabelText="Confirm Password"
          value={confirmPassword}
Severity: Major
Found in public/components/SetupForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 60..70
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

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

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

        <TextField
          name="email"
          type="email"
          floatingLabelText="Email"
          value={email}
Severity: Major
Found in public/components/SetupForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 60..70
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

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

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

const styles = {
  form: {
    padding: '30px 50px',
    marginBottom: 10,
  },
Severity: Major
Found in public/components/SetupForm.jsx and 2 other locations - About 1 hr to fix
public/components/SignUpForm.jsx on lines 21..35
public/components/WeddingProfileForm.jsx on lines 35..49

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

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

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

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

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

Refactorings

Further Reading

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

        <TextField name="name" floatingLabelText="Name" value={name} onChange={onChange} fullWidth style={styles.input} disabled={saving} required />
Severity: Major
Found in public/components/SetupForm.jsx and 6 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 63..72
public/components/GiverDetailsForm.jsx on lines 74..83
public/components/GiverDetailsForm.jsx on lines 97..106
public/components/SectionForm.jsx on lines 82..82
public/components/SignUpForm.jsx on lines 51..51
public/components/WeddingProfileForm.jsx on lines 118..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 55.

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