Vizzuality/landgriffon

View on GitHub

Showing 1,408 of 1,408 total issues

Function getImpactRawDataPerSourcingRecordCached has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private async getImpactRawDataPerSourcingRecordCached(
    indicators: INDICATOR_NAME_CODES[],
    materialId: string,
    geoRegionId: string,
    adminRegionId: string,

    Function How has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const How: React.FC = () => {
      return (
        <section className="relative z-10 py-32 bg-blue-600 bg-cover md:py-64 lg:-mt-20">
          <Wrapper>
            <div className="max-w-2xl mx-auto space-y-10 text-center text-white md:space-y-20">
    Severity: Minor
    Found in marketing/src/containers/about/how/component.tsx - About 1 hr to fix

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

      export class CachedDataModule {}
      Severity: Major
      Found in api/src/modules/cached-data/cached-data.module.ts and 6 other locations - About 1 hr to fix
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class TargetsModule {}
      Severity: Major
      Found in api/src/modules/targets/targets.module.ts and 6 other locations - About 1 hr to fix
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class SourcingLocationGroupsModule {}
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class IndicatorCoefficientsModule {}
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class UnitsModule {}
      Severity: Major
      Found in api/src/modules/units/units.module.ts and 6 other locations - About 1 hr to fix
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class UnitConversionsModule {}
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14
      api/src/modules/url-params/url-params.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

      export class UrlParamsModule {}
      Severity: Major
      Found in api/src/modules/url-params/url-params.module.ts and 6 other locations - About 1 hr to fix
      api/src/modules/cached-data/cached-data.module.ts on lines 14..14
      api/src/modules/indicator-coefficients/indicator-coefficients.module.ts on lines 14..14
      api/src/modules/sourcing-location-groups/sourcing-location-groups.module.ts on lines 14..14
      api/src/modules/targets/targets.module.ts on lines 14..14
      api/src/modules/unit-conversions/unit-conversions.module.ts on lines 14..14
      api/src/modules/units/units.module.ts on lines 14..14

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

        {
          id: 6,
          group: 'landgriffon-tool',
          question: <>What about LandGriffon can be customized?</>,
          answer: (
      Severity: Major
      Found in marketing/src/containers/faqs/list/constants.tsx and 2 other locations - About 1 hr to fix
      marketing/src/containers/faqs/list/constants.tsx on lines 110..125
      marketing/src/containers/faqs/list/constants.tsx on lines 188..204

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

                  <div className="w-full">
                    <Image
                      priority
                      alt="Screen 04"
                      src="/images/methodology/open-science/screen_02.png"
      marketing/src/containers/the-service/app-screens/component.tsx on lines 38..47
      marketing/src/containers/the-service/app-screens/component.tsx on lines 84..93
      marketing/src/containers/the-service/app-screens/component.tsx on lines 94..103
      marketing/src/containers/the-service/app-screens/component.tsx on lines 104..113

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

                  <div className="w-[calc(33.33%_-_40px)]">
                    <Image
                      priority
                      alt="Screen 01"
                      src="/images/service/example/01.png"
      marketing/src/containers/methodology/open-science/component.tsx on lines 59..68
      marketing/src/containers/the-service/app-screens/component.tsx on lines 84..93
      marketing/src/containers/the-service/app-screens/component.tsx on lines 94..103
      marketing/src/containers/the-service/app-screens/component.tsx on lines 104..113

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

                  <div className="w-[calc(33.33%_-_40px)] opacity-30">
                    <Image
                      priority
                      alt="Screen 03"
                      src="/images/service/example/03.png"
      marketing/src/containers/methodology/open-science/component.tsx on lines 59..68
      marketing/src/containers/the-service/app-screens/component.tsx on lines 38..47
      marketing/src/containers/the-service/app-screens/component.tsx on lines 94..103
      marketing/src/containers/the-service/app-screens/component.tsx on lines 104..113

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

                  <div className="w-[calc(33.33%_-_40px)] opacity-20">
                    <Image
                      priority
                      alt="Screen 05"
                      src="/images/service/example/05.png"
      marketing/src/containers/methodology/open-science/component.tsx on lines 59..68
      marketing/src/containers/the-service/app-screens/component.tsx on lines 38..47
      marketing/src/containers/the-service/app-screens/component.tsx on lines 84..93
      marketing/src/containers/the-service/app-screens/component.tsx on lines 94..103

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

                  <div className="w-[calc(33.33%_-_40px)] opacity-20">
                    <Image
                      priority
                      alt="Screen 04"
                      src="/images/service/example/04.png"
      marketing/src/containers/methodology/open-science/component.tsx on lines 59..68
      marketing/src/containers/the-service/app-screens/component.tsx on lines 38..47
      marketing/src/containers/the-service/app-screens/component.tsx on lines 84..93
      marketing/src/containers/the-service/app-screens/component.tsx on lines 104..113

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

        {
          id: 4,
          group: 'landgriffon-tool',
          question: <>Why is this the best available impact data?</>,
          answer: (
      Severity: Major
      Found in marketing/src/containers/faqs/list/constants.tsx and 2 other locations - About 1 hr to fix
      marketing/src/containers/faqs/list/constants.tsx on lines 148..163
      marketing/src/containers/faqs/list/constants.tsx on lines 188..204

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

        {
          id: 8,
          group: 'supply-chain-data',
          question: <>Should I wait for more accurate data before using LandGriffon?</>,
          answer: (
      Severity: Major
      Found in marketing/src/containers/faqs/list/constants.tsx and 2 other locations - About 1 hr to fix
      marketing/src/containers/faqs/list/constants.tsx on lines 110..125
      marketing/src/containers/faqs/list/constants.tsx on lines 148..163

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

            <div className="flex flex-col justify-end overflow-hidden relative z-10  md:-mt-80 -mt-72 h-80 md:h-[420px] lg:h-[696px]">
              <Image
                alt="field"
                src="/images/compliance/hero_1.jpg"
                layout="fill"
      Severity: Major
      Found in marketing/src/containers/compliance/hero/component.tsx and 1 other location - About 1 hr to fix
      marketing/src/containers/compliance/science-based-targets/component.tsx on lines 57..66

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

          const outCircleRadii = new Float32Array(
            locations.map((loc) => {
              const id = getLocationId(loc);
              return locationIdsInViewport?.has(id) ? getOutCircleSize(id) : 1.0;
            }),
      cookie-traceability/src/lib/flowmap/data/FlowMapSelectors.ts on lines 954..959

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

        private async refreshView(): Promise<void> {
          this.logger.warn('Refreshing Impact View...');
          return this.dataSource.query(
            `REFRESH MATERIALIZED VIEW CONCURRENTLY ${IMPACT_VIEW_NAME} WITH DATA`,
          );
      Severity: Major
      Found in api/src/modules/impact/views/impact-view.updater.ts and 1 other location - About 1 hr to fix
      api/src/modules/impact/views/impact-view.updater.ts on lines 25..30

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language