hellowin/kanca

View on GitHub

Showing 264 of 264 total issues

File office-ui-fabric-react_vx.x.x.js has 4365 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// flow-typed signature: 8fe4de24b96d1a79c9580c06badf8774
// flow-typed version: <<STUB>>/office-ui-fabric-react_v^1.9.1/flow_v0.43.1

/**
 * This is an autogenerated libdef stub for:
Severity: Major
Found in flow-typed/npm/office-ui-fabric-react_vx.x.x.js - About 1 wk to fix

    File eslint_vx.x.x.js has 1947 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // flow-typed signature: 67107edacbda29c147b24c9b0d8966e6
    // flow-typed version: <<STUB>>/eslint_v^3.8.1/flow_v0.45.0
    
    /**
     * This is an autogenerated libdef stub for:
    Severity: Major
    Found in flow-typed/npm/eslint_vx.x.x.js - About 5 days to fix

      File eslint-plugin-jsx-a11y_vx.x.x.js has 1191 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // flow-typed signature: e364416a275e86073351f1da7f829749
      // flow-typed version: <<STUB>>/eslint-plugin-jsx-a11y_v^4.0.0/flow_v0.45.0
      
      /**
       * This is an autogenerated libdef stub for:
      Severity: Major
      Found in flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js - About 3 days to fix

        File c3_vx.x.x.js has 783 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // flow-typed signature: f8b8acbaeb1d6d64e5ea7c0f6d5da59b
        // flow-typed version: <<STUB>>/c3_v^0.4.11/flow_v0.45.0
        
        /**
         * This is an autogenerated libdef stub for:
        Severity: Major
        Found in flow-typed/npm/c3_vx.x.x.js - About 1 day to fix

          File stopwords.id.js has 764 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          export default `
          ada
          adalah
          adanya
          adapun
          Severity: Major
          Found in src/infra/service/stopwords.id.js - About 1 day to fix

            File stopwords.en.js has 666 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            export default `
            a
            able
            about
            above
            Severity: Major
            Found in src/infra/service/stopwords.en.js - About 1 day to fix

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

                            case 2:
                              return (
                                <li key={key} className="list-group-item">
                                  <div className="col-12" style={{ margin: '0 -15px' }}>
                                    {user.picture ? <img alt="user pic" src={user.picture} className="mr-1 mb-1" style={{ float: 'left', width: '40px' }} /> : ''}
              Severity: Major
              Found in src/domain/metric/component/TopUserActivity.js and 2 other locations - About 1 day to fix
              src/domain/metric/component/TopUserActivity.js on lines 83..92
              src/domain/metric/component/TopUserActivity.js on lines 93..102

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

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

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

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

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

              Refactorings

              Further Reading

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

                            case 0:
                              return (
                                <li key={key} className="list-group-item">
                                  <div className="col-12" style={{ margin: '0 -15px' }}>
                                    {user.picture ? <img alt="user pic" src={user.picture} className="mr-1 mb-1" style={{ float: 'left', width: '50px' }} /> : ''}
              Severity: Major
              Found in src/domain/metric/component/TopUserActivity.js and 2 other locations - About 1 day to fix
              src/domain/metric/component/TopUserActivity.js on lines 93..102
              src/domain/metric/component/TopUserActivity.js on lines 103..112

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

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

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

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

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

              Refactorings

              Further Reading

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

                            case 1:
                              return (
                                <li key={key} className="list-group-item">
                                  <div className="col-12" style={{ margin: '0 -15px' }}>
                                    {user.picture ? <img alt="user pic" src={user.picture} className="mr-1 mb-1" style={{ float: 'left', width: '45px' }} /> : ''}
              Severity: Major
              Found in src/domain/metric/component/TopUserActivity.js and 2 other locations - About 1 day to fix
              src/domain/metric/component/TopUserActivity.js on lines 83..92
              src/domain/metric/component/TopUserActivity.js on lines 103..112

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

              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 commentsByHours = () => {
                  const hours = {};
                  commentMetrics.forEach(met => {
                    const hour = moment(met.createdTime).format('HH');
                    let trihourly = Math.ceil(parseInt(hour, 10)/3) + '';
              Severity: Major
              Found in src/domain/metric/service/commentsMetric.js and 1 other location - About 1 day to fix
              src/domain/metric/service/postsMetric.js on lines 38..53

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

              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 postsByHours = () => {
                  const hours = {};
                  postMetrics.forEach(met => {
                    const hour = moment(met.createdTime).format('HH');
                    let trihourly = Math.ceil(parseInt(hour, 10)/3) + '';
              Severity: Major
              Found in src/domain/metric/service/postsMetric.js and 1 other location - About 1 day to fix
              src/domain/metric/service/commentsMetric.js on lines 35..50

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

              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 const extractDateRangeFromPosts = (posts: Post[], granularity: moment.unitOfTime.Base): { dateStart: Date, dateEnd: Date } => {
                const start: string = (_.sortBy(posts, 'created_time')[0] || {}).created_time;
                const end: string = (_.sortBy(posts, 'created_time').reverse()[0] || {}).created_time;
                const startOf = moment(start).startOf(granularity);
                const endOf = moment(end).endOf(granularity);
              Severity: Major
              Found in src/domain/metric/service/timeRangeMetric.js and 1 other location - About 1 day to fix
              src/domain/metric/service/timeRangeMetric.js on lines 77..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 200.

              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 const extractDateRangeFromComments = (comments: Comment[], granularity: moment.unitOfTime.Base): { dateStart: Date, dateEnd: Date } => {
                const start: string = (_.sortBy(comments, 'created_time')[0] || {}).created_time;
                const end: string = (_.sortBy(comments, 'created_time').reverse()[0] || {}).created_time;
                const startOf = moment(start).startOf(granularity);
                const endOf = moment(end).endOf(granularity);
              Severity: Major
              Found in src/domain/metric/service/timeRangeMetric.js and 1 other location - About 1 day to fix
              src/domain/metric/service/timeRangeMetric.js on lines 66..75

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

              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

                  case PieTypes.COMMENTS_PERTRIHOUR:
                    const commentTrihourly: { [string]: { key: string, value: number } } = {};
                    metric.commentsMetric.commentsByHours().map(pos => ({ key: pos.trihourly, value: pos.commentsMetric.totalComments() }))
                      .forEach(det => {
                        if (!commentTrihourly[det.key]) commentTrihourly[det.key] = { key: det.key, value: 0 };
              Severity: Major
              Found in src/domain/metric/component/Pie.js and 1 other location - About 7 hrs to fix
              src/domain/metric/component/Pie.js on lines 54..61

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

              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

                  case PieTypes.POSTS_PERTRIHOUR:
                    const postTrihourly: { [string]: { key: string, value: number } } = {};
                    metric.postsMetric.postsByHours().map(pos => ({ key: pos.trihourly, value: pos.postsMetric.totalPosts() }))
                      .forEach(det => {
                        if (!postTrihourly[det.key]) postTrihourly[det.key] = { key: det.key, value: 0 };
              Severity: Major
              Found in src/domain/metric/component/Pie.js and 1 other location - About 7 hrs to fix
              src/domain/metric/component/Pie.js on lines 66..73

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

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

                  const forms: FormObject[] = [
                    { type: FormTypes.DATE, label: 'Date start', value: data.dateStart, model: 'dateStart', col: 4 },
                    { type: FormTypes.DATE, label: 'Date end', value: data.dateEnd, model: 'dateEnd', col: 4 },
                    { type: FormTypes.SELECT, label: 'Granularity', value: data.granularity, model: 'granularity', col: 4, selectOptions: [
                      { text: 'Daily', value: 'd' },
              Severity: Major
              Found in src/domain/metric/container/Comments.js and 3 other locations - About 7 hrs to fix
              src/domain/metric/container/Posts.js on lines 56..65
              src/domain/metric/container/Summary.js on lines 57..66
              src/domain/metric/container/UserProfile.js on lines 70..79

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

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

                  const forms: FormObject[] = [
                    { type: FormTypes.DATE, label: 'Date start', value: data.dateStart, model: 'dateStart', col: 4 },
                    { type: FormTypes.DATE, label: 'Date end', value: data.dateEnd, model: 'dateEnd', col: 4 },
                    { type: FormTypes.SELECT, label: 'Granularity', value: data.granularity, model: 'granularity', col: 4, selectOptions: [
                      { text: 'Daily', value: 'd' },
              Severity: Major
              Found in src/domain/metric/container/Summary.js and 3 other locations - About 7 hrs to fix
              src/domain/metric/container/Comments.js on lines 56..65
              src/domain/metric/container/Posts.js on lines 56..65
              src/domain/metric/container/UserProfile.js on lines 70..79

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

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

                  const forms: FormObject[] = [
                    { type: FormTypes.DATE, label: 'Date start', value: data.dateStart, model: 'dateStart', col: 4 },
                    { type: FormTypes.DATE, label: 'Date end', value: data.dateEnd, model: 'dateEnd', col: 4 },
                    { type: FormTypes.SELECT, label: 'Granularity', value: data.granularity, model: 'granularity', col: 4, selectOptions: [
                      { text: 'Daily', value: 'd' },
              Severity: Major
              Found in src/domain/metric/container/Posts.js and 3 other locations - About 7 hrs to fix
              src/domain/metric/container/Comments.js on lines 56..65
              src/domain/metric/container/Summary.js on lines 57..66
              src/domain/metric/container/UserProfile.js on lines 70..79

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

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

                  const forms: FormObject[] = [
                    { type: FormTypes.DATE, label: 'Date start', value: data.dateStart, model: 'dateStart', col: 4 },
                    { type: FormTypes.DATE, label: 'Date end', value: data.dateEnd, model: 'dateEnd', col: 4 },
                    { type: FormTypes.SELECT, label: 'Granularity', value: data.granularity, model: 'granularity', col: 4, selectOptions: [
                      { text: 'Daily', value: 'd' },
              Severity: Major
              Found in src/domain/metric/container/UserProfile.js and 3 other locations - About 7 hrs to fix
              src/domain/metric/container/Comments.js on lines 56..65
              src/domain/metric/container/Posts.js on lines 56..65
              src/domain/metric/container/Summary.js on lines 57..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 175.

              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

              File lodash_v4.x.x.js has 456 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // flow-typed signature: 53b581d81115b53eaf3a74ae963c4f43
              // flow-typed version: ba3c3d2dca/lodash_v4.x.x/flow_>=v0.38.x <=v0.46.x
              
              declare module 'lodash' {
                declare type TemplateSettings = {
              Severity: Minor
              Found in flow-typed/npm/lodash_v4.x.x.js - About 6 hrs to fix
                Severity
                Category
                Status
                Source
                Language