hyper-tuner/hyper-tuner-cloud

View on GitHub

Showing 212 of 214 total issues

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

          <Route
            path={Routes.TUNE_LOGS_FILE}
            element={<ContentFor marginLeft={margin} element={<Logs />} />}
          />
Severity: Major
Found in src/App.tsx and 3 other locations - About 50 mins to fix
src/App.tsx on lines 247..250
src/App.tsx on lines 255..258
src/App.tsx on lines 259..262

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

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

export const camelToUrlCase = (str: string) =>
  str.replace(/[A-Z]/g, (letter: string) => `-${letter.toLowerCase()}`);
Severity: Minor
Found in src/utils/string.ts and 1 other location - About 50 mins to fix
src/utils/string.ts on lines 1..2

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

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 findDatalog = (config: ConfigType, name: string): DatalogEntry => {
  const result = config.datalog[name];

  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
  if (!result) {
Severity: Minor
Found in src/hooks/useConfig.ts and 1 other location - About 50 mins to fix
src/hooks/useConfig.ts on lines 24..33

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

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

export const camelToSnakeCase = (str: string) =>
  str.replace(/[A-Z]/g, (letter: string) => `_${letter.toLowerCase()}`);
Severity: Minor
Found in src/utils/string.ts and 1 other location - About 50 mins to fix
src/utils/string.ts on lines 4..5

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

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 findOutputChannel = (config: ConfigType, name: string): OutputChannel | SimpleConstant => {
  const result = config.outputChannels[name];

  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
  if (!result) {
Severity: Minor
Found in src/hooks/useConfig.ts and 1 other location - About 50 mins to fix
src/hooks/useConfig.ts on lines 46..55

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

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

Function clamp has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    nRange: number,
    nMin: number,
    nMax: number,
    fRange: number,
    fMin: number,
Severity: Minor
Found in src/utils/uPlot/mouseZoomPlugin.ts - About 45 mins to fix

    Function SideBar has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    const SideBar = ({
      config,
      tune,
      ui,
      navigation,
    Severity: Minor
    Found in src/components/Tune/SideBar.tsx - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    const resetFailed = (err: Error) => {
      notification.error({
        message: 'Password reset 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 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 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 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 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 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 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 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 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 profileUpdateFailed = (err: Error) => {
      notification.error({
        message: 'Unable to update your profile',
        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 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 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

    Function prepareConstDeclarations has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    export const prepareConstDeclarations = (
      tuneConstants: TuneConstantsType,
      configPages: ConfigPageType[],
    ) =>
      Object.keys(tuneConstants)
    Severity: Minor
    Found in src/utils/tune/expression.ts - About 35 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function ResultItem has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

      (
        {
          action,
          active,
          currentRootActionId,
    Severity: Minor
    Found in src/components/CommandPalette.tsx - About 35 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Severity
    Category
    Status
    Source
    Language