redbadger/website-honestly

View on GitHub

Showing 41 of 42 total issues

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

const MapDotImage = () => (
  <svg viewBox="0 0 927 527" xmlns="http://www.w3.org/2000/svg">
    <defs />
    <defs>
      <path
Severity: Major
Found in site/pages/our-work/case-study/pagofx/map-dot/index.js and 1 other location - About 1 wk to fix
site/pages/our-work/case-study/mission-beyond/map-dot/index.js on lines 3..270

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

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

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

const MapDotImage = () => (
  <svg viewBox="0 0 927 527" xmlns="http://www.w3.org/2000/svg">
    <defs />
    <defs>
      <path
site/pages/our-work/case-study/pagofx/map-dot/index.js on lines 3..270

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

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

File policy.js has 960 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// @flow
/* eslint-disable react/no-unescaped-entities, max-len */

import * as React from 'react';

Severity: Major
Found in site/pages/privacy-policy/policy.js - About 2 days to fix

    File policy.js has 559 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // @flow
    import * as React from 'react';
    
    import styles from '../../components/policy/style.css';
    import { P, H3, SerifH3, B, PolicyList } from '../../components/policy/shared';
    Severity: Major
    Found in site/pages/terms-and-conditions/policy.js - About 1 day to fix

      File index.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      
      // Components
      import ScrollTracker from '../../../../components/scroll-tracker';
      import Social from '../../../../components/social';
      Severity: Minor
      Found in site/pages/our-work/case-study/mission-beyond/index.js - About 1 day to fix

        File definitions.js has 466 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // @flow
        import { stateToBadgerProps, genBadgersParams, getBadgersTitle } from './selectors';
        
        type RouteDefinition = {|
          title: string | ((props: Object) => string),
        Severity: Minor
        Found in site/routes/definitions.js - About 7 hrs to fix

          File index.js has 378 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // @flow
          import React from 'react';
          
          import Social from '../../../../components/social';
          import Image from '../../../../components/image';
          Severity: Minor
          Found in site/pages/our-work/case-study/fidelity/index.js - About 5 hrs to fix

            File index.js has 359 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // @flow
            import React from 'react';
            
            import Social from '../../../../components/social';
            import Image from '../../../../components/image';
            Severity: Minor
            Found in site/pages/our-work/case-study/nandos-loyalty/index.js - About 4 hrs to fix

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

                static setWindowSize() {
                  let currentWidth = 'tablet';
                  if (typeof window !== 'undefined') {
                    if (window.innerWidth < screenBreakPoints.tablet) {
                      currentWidth = 'mobile';
              Severity: Major
              Found in site/slices/gc-slice/index.js and 1 other location - About 4 hrs to fix
              site/pages/experience-us/index.js on lines 77..95

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

              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

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

                static setWindowSize() {
                  let currentWidth = 'tablet';
                  if (typeof window !== 'undefined') {
                    if (window.innerWidth < screenBreakPoints.tablet) {
                      currentWidth = 'mobile';
              Severity: Major
              Found in site/pages/experience-us/index.js and 1 other location - About 4 hrs to fix
              site/slices/gc-slice/index.js on lines 25..42

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

              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

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

              const assertStatusOK = response => {
                if (response.status >= 200 && response.status < 300) {
                  return response;
                }
                return response.json().then(json => {
              Severity: Major
              Found in bin/register-github-release.js and 1 other location - About 4 hrs to fix
              bin/register-github-deployment.js on lines 37..46

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

              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

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

              const assertStatusOK = response => {
                if (response.status >= 200 && response.status < 300) {
                  return response;
                }
                return response.json().then(json => {
              Severity: Major
              Found in bin/register-github-deployment.js and 1 other location - About 4 hrs to fix
              bin/register-github-release.js on lines 36..45

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

              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

              File index.js has 325 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // @flow
              import React from 'react';
              import classnames from 'classnames/bind';
              import Social from '../../../../components/social';
              import Image from '../../../../components/image';
              Severity: Minor
              Found in site/pages/our-work/case-study/bank/index.js - About 3 hrs to fix

                File index.js has 299 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from 'react';
                
                // Components
                import ScrollTracker from '../../../../components/scroll-tracker';
                import Social from '../../../../components/social';
                Severity: Minor
                Found in site/pages/our-work/case-study/pagofx/index.js - About 3 hrs to fix

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

                      <div className={styles.imgContainer}>
                        <Picture
                          xLargeSrc={images.main}
                          largeSrc={images.large}
                          mediumSrc={images.medium}
                  Severity: Major
                  Found in site/pages/experience-us/other-ways/engagement-card/index.js and 1 other location - About 2 hrs to fix
                  site/pages/experience-us/hero-card/index.js 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 91.

                  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

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

                      <div className={styles.imgContainer}>
                        <Picture
                          xLargeSrc={images.main}
                          largeSrc={images.large}
                          mediumSrc={images.medium}
                  Severity: Major
                  Found in site/pages/experience-us/hero-card/index.js and 1 other location - About 2 hrs to fix
                  site/pages/experience-us/other-ways/engagement-card/index.js on lines 24..32

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

                  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

                  File index.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import marked from 'marked';
                  import fetch from 'node-fetch';
                  import handleErrors from '../util/handle-errors';
                  
                  const badgerBrainEndpoint = () => process.env.BADGER_BRAIN_HOST;
                  Severity: Minor
                  Found in site/fetchers/badger-brain/index.js - About 2 hrs to fix

                    File index.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import React from 'react';
                    
                    const MapDotImage = () => (
                      <svg viewBox="0 0 927 527" xmlns="http://www.w3.org/2000/svg">
                        <defs />
                    Severity: Minor
                    Found in site/pages/our-work/case-study/mission-beyond/map-dot/index.js - About 2 hrs to fix

                      File index.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React from 'react';
                      
                      const MapDotImage = () => (
                        <svg viewBox="0 0 927 527" xmlns="http://www.w3.org/2000/svg">
                          <defs />
                      Severity: Minor
                      Found in site/pages/our-work/case-study/pagofx/map-dot/index.js - About 2 hrs to fix

                        File index.js has 266 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        // @flow
                        
                        import React from 'react';
                        import classnames from 'classnames/bind';
                        
                        
                        Severity: Minor
                        Found in site/pages/our-work/case-study/fortnum-and-mason/index.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language