glittershark/reactable

View on GitHub

Showing 183 of 183 total issues

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

            context('from the filterer field', function() {
                it('filters case insensitive on specified columns', function() {
                    var $filter = $('#table thead tr.reactable-filterer input.reactable-filter-input');

                    $filter.val('new');
Severity: Major
Found in tests/reactable_test.jsx and 1 other location - About 6 hrs to fix
tests/reactable_test.jsx on lines 2309..2325

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

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 table.jsx has 434 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { filterPropsFrom } from './lib/filter_props_from';
import { extractDataFrom } from './lib/extract_data_from';
import { isUnsafe } from './unsafe';
import { Thead } from './thead';
Severity: Minor
Found in src/reactable/table.jsx - About 6 hrs to fix

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

        render() {
            let children = [];
            let columns;
            let userColumnsSpecified = false;
            let showHeaders = typeof this.props.hideTableHeader === 'undefined';
    Severity: Major
    Found in src/reactable/table.jsx - About 5 hrs to fix

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

                      it('sorts columns numerically', function(){
                          var sortHeader = $('#table thead tr.reactable-column-header th')[0];
                          ReactTestUtils.Simulate.click(sortHeader);
      
                          ReactableTestUtils.expectRowText(0, ['1.23']);
      Severity: Major
      Found in tests/reactable_test.jsx and 2 other locations - About 5 hrs to fix
      tests/reactable_test.jsx on lines 1690..1701
      tests/reactable_test.jsx on lines 1741..1752

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

      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

                  it('sorts columns numerically', function(){
                      var sortHeader = $('#table thead tr.reactable-column-header th')[0];
                      ReactTestUtils.Simulate.click(sortHeader);
      
                      ReactableTestUtils.expectRowText(0, ['one point two three']);
      Severity: Major
      Found in tests/reactable_test.jsx and 2 other locations - About 5 hrs to fix
      tests/reactable_test.jsx on lines 1638..1649
      tests/reactable_test.jsx on lines 1690..1701

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

      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

                  it('sorts columns numerically', function(){
                      var sortHeader = $('#table thead tr.reactable-column-header th')[0];
                      ReactTestUtils.Simulate.click(sortHeader);
      
                      ReactableTestUtils.expectRowText(0, ['1.23']);
      Severity: Major
      Found in tests/reactable_test.jsx and 2 other locations - About 5 hrs to fix
      tests/reactable_test.jsx on lines 1638..1649
      tests/reactable_test.jsx on lines 1741..1752

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

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

      module.exports = function(grunt) {
          require('load-grunt-tasks')(grunt);
      
          grunt.registerMultiTask('markdownlint', function task() {
              var done = this.async();
      Severity: Major
      Found in Gruntfile.js - About 4 hrs to fix

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

                    it('does not sort on non-enter keydown', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.keyDown(nameHeader, {keyCode: 10});
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 1 other location - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1279..1289

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

        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('sorts by last name in ascending order by enter keydown', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.keyDown(nameHeader, {keyCode: 13});
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 1 other location - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1291..1301

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

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

                    it('sorts by the age column in ascending order', function(){
                        var positionHeader = $('#table thead tr.reactable-column-header th')[1];
                        ReactTestUtils.Simulate.click(positionHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Griffin Smith', '18', 'Engineer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395

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

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

                    it('sorts by the second column in ascending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[1];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Griffin Smith', '18', 'Engineer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by the second column in descending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[1];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by the third column in ascending order', function(){
                        var positionHeader = $('#table thead tr.reactable-column-header th')[2];
                        ReactTestUtils.Simulate.click(positionHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by the first column in ascending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Griffin Smith', '18', 'Engineer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by text in descending order', function(){
                        var positionHeader = $('#table thead tr.reactable-column-header th')[2];
                        ReactTestUtils.Simulate.click(positionHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by last name in descending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by the first column in descending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by text in ascending order', function(){
                        var positionHeader = $('#table thead tr.reactable-column-header th')[2];
                        ReactTestUtils.Simulate.click(positionHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by last name in ascending order', function(){
                        var nameHeader = $('#table thead tr.reactable-column-header th')[0];
                        ReactTestUtils.Simulate.click(nameHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1385..1395
        tests/reactable_test.jsx on lines 1534..1544

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

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

                    it('sorts by the third column in descending order', function(){
                        var positionHeader = $('#table thead tr.reactable-column-header th')[2];
                        ReactTestUtils.Simulate.click(positionHeader);
        
                        ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
        Severity: Major
        Found in tests/reactable_test.jsx and 10 other locations - About 4 hrs to fix
        tests/reactable_test.jsx on lines 1231..1241
        tests/reactable_test.jsx on lines 1243..1253
        tests/reactable_test.jsx on lines 1255..1265
        tests/reactable_test.jsx on lines 1267..1277
        tests/reactable_test.jsx on lines 1324..1334
        tests/reactable_test.jsx on lines 1336..1346
        tests/reactable_test.jsx on lines 1348..1358
        tests/reactable_test.jsx on lines 1360..1370
        tests/reactable_test.jsx on lines 1373..1383
        tests/reactable_test.jsx on lines 1534..1544

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

        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