hyper-tuner/hyper-tuner-cloud

View on GitHub

Showing 133 of 214 total issues

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

const databaseGenericError = (err: Error) => {
  notification.error({
    message: 'Database Error',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 160..166

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

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

const sendingEmailVerificationFailed = (err: Error) => {
  notification.success({
    message: 'Sending verification email failed',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 152..158
src/pages/auth/notifications.ts on lines 160..166

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

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

const logInFailed = (err: Error) => {
  notification.error({
    message: 'Failed to log in',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 152..158
src/pages/auth/notifications.ts on lines 160..166

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

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

const signUpFailed = (err: Error) => {
  notification.error({
    message: 'Failed to create an account',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 152..158
src/pages/auth/notifications.ts on lines 160..166

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

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

const passwordUpdateFailed = (err: Error) => {
  notification.error({
    message: 'Unable to change your password',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 152..158
src/pages/auth/notifications.ts on lines 160..166

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

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

const emailVerificationFailed = (err: Error) => {
  notification.error({
    message: 'Email verification failed',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 152..158
src/pages/auth/notifications.ts on lines 160..166

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

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

const iniLoadingError = (err: Error) => {
  notification.error({
    message: 'INI not found',
    description: err.message,
    ...baseOptions,
Severity: Major
Found in src/pages/auth/notifications.ts and 8 other locations - About 40 mins to fix
src/pages/auth/notifications.ts on lines 34..40
src/pages/auth/notifications.ts on lines 49..55
src/pages/auth/notifications.ts on lines 80..86
src/pages/auth/notifications.ts on lines 88..94
src/pages/auth/notifications.ts on lines 104..110
src/pages/auth/notifications.ts on lines 128..134
src/pages/auth/notifications.ts on lines 144..150
src/pages/auth/notifications.ts on lines 152..158

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

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

                          <Input
                            onChange={({ target }) => debounceSearch2(target.value)}
                            style={searchInputStyle}
                            placeholder="Search fields..."
                            allowClear
Severity: Minor
Found in src/pages/Logs.tsx and 1 other location - About 35 mins to fix
src/pages/Logs.tsx on lines 338..343

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

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

                      <Input
                        onChange={({ target }) => debounceSearch1(target.value)}
                        style={searchInputStyle}
                        placeholder="Search fields..."
                        allowClear
Severity: Minor
Found in src/pages/Logs.tsx and 1 other location - About 35 mins to fix
src/pages/Logs.tsx on lines 369..374

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

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

const mapStateToProps = (state: AppState) => ({
  ui: state.ui,
  status: state.status,
  tuneData: state.tuneData,
});
Severity: Minor
Found in src/App.tsx and 1 other location - About 30 mins to fix
src/components/StatusBar.tsx on lines 11..15

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

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

        <UplotReact
          key={`second-${selectedFields2.join('-')}`}
          options={options2}
          data={plotData2}
        />
Severity: Minor
Found in src/components/Logs/LogCanvas.tsx and 1 other location - About 30 mins to fix
src/components/Logs/LogCanvas.tsx on lines 182..182

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

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

const mapStateToProps = (state: AppState) => ({
  status: state.status,
  config: state.config,
  tune: state.tune,
});
Severity: Minor
Found in src/components/StatusBar.tsx and 1 other location - About 30 mins to fix
src/App.tsx on lines 56..60

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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

      <UplotReact key={`first-${selectedFields1.join('-')}`} options={options1} data={plotData1} />
Severity: Minor
Found in src/components/Logs/LogCanvas.tsx and 1 other location - About 30 mins to fix
src/components/Logs/LogCanvas.tsx on lines 184..188

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

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