GladysProject/Gladys

View on GitHub
front/src/routes/forgot-password/ForgotPasswordPage.jsx

Summary

Maintainability
C
1 day
Test Coverage

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

                      <Localizer>
                        <input
                          type="email"
                          class={cx('form-control', {
                            'is-invalid': props.forgotPasswordStatus === ForgotPasswordStatus.WrongEmailError
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 1 other location - About 3 hrs to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 53..63

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

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

                    <div class="form-footer">
                      <button
                        onClick={props.forgotPassword}
                        class="btn btn-primary btn-block"
                        disabled={props.forgotPasswordStatus === RequestStatus.Getting}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 3 other locations - About 2 hrs to fix
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 96..104
front/src/routes/scene/duplicate-scene/DuplicateScenePage.jsx on lines 83..91
front/src/routes/scene/new-scene/NewScenePage.jsx on lines 80..88

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

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

                {props.forgotPasswordStatus === RequestStatus.Success && (
                  <div class="alert alert-success" role="alert">
                    <Text id="forgotPassword.success" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

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

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

                {props.forgotPasswordStatus === ForgotPasswordStatus.UserNotFound && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.userNotFound" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

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

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

                {props.forgotPasswordStatus === RequestStatus.RateLimitError && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.rateLimitError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

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

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

                {props.forgotPasswordStatus === RequestStatus.NetworkError && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.networkError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 50..54
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

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

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

                {props.forgotPasswordStatus === RequestStatus.Error && (
                  <div class="alert alert-danger" role="alert">
                    <Text id="forgotPassword.unknownError" />
                  </div>
                )}
Severity: Major
Found in front/src/routes/forgot-password/ForgotPasswordPage.jsx and 12 other locations - About 55 mins to fix
front/src/components/gateway/GatewayLoginForm.jsx on lines 20..24
front/src/components/gateway/GatewayLoginForm.jsx on lines 25..29
front/src/components/gateway/GatewayLoginForm.jsx on lines 38..42
front/src/components/gateway/GatewayLoginForm.jsx on lines 43..47
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 32..36
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 38..42
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 44..48
front/src/routes/forgot-password/ForgotPasswordPage.jsx on lines 56..60
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 22..26
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 28..32
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 34..38
front/src/routes/reset-password/ResetPasswordForm.jsx on lines 40..44

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

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