ngscheurich/fresh-pots

View on GitHub

Showing 16 of 16 total issues

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

  render() {
    const { brew } = this.props;

    return (
      <div className="flex-1">
Severity: Major
Found in app/frontend/js/components/Brew.js - About 3 hrs to fix

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

    export function mobileMenu() {
      const node = Selectors.component("mobile-menu");
    
      if (node) {
        const data = node.dataset;
    Severity: Major
    Found in app/frontend/js/render.js and 1 other location - About 3 hrs to fix
    app/frontend/js/render.js on lines 63..77

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

    export function userMenu() {
      const node = Selectors.component("user-menu");
    
      if (node) {
        const data = node.dataset;
    Severity: Major
    Found in app/frontend/js/render.js and 1 other location - About 3 hrs to fix
    app/frontend/js/render.js on lines 79..93

    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

            <rect
              x={size - minuteHandWidth / 2}
              y={size - size * minuteHandLength}
              width={minuteHandWidth}
              height={size * minuteHandLength}
    Severity: Major
    Found in app/frontend/js/components/Clock.js and 1 other location - About 2 hrs to fix
    app/frontend/js/components/Clock.js on lines 77..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 84.

    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

            <rect
              x={size - hourHandWidth / 2}
              y={size - size * hourHandLength}
              width={hourHandWidth}
              height={size * hourHandLength}
    Severity: Major
    Found in app/frontend/js/components/Clock.js and 1 other location - About 2 hrs to fix
    app/frontend/js/components/Clock.js on lines 85..92

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

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

      render() {
        return (
          <div>
            <button
              className="input-reset ph0 bn bg-black br-100 fixed flex items-center justify-center tc"
    Severity: Major
    Found in app/frontend/js/components/MobileMenu.js - About 2 hrs to fix

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

        render() {
          const size = this.props.size;
          const strokeWidth = this.props.strokeWidth;
          const hourHandWidth = this.props.hourHandWidth;
          const hourHandLength = this.props.hourHandLength;
      Severity: Minor
      Found in app/frontend/js/components/Clock.js - About 1 hr to fix

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

          hourStyle() {
            return {
              transform: `rotate(${this.rotation("hour")}deg)`,
              transformOrigin: `${this.props.size}px ${this.props.size}px`
            };
        Severity: Major
        Found in app/frontend/js/components/Clock.js and 1 other location - About 1 hr to fix
        app/frontend/js/components/Clock.js on lines 32..37

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

        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

          minuteStyle() {
            return {
              transform: `rotate(${this.rotation("minute")}deg)`,
              transformOrigin: `${this.props.size}px ${this.props.size}px`
            };
        Severity: Major
        Found in app/frontend/js/components/Clock.js and 1 other location - About 1 hr to fix
        app/frontend/js/components/Clock.js on lines 25..30

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

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

          render() {
            return (
              <div className="fr relative">
                <button
                  className="input-reset ph0 bn bg-transparent pointer flex items-center dim"
        Severity: Minor
        Found in app/frontend/js/components/UserMenu.js - About 1 hr to fix

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

          BrewMeter.propTypes = {
            colorStops: PropTypes.string.isRequired,
            timeAgo: PropTypes.string.isRequired,
            width: PropTypes.string.isRequired
          };
          Severity: Major
          Found in app/frontend/js/components/BrewMeter.js and 3 other locations - About 50 mins to fix
          app/frontend/js/components/BrewDetails.js on lines 17..21
          app/frontend/js/components/MobileMenu.js on lines 125..129
          app/frontend/js/components/UserMenu.js on lines 62..66

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

          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 (node) {
              const data = JSON.parse(node.dataset.chartData);
              ReactDOM.render(<BrewTimesChart chartData={data} />, node);
            }
          Severity: Minor
          Found in app/frontend/js/render.js and 1 other location - About 50 mins to fix
          app/frontend/js/render.js on lines 57..60

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

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

          BrewDetails.propTypes = {
            pot: PropTypes.string.isRequired,
            variety: PropTypes.string.isRequired,
            width: PropTypes.string.isRequired
          };
          Severity: Major
          Found in app/frontend/js/components/BrewDetails.js and 3 other locations - About 50 mins to fix
          app/frontend/js/components/BrewMeter.js on lines 21..25
          app/frontend/js/components/MobileMenu.js on lines 125..129
          app/frontend/js/components/UserMenu.js on lines 62..66

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

          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

            nodes.forEach(node => {
              const data = JSON.parse(node.dataset.chartData);
              ReactDOM.render(<BrewDoughnutChart chartData={data} />, node);
            });
          Severity: Minor
          Found in app/frontend/js/render.js and 1 other location - About 50 mins to fix
          app/frontend/js/render.js on lines 48..51

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

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

          UserMenu.propTypes = {
            avatar: PropTypes.string.isRequired,
            showUrl: PropTypes.string.isRequired,
            editUrl: PropTypes.string.isRequired
          };
          Severity: Major
          Found in app/frontend/js/components/UserMenu.js and 3 other locations - About 50 mins to fix
          app/frontend/js/components/BrewDetails.js on lines 17..21
          app/frontend/js/components/BrewMeter.js on lines 21..25
          app/frontend/js/components/MobileMenu.js on lines 125..129

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

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

          MobileMenu.propTypes = {
            avatar: PropTypes.string.isRequired,
            showUrl: PropTypes.string.isRequired,
            editUrl: PropTypes.string.isRequired
          };
          Severity: Major
          Found in app/frontend/js/components/MobileMenu.js and 3 other locations - About 50 mins to fix
          app/frontend/js/components/BrewDetails.js on lines 17..21
          app/frontend/js/components/BrewMeter.js on lines 21..25
          app/frontend/js/components/UserMenu.js on lines 62..66

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

          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