tomchentw/react-google-maps

View on GitHub

Showing 127 of 127 total issues

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

export class DrawingManager extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/drawing/DrawingManager.jsx and 1 other location - About 1 day to fix
src/macros/visualization/HeatmapLayer.jsx on lines 26..77

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

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

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

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

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

Refactorings

Further Reading

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

export class HeatmapLayer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/visualization/HeatmapLayer.jsx and 1 other location - About 1 day to fix
src/macros/drawing/DrawingManager.jsx on lines 32..83

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

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

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

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

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

Refactorings

Further Reading

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

export class Polygon extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/Polygon.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class BicyclingLayer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/BicyclingLayer.jsx and 8 other locations - About 1 day to fix
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class Rectangle extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/Rectangle.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class DirectionsRenderer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/DirectionsRenderer.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class FusionTablesLayer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/FusionTablesLayer.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class Circle extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/Circle.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class TrafficLayer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/TrafficLayer.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81

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

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

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

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

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

Refactorings

Further Reading

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

export class Polyline extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/Polyline.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/KmlLayer.jsx on lines 26..73
src/macros/Polygon.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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

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

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

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

Refactorings

Further Reading

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

export class KmlLayer extends React.PureComponent {
  static propTypes = {
    __jscodeshiftPlaceholder__: null,
  }

Severity: Major
Found in src/macros/KmlLayer.jsx and 8 other locations - About 1 day to fix
src/macros/BicyclingLayer.jsx on lines 25..72
src/macros/Circle.jsx on lines 34..81
src/macros/DirectionsRenderer.jsx on lines 25..77
src/macros/FusionTablesLayer.jsx on lines 25..77
src/macros/Polygon.jsx on lines 34..81
src/macros/Polyline.jsx on lines 34..81
src/macros/Rectangle.jsx on lines 34..81
src/macros/TrafficLayer.jsx on lines 25..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 249.

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.d.ts has 576 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// TypeScript Version: 2.3

declare module 'react-google-maps' {
    export { default as withGoogleMap, WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap'
    export { default as withScriptjs, WithScriptjsProps } from 'react-google-maps/lib/withScriptjs'
Severity: Major
Found in types/index.d.ts - About 1 day to fix

    Function transformer has 210 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function transformer(file, api) {
      const j = api.jscodeshift
      const wrap = j(file.source)
    
      const exportConfig = wrap.find(j.ExportNamedDeclaration).at(0)
    Severity: Major
    Found in src/tx/MapChild.js - About 1 day to fix

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

        componentDidMount() {
          componentDidMount(this, this.state[INFO_WINDOW], eventMap)
          if (React.version.match(/^16/)) {
            this.state[INFO_WINDOW].setContent(this.containerElement)
            open(this.state[INFO_WINDOW], this.context[ANCHOR])
      Severity: Major
      Found in src/components/InfoWindow.jsx and 1 other location - About 7 hrs to fix
      src/macros/InfoWindow.jsx on lines 65..80

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

      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

        componentDidMount() {
          componentDidMount(this, this.state[INFO_WINDOW], eventMap)
          if (React.version.match(/^16/)) {
            this.state[INFO_WINDOW].setContent(this.containerElement)
            open(this.state[INFO_WINDOW], this.context[ANCHOR])
      Severity: Major
      Found in src/macros/InfoWindow.jsx and 1 other location - About 7 hrs to fix
      src/components/InfoWindow.jsx on lines 113..128

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

      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

        constructor(props, context) {
          super(props, context)
          const overlayView = new google.maps.OverlayView()
          // You must implement three methods: onAdd(), draw(), and onRemove().
          overlayView.onAdd = _.bind(this.onAdd, this)
      Severity: Major
      Found in src/components/OverlayView.jsx and 1 other location - About 7 hrs to fix
      src/macros/OverlayView.jsx on lines 68..82

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

      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

        constructor(props, context) {
          super(props, context)
          const overlayView = new google.maps.OverlayView()
          // You must implement three methods: onAdd(), draw(), and onRemove().
          overlayView.onAdd = _.bind(this.onAdd, this)
      Severity: Major
      Found in src/macros/OverlayView.jsx and 1 other location - About 7 hrs to fix
      src/components/OverlayView.jsx on lines 71..85

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

      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

        constructor(props, context) {
          super(props, context)
          const NativeMarkerWithLabel = makeMarkerWithLabel(google.maps)
          const markerWithLabel = new NativeMarkerWithLabel()
          construct(
      Severity: Major
      Found in src/components/addons/MarkerWithLabel.jsx and 1 other location - About 5 hrs to fix
      src/macros/addons/MarkerWithLabel.jsx on lines 84..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 147.

      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

        constructor(props, context) {
          super(props, context)
          const NativeMarkerWithLabel = makeMarkerWithLabel(google.maps)
          const markerWithLabel = new NativeMarkerWithLabel()
          construct(
      Severity: Major
      Found in src/macros/addons/MarkerWithLabel.jsx and 1 other location - About 5 hrs to fix
      src/components/addons/MarkerWithLabel.jsx on lines 324..343

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 147.

      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

        constructor(props, context) {
          super(props, context)
          warning(
            !props.url || !props.bounds,
            `
      Severity: Major
      Found in src/macros/GroundOverlay.jsx and 1 other location - About 5 hrs to fix
      src/components/GroundOverlay.jsx on lines 78..104

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

      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