react-scheduler/react-big-schedule

View on GitHub

Showing 504 of 504 total issues

Function _createRenderData has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _createRenderData() {
    const initRenderData = this._createInitRenderData(this.isEventPerspective, this.eventGroups, this.resources, this.headers);
    // this.events.sort(this._compare);
    const cellMaxEventsCount = this.getCellMaxEvents();
    const cellMaxEventsCountValue = 30;
Severity: Major
Found in src/components/SchedulerData.js - About 3 hrs to fix

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

        if (this.supportTouch) {
          if (ev.changedTouches.length === 0) {
            this.setState({ left, top, width });
            return;
          }
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 158..167

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

    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) {
            this.setState({ left, top, width });
            return;
          }
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 286..295

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

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

    function ResourceView({ schedulerData, contentScrollbarHeight, slotClickedFunc, slotItemTemplateResolver, toggleExpandFunc }) {
      const { renderData } = schedulerData;
      const width = schedulerData.getResourceTableWidth() - 2;
      const paddingBottom = contentScrollbarHeight;
      const displayRenderData = renderData.filter(o => o.render);
    Severity: Minor
    Found in src/components/ResourceView.jsx - About 3 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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/CustomEventStyle.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/AddResource.jsx on lines 137..146
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/CustomPopoverStyle.jsx on lines 131..142
    src/examples/OverlapCheck.jsx on lines 119..130

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/CustomHeader.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/AddResource.jsx on lines 137..146
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomPopoverStyle.jsx on lines 131..142
    src/examples/OverlapCheck.jsx on lines 119..130

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

    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 (this.endResizer !== undefined && this.endResizer !== null) {
          if (this.supportTouch) {
            // this.endResizer.removeEventListener('touchstart', this.initEndDrag, false);
            // if (endResizable(props))
            //     this.endResizer.addEventListener('touchstart', this.initEndDrag, false);
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 385..394

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

    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 (this.startResizer !== undefined && this.startResizer !== null) {
          if (this.supportTouch) {
            // this.startResizer.removeEventListener('touchstart', this.initStartDrag, false);
            // if (startResizable(props))
            //     this.startResizer.addEventListener('touchstart', this.initStartDrag, false);
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 395..404

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/OverlapCheck.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/AddResource.jsx on lines 137..146
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/CustomPopoverStyle.jsx on lines 131..142

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/AddMore.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddResource.jsx on lines 137..146
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/CustomPopoverStyle.jsx on lines 131..142
    src/examples/OverlapCheck.jsx on lines 119..130

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/Basic.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/AddResource.jsx on lines 137..146
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/CustomPopoverStyle.jsx on lines 131..142
    src/examples/OverlapCheck.jsx on lines 119..130

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/CustomPopoverStyle.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/AddResource.jsx on lines 137..146
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/OverlapCheck.jsx on lines 119..130

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

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

      moveEvent = (schedulerData, event, slotId, slotName, start, end) => {
        if (
          confirm(
            `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`
          )
    Severity: Major
    Found in src/examples/AddResource.jsx and 6 other locations - About 3 hrs to fix
    src/examples/AddMore.jsx on lines 159..170
    src/examples/Basic.jsx on lines 143..154
    src/examples/CustomEventStyle.jsx on lines 137..148
    src/examples/CustomHeader.jsx on lines 143..154
    src/examples/CustomPopoverStyle.jsx on lines 131..142
    src/examples/OverlapCheck.jsx on lines 119..130

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

    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 startResizable = ({ eventItem, isInPopover, schedulerData }) => schedulerData.config.startResizable === true
      && isInPopover === false
      && (eventItem.resizable === undefined || eventItem.resizable !== false)
      && (eventItem.startResizable === undefined || eventItem.startResizable !== false);
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 38..41

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

    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 endResizable = ({ eventItem, isInPopover, schedulerData }) => schedulerData.config.endResizable === true
      && isInPopover === false
      && (eventItem.resizable === undefined || eventItem.resizable !== false)
      && (eventItem.endResizable === undefined || eventItem.endResizable !== false);
    Severity: Major
    Found in src/components/EventItem.jsx and 1 other location - About 3 hrs to fix
    src/components/EventItem.jsx on lines 33..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 95.

    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) {
        super(props);
    
        const schedulerData = new SchedulerData('2022-12-18', ViewType.Week);
        schedulerData.localeDayjs.locale('en');
    Severity: Major
    Found in src/examples/CustomPopoverStyle.jsx and 1 other location - About 2 hrs to fix
    src/examples/CustomHeader.jsx on lines 5..15

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

    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) {
        super(props);
    
        const schedulerData = new SchedulerData('2022-12-18', ViewType.Week);
        schedulerData.localeDayjs.locale('en');
    Severity: Major
    Found in src/examples/CustomHeader.jsx and 1 other location - About 2 hrs to fix
    src/examples/CustomPopoverStyle.jsx on lines 6..16

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

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

      _createInitRenderData(isEventPerspective, eventGroups, resources, headers) {
        const slots = isEventPerspective ? eventGroups : resources;
        const slotTree = [];
        const slotMap = new Map();
        slots.forEach(slot => {
    Severity: Major
    Found in src/components/SchedulerData.js - About 2 hrs to fix

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

        getCellMaxEvents() {
          const viewConfigMap = {
            [ViewType.Week]: 'weekMaxEvents',
            [ViewType.Day]: 'dayMaxEvents',
            [ViewType.Month]: 'monthMaxEvents',
      Severity: Major
      Found in src/components/SchedulerData.js and 1 other location - About 2 hrs to fix
      src/components/SchedulerData.js on lines 504..516

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 91.

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

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

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

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

      Refactorings

      Further Reading

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

        getContentCellConfigWidth() {
          const viewConfigMap = {
            [ViewType.Week]: 'weekCellWidth',
            [ViewType.Day]: 'dayCellWidth',
            [ViewType.Month]: 'monthCellWidth',
      Severity: Major
      Found in src/components/SchedulerData.js and 1 other location - About 2 hrs to fix
      src/components/SchedulerData.js on lines 340..352

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 91.

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language