HabitatMap/AirCasting

View on GitHub

Showing 667 of 667 total issues

Function MapButtons has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

const MapButtons: React.FC = () => {
  const { goToUserSettings, currentUserSettings, sessionType, isIndoor } =
    useMapParams();
  const [activeButtons, setActiveButtons] = useState<ButtonTypes[]>([]);
  const [activeCopyLinkButton, setActiveCopyLinkButton] = useState(false);
Severity: Minor
Found in app/javascript/react/components/MapButtons/MapButtons.tsx - About 1 hr to fix

Cognitive Complexity

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

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

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

Further reading

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

          !this.singleDatePicker &&
          this.leftCalendar.month &&
          this.rightCalendar.month &&
          (this.startDate.format("YYYY-MM") ==
            this.leftCalendar.month.format("YYYY-MM") ||
Severity: Major
Found in app/javascript/jquery.ui.daterangepicker.js and 1 other location - About 1 hr to fix
app/javascript/jquery.ui.daterangepicker.js on lines 632..642

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

          markerRefs.current.forEach((marker, streamIdKey) => {
            if (streamIdKey !== streamId.toString()) {
              marker.setMap(null);
              markerRefs.current.delete(streamIdKey);
            }
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 586..591
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 594..599

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

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

      expected = {
        'title' => session.title,
        'username' => user.username,
        'sensorName' => sensor_name,
        'startTime' => 970_365_780_000,
Severity: Major
Found in spec/controllers/api/mobile/sessions_controller_spec.rb and 1 other location - About 1 hr to fix
spec/controllers/api/mobile/streams_controller_spec.rb on lines 24..54

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

          labelOverlays.current.forEach((overlay, streamIdKey) => {
            if (streamIdKey !== streamId.toString()) {
              overlay.setMap(null);
              labelOverlays.current.delete(streamIdKey);
            }
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 578..583
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 586..591

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

          markerOverlays.current.forEach((overlay, streamIdKey) => {
            if (streamIdKey !== streamId.toString()) {
              overlay.setMap(null);
              markerOverlays.current.delete(streamIdKey);
            }
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 578..583
app/javascript/react/components/Map/Markers/FixedMarkers.tsx on lines 594..599

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

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

      expected = {
        'title' => session.title,
        'username' => user.username,
        'sensorName' => sensor_name,
        'startTime' => 970_365_780_000,
Severity: Major
Found in spec/controllers/api/mobile/streams_controller_spec.rb and 1 other location - About 1 hr to fix
spec/controllers/api/mobile/sessions_controller_spec.rb on lines 104..134

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

Function handleScrollEnd has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleScrollEnd = useCallback(() => {
    const hasMoreSessions = listSessions.length < fetchableMobileSessionsCount;
    const hasMoreDormantSessions =
      isDormant && listSessions.length < fetchableFixedSessionsCount;

Severity: Minor
Found in app/javascript/react/utils/scrollEnd.ts - About 1 hr to fix

    Function setSensorParams has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        (selectedSensor: string, sensors: Sensor[]) => {
          const commonParams = [
            {
              key: UrlParamsTypes.previousUserSettings,
              value: currentUserSettings,
    Severity: Minor
    Found in app/javascript/react/utils/mapParamsHandler.ts - About 1 hr to fix

      Function SessionTypeToggle has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const SessionTypeToggle = () => {
        const dispatch = useAppDispatch();
        const { searchParams, sessionType, updateSessionType } = useMapParams();
        const { t } = useTranslation();
      
      

        Function extraReducers has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          extraReducers: (builder) => {
            builder
              .addCase(fetchActiveFixedSessions.pending, (state) => {
                state.status = StatusEnum.Pending;
                state.error = null;
        Severity: Minor
        Found in app/javascript/react/store/fixedSessionsSlice.ts - About 1 hr to fix

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

                if (onMount) {
                  mutation.addedNodes.forEach((addedNode) => {
                    const matchingElements = getMatchingElementsFromTree(
                      addedNode,
                      selector
          Severity: Major
          Found in app/javascript/createObserver.js and 1 other location - About 1 hr to fix
          app/javascript/createObserver.js on lines 38..47

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

          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

                if (onUnmount) {
                  mutation.removedNodes.forEach((removedNode) => {
                    const matchingElements = getMatchingElementsFromTree(
                      removedNode,
                      selector
          Severity: Major
          Found in app/javascript/createObserver.js and 1 other location - About 1 hr to fix
          app/javascript/createObserver.js on lines 27..36

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

          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

              builder
                .addCase(fetchMobileSessions.pending, (state) => {
                  state.status = StatusEnum.Pending;
                  state.error = null;
                })
          Severity: Major
          Found in app/javascript/react/store/mobileSessionsSlice.ts and 6 other locations - About 1 hr to fix
          app/javascript/react/store/fixedSessionsSlice.ts on lines 133..154
          app/javascript/react/store/fixedSessionsSlice.ts on lines 155..175
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..129
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..149
          app/javascript/react/store/sensorsSlice.ts on lines 63..84
          app/javascript/react/store/thresholdSlice.ts on lines 77..105

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

          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

              builder
                .addCase(fetchActiveFixedSessions.pending, (state) => {
                  state.status = StatusEnum.Pending;
                  state.error = null;
                })
          Severity: Major
          Found in app/javascript/react/store/fixedSessionsSlice.ts and 6 other locations - About 1 hr to fix
          app/javascript/react/store/fixedSessionsSlice.ts on lines 155..175
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..129
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..149
          app/javascript/react/store/mobileSessionsSlice.ts on lines 116..141
          app/javascript/react/store/sensorsSlice.ts on lines 63..84
          app/javascript/react/store/thresholdSlice.ts on lines 77..105

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

          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

              builder
                .addCase(fetchActiveIndoorSessions.pending, (state) => {
                  state.status = StatusEnum.Pending;
                  state.error = null;
                })
          Severity: Major
          Found in app/javascript/react/store/indoorSessionsSlice.ts and 6 other locations - About 1 hr to fix
          app/javascript/react/store/fixedSessionsSlice.ts on lines 133..154
          app/javascript/react/store/fixedSessionsSlice.ts on lines 155..175
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..149
          app/javascript/react/store/mobileSessionsSlice.ts on lines 116..141
          app/javascript/react/store/sensorsSlice.ts on lines 63..84
          app/javascript/react/store/thresholdSlice.ts on lines 77..105

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

          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 ChevronIcon = styled.img<{ $isActive?: boolean; $src: string }>`
            width: 1rem;
            height: 2rem;
            background-color: ${(props) => (props.$isActive ? acBlue : gray300)};
            mask: url(${(props) => props.$src});
          app/javascript/react/components/SessionFilters/SessionFilters.style.tsx on lines 102..109

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

          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

              builder
                .addCase(fetchSensors.pending, (state) => {
                  state.fetchSensorsStatus = StatusEnum.Pending;
                  state.error = null;
                })
          Severity: Major
          Found in app/javascript/react/store/sensorsSlice.ts and 6 other locations - About 1 hr to fix
          app/javascript/react/store/fixedSessionsSlice.ts on lines 133..154
          app/javascript/react/store/fixedSessionsSlice.ts on lines 155..175
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..129
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..149
          app/javascript/react/store/mobileSessionsSlice.ts on lines 116..141
          app/javascript/react/store/thresholdSlice.ts on lines 77..105

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

          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 IconWrapper = styled.div<{ $isActive: boolean; $src: string }>`
            margin-left: 0.8rem;
            background-color: ${(props) => (props.$isActive ? white : gray300)};
            mask: url(${(props) => props.$src});
            mask-size: 100% 100%;
          app/javascript/react/components/SessionFilters/SessionFilters.style.tsx on lines 358..364

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

          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

              builder
                .addCase(fetchThresholds.pending, (state) => {
                  state.status = StatusEnum.Pending;
                  state.error = null;
                })
          Severity: Major
          Found in app/javascript/react/store/thresholdSlice.ts and 6 other locations - About 1 hr to fix
          app/javascript/react/store/fixedSessionsSlice.ts on lines 133..154
          app/javascript/react/store/fixedSessionsSlice.ts on lines 155..175
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..129
          app/javascript/react/store/indoorSessionsSlice.ts on lines 109..149
          app/javascript/react/store/mobileSessionsSlice.ts on lines 116..141
          app/javascript/react/store/sensorsSlice.ts on lines 63..84

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

          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