hellowin/kanca

View on GitHub

Showing 264 of 264 total issues

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

  render() {
    const { loading, inputs, manages, features } = this.props;

    return !loading? (
      <div className="row">
Severity: Minor
Found in src/domain/group/container/Selection.js - About 1 hr to fix

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

        return graph.login()
          .then(res => (login = res))
          .then(() => graph.getUser())
          .then(res => (profile = res))
          .then(() => {
    Severity: Major
    Found in src/infra/repo/user.js and 1 other location - About 1 hr to fix
    src/infra/repo/user.js on lines 45..52

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

    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

        return graph.getLoginStatus()
          .then(res => (login = res))
          .then(() => graph.getUser())
          .then(res => (profile = res))
          .then(() => {
    Severity: Major
    Found in src/infra/repo/user.js and 1 other location - About 1 hr to fix
    src/infra/repo/user.js on lines 12..19

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

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

      render() {
        const { metrics, show, title } = this.props;
    
        const fixShow = show || defaultShow;
    
    
    Severity: Minor
    Found in src/domain/metric/component/LineChart.js - About 1 hr to fix

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

          cloneWith<T, U>(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U;
      Severity: Major
      Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 hr to fix
      flow-typed/npm/lodash_v4.x.x.js on lines 267..267

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

      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

        declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>;
      Severity: Major
      Found in flow-typed/npm/react-redux_v4.x.x.js and 1 other location - About 1 hr to fix
      flow-typed/npm/react-redux_v5.x.x.js on lines 18..18

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

      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

        declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>;
      Severity: Major
      Found in flow-typed/npm/react-redux_v5.x.x.js and 1 other location - About 1 hr to fix
      flow-typed/npm/react-redux_v4.x.x.js on lines 18..18

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

      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

          cloneDeepWith<T, U>(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U;
      Severity: Major
      Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 hr to fix
      flow-typed/npm/lodash_v4.x.x.js on lines 268..268

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

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

      export const userMetric = (members: Member[], posts: Post[], comments: Comment[]): UserMetric[] => {
        // create user mapping
        const users = {};
        _.each(members, member => {
          const id = member.id;
      Severity: Minor
      Found in src/domain/metric/service/userMetric.js - About 1 hr to fix

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

          render() {
            const { profile, loading } = this.props;
        
            return (
              <header className="app-header navbar" style={{ paddingRight: '15px' }}>
        Severity: Minor
        Found in src/domain/layout/component/Header.js - About 1 hr to fix

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

              case PieTypes.POSTS_PERDAY:
                return metric.postsMetric.postsByDays().map(pos => ({ key: pos.day, value: pos.postsMetric.totalPosts() }));
          Severity: Major
          Found in src/domain/metric/component/Pie.js and 3 other locations - About 1 hr to fix
          src/domain/metric/component/Pie.js on lines 52..53
          src/domain/metric/component/Pie.js on lines 62..63
          src/domain/metric/component/Pie.js on lines 64..65

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

          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

              case PieTypes.COMMENTS_PERDAY:
                return metric.commentsMetric.commentsByDays().map(pos => ({ key: pos.day, value: pos.commentsMetric.totalComments() }));
          Severity: Major
          Found in src/domain/metric/component/Pie.js and 3 other locations - About 1 hr to fix
          src/domain/metric/component/Pie.js on lines 50..51
          src/domain/metric/component/Pie.js on lines 52..53
          src/domain/metric/component/Pie.js on lines 64..65

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

          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

              case PieTypes.POSTS_PERHOUR:
                return metric.postsMetric.postsByHours().map(pos => ({ key: pos.hour, value: pos.postsMetric.totalPosts() }));
          Severity: Major
          Found in src/domain/metric/component/Pie.js and 3 other locations - About 1 hr to fix
          src/domain/metric/component/Pie.js on lines 50..51
          src/domain/metric/component/Pie.js on lines 62..63
          src/domain/metric/component/Pie.js on lines 64..65

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

          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

              case PieTypes.COMMENTS_PERHOUR:
                return metric.commentsMetric.commentsByHours().map(pos => ({ key: pos.hour, value: pos.commentsMetric.totalComments() }));
          Severity: Major
          Found in src/domain/metric/component/Pie.js and 3 other locations - About 1 hr to fix
          src/domain/metric/component/Pie.js on lines 50..51
          src/domain/metric/component/Pie.js on lines 52..53
          src/domain/metric/component/Pie.js on lines 62..63

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

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

          const Card = props => {
            const { id, name, cover, owner, privacy } = props;
            return (
              <div>
                <MediaQuery minDeviceWidth={320} maxWidthDevice={736} minWidth={320} maxWidth={736}>
          Severity: Minor
          Found in src/domain/group/component/GroupInfo.js - About 1 hr to fix

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

                unionWith<T>(a1: Array<T>, a2: Array<T>, comparator?: Comparator<T>): Array<T>;
            Severity: Major
            Found in flow-typed/npm/lodash_v4.x.x.js and 6 other locations - About 1 hr to fix
            flow-typed/npm/lodash_v4.x.x.js on lines 94..94
            flow-typed/npm/lodash_v4.x.x.js on lines 99..99
            flow-typed/npm/lodash_v4.x.x.js on lines 131..131
            flow-typed/npm/lodash_v4.x.x.js on lines 148..148
            flow-typed/npm/lodash_v4.x.x.js on lines 153..153
            flow-typed/npm/lodash_v4.x.x.js on lines 165..165

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

            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

                xorWith<T>(a1: Array<T>, a2: Array<T>, comparator?: Comparator<T>): Array<T>;
            Severity: Major
            Found in flow-typed/npm/lodash_v4.x.x.js and 6 other locations - About 1 hr to fix
            flow-typed/npm/lodash_v4.x.x.js on lines 94..94
            flow-typed/npm/lodash_v4.x.x.js on lines 99..99
            flow-typed/npm/lodash_v4.x.x.js on lines 131..131
            flow-typed/npm/lodash_v4.x.x.js on lines 136..136
            flow-typed/npm/lodash_v4.x.x.js on lines 148..148
            flow-typed/npm/lodash_v4.x.x.js on lines 165..165

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

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

              render() {
                const { list } = this.props;
            
                const parsedList = list.map((li: UserMetric) => ({
                  profile: (<div>
            Severity: Minor
            Found in src/domain/metric/component/MemberList.js - About 1 hr to fix

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

                  intersectionBy<T>(a1: Array<T>, a2: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
              Severity: Major
              Found in flow-typed/npm/lodash_v4.x.x.js and 6 other locations - About 1 hr to fix
              flow-typed/npm/lodash_v4.x.x.js on lines 99..99
              flow-typed/npm/lodash_v4.x.x.js on lines 131..131
              flow-typed/npm/lodash_v4.x.x.js on lines 136..136
              flow-typed/npm/lodash_v4.x.x.js on lines 148..148
              flow-typed/npm/lodash_v4.x.x.js on lines 153..153
              flow-typed/npm/lodash_v4.x.x.js on lines 165..165

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

              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

                  intersectionWith<T>(a1: Array<T>, a2: Array<T>, comparator: Comparator<T>): Array<T>;
              Severity: Major
              Found in flow-typed/npm/lodash_v4.x.x.js and 6 other locations - About 1 hr to fix
              flow-typed/npm/lodash_v4.x.x.js on lines 94..94
              flow-typed/npm/lodash_v4.x.x.js on lines 131..131
              flow-typed/npm/lodash_v4.x.x.js on lines 136..136
              flow-typed/npm/lodash_v4.x.x.js on lines 148..148
              flow-typed/npm/lodash_v4.x.x.js on lines 153..153
              flow-typed/npm/lodash_v4.x.x.js on lines 165..165

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

              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