GregBrimble/cf-workers-dashboard

View on GitHub

Showing 55 of 91 total issues

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

                  <div className="lg:col-start-2">
                    <h4 className="text-2xl leading-8 font-extrabold text-gray-900 tracking-tight sm:text-3xl sm:leading-9">
                      WebSockets
                    </h4>
                    <p className="mt-3 text-lg leading-7 text-gray-500">
Severity: Major
Found in packages/client/src/pages/Home.tsx and 1 other location - About 2 days to fix
packages/client/src/pages/Home.tsx on lines 144..212

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

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="lg:col-start-2">
                    <h4 className="text-2xl leading-8 font-extrabold text-gray-900 tracking-tight sm:text-3xl sm:leading-9">
                      Editor
                    </h4>
                    <p className="mt-3 text-lg leading-7 text-gray-500">
Severity: Major
Found in packages/client/src/pages/Home.tsx and 1 other location - About 2 days to fix
packages/client/src/pages/Home.tsx on lines 330..399

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

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

      {
        x: [0, 0.25, 0.5, 0.75, 0.9, 0.99, 0.999, 1],
        y: [380, 1054, 1535, 1843, 2303.4, 3113.2, 3638.56, 3815].map(
          (y) => y / 1000
        ),
Severity: Major
Found in packages/client/src/components/home/ExampleAnalytics.tsx and 1 other location - About 2 hrs to fix
packages/client/src/components/home/ExampleAnalytics.tsx on lines 18..26

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

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

      {
        x: [0, 0.25, 0.5, 0.75, 0.9, 0.99, 0.999, 1],
        y: [201, 240.2, 609, 2800, 3732, 4678, 4800, 4900].map((y) => y / 1000),
        type: "scatter",
        name: "error",
Severity: Major
Found in packages/client/src/components/home/ExampleAnalytics.tsx and 1 other location - About 2 hrs to fix
packages/client/src/components/home/ExampleAnalytics.tsx on lines 7..17

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

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

                        <svg
                          className={classNames(
                            "h-6 w-6",
                            mobileMenuOpen ? "hidden" : "block"
                          )}
Severity: Major
Found in packages/client/src/pages/Container.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Container.tsx on lines 170..185

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

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

                        <svg
                          className={classNames(
                            "h-6 w-6",
                            mobileMenuOpen ? "block" : "hidden"
                          )}
Severity: Major
Found in packages/client/src/pages/Container.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Container.tsx on lines 154..169

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

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

          <h1 className="text-2xl font-bold flex leading-7 text-white sm:text-3xl sm:leading-9 sm:truncate">
            <LazyRender
              loading={loading}
              error={error}
              name="account"
Severity: Major
Found in packages/client/src/components/headings/AccountHeading.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Container.tsx on lines 216..224

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

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="mt-1 rounded-md shadow-sm">
                          <input
                            id="key"
                            type="text"
                            className="form-input block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5 font-mono"
Severity: Major
Found in packages/client/src/components/Settings.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/Settings.tsx on lines 185..195

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

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="mt-1 rounded-md shadow-sm">
                          <input
                            id="email_address"
                            type="email"
                            className="form-input block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5 font-mono"
Severity: Major
Found in packages/client/src/components/Settings.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/Settings.tsx on lines 202..210

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

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="mt-1 text-sm font-medium leading-none text-gray-400">
                        <LazyRender
                          loading={loading}
                          error={error}
                          name="user"
Severity: Major
Found in packages/client/src/pages/Container.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/headings/AccountHeading.tsx on lines 26..34

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

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="ml-5 flex-shrink-0">
                        <svg
                          className="h-5 w-5 text-gray-400"
                          fill="currentColor"
                          viewBox="0 0 20 20"
Severity: Major
Found in packages/client/src/pages/Accounts.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Workers.tsx on lines 94..106

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

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="ml-5 flex-shrink-0">
                          <svg
                            className="h-5 w-5 text-gray-400"
                            fill="currentColor"
                            viewBox="0 0 20 20"
Severity: Major
Found in packages/client/src/pages/Workers.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Accounts.tsx on lines 60..72

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

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

  const p25 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p25",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const p50 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p50",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const max = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "max",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68

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

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

  const p99 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p99",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const p75 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p75",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const p999 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p999",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const p90 = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "p90",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 13..20
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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

  const min = {
    x: [] as Date[],
    y: [] as number[],
    type: "scatter",
    name: "min",
Severity: Major
Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
packages/client/src/components/workers/Analytics.tsx on lines 21..28
packages/client/src/components/workers/Analytics.tsx on lines 29..36
packages/client/src/components/workers/Analytics.tsx on lines 37..44
packages/client/src/components/workers/Analytics.tsx on lines 45..52
packages/client/src/components/workers/Analytics.tsx on lines 53..60
packages/client/src/components/workers/Analytics.tsx on lines 61..68
packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

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