react-scheduler/react-big-schedule

View on GitHub

Showing 504 of 504 total issues

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

  updateEventStart = (schedulerData, event, newStart) => {
    if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
      schedulerData.updateEventStart(event, newStart);
    }
    this.setState({
Severity: Major
Found in src/examples/AddMore.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventEnd = (schedulerData, event, newEnd) => {
    if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
      schedulerData.updateEventEnd(event, newEnd);
    }
    this.setState({
Severity: Major
Found in src/examples/CustomEventStyle.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventStart = (schedulerData, event, newStart) => {
    if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
      schedulerData.updateEventStart(event, newStart);
    }
    this.setState({
Severity: Major
Found in src/examples/CustomHeader.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventStart = (schedulerData, event, newStart) => {
    if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
      schedulerData.updateEventStart(event, newStart);
    }
    this.setState({
Severity: Major
Found in src/examples/CustomEventStyle.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventEnd = (schedulerData, event, newEnd) => {
    if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
      schedulerData.updateEventEnd(event, newEnd);
    }
    this.setState({
Severity: Major
Found in src/examples/AddMore.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventEnd = (schedulerData, event, newEnd) => {
    if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
      schedulerData.updateEventEnd(event, newEnd);
    }
    this.setState({
Severity: Major
Found in src/examples/Basic.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventStart = (schedulerData, event, newStart) => {
    if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
      schedulerData.updateEventStart(event, newStart);
    }
    this.setState({
Severity: Major
Found in src/examples/OverlapCheck.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomHeader.jsx on lines 134..141
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 110..117

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

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

  updateEventEnd = (schedulerData, event, newEnd) => {
    if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
      schedulerData.updateEventEnd(event, newEnd);
    }
    this.setState({
Severity: Major
Found in src/examples/CustomHeader.jsx and 13 other locations - About 2 hrs to fix
src/examples/AddMore.jsx on lines 141..148
src/examples/AddMore.jsx on lines 150..157
src/examples/AddResource.jsx on lines 123..128
src/examples/AddResource.jsx on lines 130..135
src/examples/Basic.jsx on lines 125..132
src/examples/Basic.jsx on lines 134..141
src/examples/CustomEventStyle.jsx on lines 119..126
src/examples/CustomEventStyle.jsx on lines 128..135
src/examples/CustomHeader.jsx on lines 125..132
src/examples/CustomPopoverStyle.jsx on lines 113..120
src/examples/CustomPopoverStyle.jsx on lines 122..129
src/examples/OverlapCheck.jsx on lines 101..108
src/examples/OverlapCheck.jsx on lines 110..117

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

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 BodyView has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

function BodyView({ schedulerData }) {
  const { renderData, headers, config, behaviors } = schedulerData;
  const width = schedulerData.getContentCellWidth();

  const tableRows = renderData
Severity: Minor
Found in src/components/BodyView.jsx - About 2 hrs 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

Function hover has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    hover: (props, monitor, component) => {
      const { schedulerData, resourceEvents, movingEvent } = props;
      const { cellUnit, config, viewType, localeDayjs } = schedulerData;
      this.config = config;
      const item = monitor.getItem();
Severity: Major
Found in src/components/DnDContext.js - About 2 hrs to fix

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

          if (cellUnit !== CellUnit.Hour) {
            newEnd = localeDayjs(new Date(resourceEvents.headerItems[leftIndex].start)).hour(23).minute(59).second(59)
              .format(DATETIME_FORMAT);
          }
    Severity: Major
    Found in src/components/DnDContext.js and 1 other location - About 1 hr to fix
    src/components/DnDContext.js on lines 44..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 74.

    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 (cellUnit !== CellUnit.Hour) {
            endTime = localeDayjs(new Date(resourceEvents.headerItems[leftIndex].start)).hour(23).minute(59).second(59)
              .format(DATETIME_FORMAT);
          }
    Severity: Major
    Found in src/components/DnDContext.js and 1 other location - About 1 hr to fix
    src/components/DnDContext.js on lines 83..86

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

    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 AddMorePopover has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function AddMorePopover(props) {
      const { schedulerData, headerItem, left, top, height, closeAction } = props;
      const { config, localeDayjs } = schedulerData;
      const { time, start, end, events } = headerItem;
    
    
    Severity: Minor
    Found in src/components/AddMorePopover.jsx - About 1 hr to fix

      Function AgendaResourceEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function AgendaResourceEvents(props) {
        const { schedulerData, resourceEvents, slotClickedFunc, slotItemTemplateResolver } = props;
        const { startDate, endDate, config, localeDayjs } = schedulerData;
        const width = schedulerData.getResourceTableWidth() - 2;
      
      
      Severity: Minor
      Found in src/components/AgendaResourceEvents.jsx - About 1 hr to fix

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

            let newEnd = localeDayjs(new Date(eventItem.end))
              .add(cellUnit === CellUnit.Hour ? count * config.minuteStep : count, cellUnit === CellUnit.Hour ? 'minutes' : 'days')
              .format(DATETIME_FORMAT);
        Severity: Major
        Found in src/components/EventItem.jsx and 1 other location - About 1 hr to fix
        src/components/EventItem.jsx on lines 185..187

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

        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

            let newStart = localeDayjs(new Date(eventItem.start))
              .add(cellUnit === CellUnit.Hour ? count * config.minuteStep : count, cellUnit === CellUnit.Hour ? 'minutes' : 'days')
              .format(DATETIME_FORMAT);
        Severity: Major
        Found in src/components/EventItem.jsx and 1 other location - About 1 hr to fix
        src/components/EventItem.jsx on lines 316..318

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

        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 renderSlotItem has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const renderSlotItem = (item, indents) => {
            let indent = <span key={`es${item.indent}`} className="expander-space" />;
        
            const iconProps = { key: `es${item.indent}`, onClick: () => handleToggleExpand(item) };
            if (item.hasChildren) {
        Severity: Minor
        Found in src/components/ResourceView.jsx - About 1 hr to fix

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

            render() {
              const { viewModel } = this.state;
          
              let popover = <div />;
              if (this.state.headerItem !== undefined) {
          Severity: Minor
          Found in src/examples/AddMore.jsx - About 1 hr to fix

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

              onViewChange = (schedulerData, view) => {
                schedulerData.setViewType(view.viewType, view.showAgenda, view.isEventPerspective);
                schedulerData.setEvents(DemoData.eventsForCustomEventStyle);
                this.setState({
                  viewModel: schedulerData,
            Severity: Major
            Found in src/examples/CustomEventStyle.jsx and 5 other locations - About 1 hr to fix
            src/examples/AddMore.jsx on lines 91..97
            src/examples/AddResource.jsx on lines 86..90
            src/examples/CustomHeader.jsx on lines 75..81
            src/examples/CustomPopoverStyle.jsx on lines 63..69
            src/examples/OverlapCheck.jsx on lines 55..59

            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

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

                if (this.supportTouch) {
                  if (ev.changedTouches.length === 0) return;
                  const touch = ev.changedTouches[0];
                  clientX = touch.pageX;
                } else {
            Severity: Major
            Found in src/components/EventItem.jsx and 1 other location - About 1 hr to fix
            src/components/EventItem.jsx on lines 121..127

            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