pat310/quick-pivot

View on GitHub

Showing 119 of 119 total issues

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

    const expectedResult = [
      { value: [ 'sum age', 'sum age', 'Totals' ],
        depth: 0,
        type: 'colHeader',
        row: 0 },
Severity: Major
Found in test/index/filter.js and 1 other location - About 2 days to fix
test/index/filter.js on lines 45..69

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

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

    const expectedResult = [
      {
        value: [ 'sum age', 'sum age', 'Totals' ],
        depth: 0,
        type: 'colHeader',
Severity: Major
Found in test/index/filter.js and 1 other location - About 2 days to fix
test/index/filter.js on lines 85..113

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

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

export function tableCreator(data, rows = [], cols = [], accCatOrCB,
  accTypeOrInitVal, rowHeader, columnSortFunc) {

  /** if data is empty, return empty array */
  if (data.length === 0) {
Severity: Minor
Found in src/logic.js - About 1 day 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

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

    const data = [
      { name: 'Jon', gender: 'm', house: 'Stark', age: 14 },
      { name: 'Arya', gender: 'f', house: 'Stark', age: 10 },
      { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 },
      { name: 'Tywin', gender: 'm', house: 'Lannister', age: 67 },
Severity: Major
Found in test/logic/tableCreator.js and 3 other locations - About 1 day to fix
test/filtering/createUniqueValues.js on lines 4..14
test/filtering/filter.js on lines 4..14
test/logic/tableCreator.js on lines 15..25

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

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

const data = [
  { name: 'Jon', gender: 'm', house: 'Stark', age: 14 },
  { name: 'Arya', gender: 'f', house: 'Stark', age: 10 },
  { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 },
  { name: 'Tywin', gender: 'm', house: 'Lannister', age: 67 },
Severity: Major
Found in test/filtering/filter.js and 3 other locations - About 1 day to fix
test/filtering/createUniqueValues.js on lines 4..14
test/logic/tableCreator.js on lines 15..25
test/logic/tableCreator.js on lines 325..335

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

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

const dataEmptyStrings = [
  {name: 'Jon', gender: 'm', house: 'Stark', age: 14},
  {name: '', gender: 'f', house: 'Stark', age: 10},
  {name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38},
  {name: '', gender: 'm', house: 'Lannister', age: 67},
Severity: Major
Found in test/logic/tableCreator.js and 3 other locations - About 1 day to fix
test/filtering/createUniqueValues.js on lines 4..14
test/filtering/filter.js on lines 4..14
test/logic/tableCreator.js on lines 325..335

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

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

const data = [
  { name: 'Jon', gender: 'm', house: 'Stark', age: 14 },
  { name: 'Arya', gender: 'f', house: 'Stark', age: 10 },
  { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 },
  { name: 'Tywin', gender: 'm', house: 'Lannister', age: 67 },
Severity: Major
Found in test/filtering/createUniqueValues.js and 3 other locations - About 1 day to fix
test/filtering/filter.js on lines 4..14
test/logic/tableCreator.js on lines 15..25
test/logic/tableCreator.js on lines 325..335

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

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

      const expectedData = {
        brooklyn: [
          {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
          {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
          {name: 'jessica', borough: 'brooklyn', age: '28', gender: 'f'},
Severity: Major
Found in test/logic/groupByCategories.js and 1 other location - About 1 day to fix
test/logic/groupByCategory.js on lines 19..34

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

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

      const expectedData = {
        brooklyn: [
          {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
          {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
          {name: 'jessica', borough: 'brooklyn', age: '28', gender: 'f'},
Severity: Major
Found in test/logic/groupByCategory.js and 1 other location - About 1 day to fix
test/logic/groupByCategories.js on lines 19..34

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

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

export function tableCreator(data, rows = [], cols = [], accCatOrCB,
  accTypeOrInitVal, rowHeader, columnSortFunc) {

  /** if data is empty, return empty array */
  if (data.length === 0) {
Severity: Major
Found in src/logic.js - About 1 day to fix

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

        const expectedTable = [
          { value: [ 'sum age', 'Stark', 'Baratheon', 'Lannister', 'Totals' ],
            depth: 0,
            type: 'colHeader',
            row: 0 },
    Severity: Major
    Found in test/index/expand.js and 1 other location - About 7 hrs to fix
    test/index/collapse.js on lines 33..69

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

    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

        const expectedTable = [
          {
            value: ['sum age', 'Stark', 'Baratheon', 'Lannister', 'Totals'],
            depth: 0,
            type: 'colHeader',
    Severity: Major
    Found in test/index/collapse.js and 1 other location - About 7 hrs to fix
    test/index/expand.js on lines 88..111

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

    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

      it('should be able to chain to collapse multiple rows', () => {
        const pivot = new Pivot(
          dataArray,
          rowsToPivotTestOne,
          colsToPivotTestOne,
    Severity: Major
    Found in test/index/collapse.js and 1 other location - About 7 hrs to fix
    test/index/collapse.js on lines 165..200

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

    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

      it('should collapse to the same result regardless of order collapsed',
        () => {
          const pivot = new Pivot(
            dataArray,
            rowsToPivotTestOne,
    Severity: Major
    Found in test/index/collapse.js and 1 other location - About 7 hrs to fix
    test/index/collapse.js on lines 129..163

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

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

    const data = [
      {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
      {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
      {name: 'niles', borough: 'manhattan', age: '30', gender: 'm'},
      {name: 'jared', borough: 'manhattan', age: '29', gender: 'm'},
    Severity: Major
    Found in test/logic/groupByCategories.js and 7 other locations - About 7 hrs to fix
    test/logic/accumulator.js on lines 4..13
    test/logic/createColumnHeaders.js on lines 4..13
    test/logic/fixDataFormat.js on lines 4..13
    test/logic/fixDataFormat.js on lines 65..74
    test/logic/fixDataFormat.js on lines 81..90
    test/logic/groupByCategory.js on lines 4..13
    test/logic/tableCreator.js on lines 4..13

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

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

        const expectedData = [
          { name: 'jessica', borough: 'brooklyn', age: '28', gender: 'f' },
          { name: 'greg', borough: 'brooklyn', age: '29', gender: 'm' },
          { name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm' },
          { name: 'jared', borough: 'manhattan', age: '29', gender: 'm' },
    Severity: Major
    Found in test/logic/fixDataFormat.js and 7 other locations - About 7 hrs to fix
    test/logic/accumulator.js on lines 4..13
    test/logic/createColumnHeaders.js on lines 4..13
    test/logic/fixDataFormat.js on lines 4..13
    test/logic/fixDataFormat.js on lines 81..90
    test/logic/groupByCategories.js on lines 4..13
    test/logic/groupByCategory.js on lines 4..13
    test/logic/tableCreator.js on lines 4..13

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

    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

        const expectedResults = [
          { name: 'Arya', gender: 'f', house: 'Stark', age: 10 },
          { name: 'Cersei', gender: 'f', house: 'Baratheon', age: 38 },
          { name: 'Tywin', gender: 'm', house: 'Lannister', age: 67 },
          { name: 'Tyrion', gender: 'm', house: 'Lannister', age: 34 },
    Severity: Major
    Found in test/filtering/filter.js and 1 other location - About 7 hrs to fix
    test/filtering/filter.js on lines 64..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 184.

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

    const data = [
      {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
      {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
      {name: 'niles', borough: 'manhattan', age: '30', gender: 'm'},
      {name: 'jared', borough: 'manhattan', age: '29', gender: 'm'},
    Severity: Major
    Found in test/logic/accumulator.js and 7 other locations - About 7 hrs to fix
    test/logic/createColumnHeaders.js on lines 4..13
    test/logic/fixDataFormat.js on lines 4..13
    test/logic/fixDataFormat.js on lines 65..74
    test/logic/fixDataFormat.js on lines 81..90
    test/logic/groupByCategories.js on lines 4..13
    test/logic/groupByCategory.js on lines 4..13
    test/logic/tableCreator.js on lines 4..13

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

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

    const data = [
      {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
      {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
      {name: 'niles', borough: 'manhattan', age: '30', gender: 'm'},
      {name: 'jared', borough: 'manhattan', age: '29', gender: 'm'},
    Severity: Major
    Found in test/logic/tableCreator.js and 7 other locations - About 7 hrs to fix
    test/logic/accumulator.js on lines 4..13
    test/logic/createColumnHeaders.js on lines 4..13
    test/logic/fixDataFormat.js on lines 4..13
    test/logic/fixDataFormat.js on lines 65..74
    test/logic/fixDataFormat.js on lines 81..90
    test/logic/groupByCategories.js on lines 4..13
    test/logic/groupByCategory.js on lines 4..13

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

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

    const data = [
      {name: 'patrick', borough: 'brooklyn', age: '28', gender: 'm'},
      {name: 'greg', borough: 'brooklyn', age: '29', gender: 'm'},
      {name: 'niles', borough: 'manhattan', age: '30', gender: 'm'},
      {name: 'jared', borough: 'manhattan', age: '29', gender: 'm'},
    Severity: Major
    Found in test/logic/createColumnHeaders.js and 7 other locations - About 7 hrs to fix
    test/logic/accumulator.js on lines 4..13
    test/logic/fixDataFormat.js on lines 4..13
    test/logic/fixDataFormat.js on lines 65..74
    test/logic/fixDataFormat.js on lines 81..90
    test/logic/groupByCategories.js on lines 4..13
    test/logic/groupByCategory.js on lines 4..13
    test/logic/tableCreator.js on lines 4..13

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

    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