jtassin/react-responsive-table

View on GitHub

Showing 279 of 279 total issues

Function setupCompiler has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function setupCompiler(host, port, protocol) {
  // "Compiler" is a low-level interface to Webpack.
  // It lets us listen to some events and provide our own custom messages.
  compiler = webpack(config, handleCompile);

Severity: Minor
Found in scripts/start.js - About 1 hr to fix

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

    export default function render() {
      return (
        <div>
          <div style={{ backgroundColor: 'white' }}>
            <Playground
    Severity: Minor
    Found in examples/src/FormExample.jsx - About 1 hr to fix

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

      export default function render() {
        return (
          <div>
            <div style={{ backgroundColor: 'white' }}>
              <Playground
      Severity: Minor
      Found in examples/src/MaterialExample.jsx - About 1 hr to fix

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

        Cell.getStyles = (props, context) => {
          let style = {
            display: 'flex',
            flexGrow: 1,
            overflow: 'hidden',
        Severity: Minor
        Found in src/Cell/index.jsx - About 1 hr to fix

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

          export default function render() {
            return (
              <div>
                <div style={{ backgroundColor: 'white' }}>
                  <Playground
          Severity: Minor
          Found in examples/src/BasicExample.jsx - About 1 hr to fix

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

                it('render inside the cell the children', () => {
                    let wrapper = shallow(
                        <Cell><span>Content</span></Cell>
                    );
                  expect(wrapper).toMatchSnapshot();
            Severity: Major
            Found in src/Cell/__tests__/Cell.test.jsx and 2 other locations - About 1 hr to fix
            src/Row/__tests__/Row.test.jsx on lines 87..92
            src/Table/__tests__/Table.test.jsx on lines 48..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 60.

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

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

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

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

            Refactorings

            Further Reading

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

                it('render inside the table the children', () => {
                    let wrapper = shallow(
                        <Table><div>Table Content</div></Table>
                    );
                    expect(wrapper).toMatchSnapshot();
            Severity: Major
            Found in src/Table/__tests__/Table.test.jsx and 2 other locations - About 1 hr to fix
            src/Cell/__tests__/Cell.test.jsx on lines 43..48
            src/Row/__tests__/Row.test.jsx on lines 87..92

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 60.

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

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

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

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

            Refactorings

            Further Reading

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

                it('render inside the row the children', () => {
                    const wrapper = shallow(
                        <Row><p>Row Content</p></Row>
                    );
                    expect(wrapper).toMatchSnapshot();
            Severity: Major
            Found in src/Row/__tests__/Row.test.jsx and 2 other locations - About 1 hr to fix
            src/Cell/__tests__/Cell.test.jsx on lines 43..48
            src/Table/__tests__/Table.test.jsx on lines 48..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 60.

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

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

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

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

            Refactorings

            Further Reading

            Function addMiddleware has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function addMiddleware(devServer) {
              // `proxy` lets you to specify a fallback server during development.
              // Every unrecognized request will be forwarded to it.
              var proxy = require(paths.appPackageJson).proxy;
              devServer.use(historyApiFallback({
            Severity: Minor
            Found in scripts/start.js - About 1 hr to fix

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

                  it('add material-ui styles according to the theme if material is true', () => {
                    let wrapper = shallow(
                      Table({material: true}, { muiTheme: getMuiTheme(lightBaseTheme) })
                    );
                    expect(wrapper).toMatchSnapshot();
              Severity: Major
              Found in src/Table/__tests__/Table.test.jsx and 1 other location - About 1 hr to fix
              src/Cell/__tests__/Cell.test.jsx on lines 65..70

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 59.

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

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

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

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

              Refactorings

              Further Reading

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

                    it('use the material ui theme', () => {
                      let wrapper = shallow(
                        Cell({material: true}, { muiTheme: getMuiTheme(lightBaseTheme) })
                      );
                      expect(wrapper).toMatchSnapshot();
              Severity: Major
              Found in src/Cell/__tests__/Cell.test.jsx and 1 other location - About 1 hr to fix
              src/Table/__tests__/Table.test.jsx on lines 65..70

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 59.

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

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

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

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

              Refactorings

              Further Reading

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

                  it('merge styles passed as argument to component style', () => {
                      const wrapper = shallow(
                          <Row style={{ backgroundColor: 'green' }}/>
                      );
                      expect(wrapper).toMatchSnapshot();
              Severity: Major
              Found in src/Row/__tests__/Row.test.jsx and 2 other locations - About 1 hr to fix
              src/Cell/__tests__/Cell.test.jsx on lines 36..41
              src/Table/__tests__/Table.test.jsx on lines 41..46

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

              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('merge styles passed as argument to component style', () => {
                      let wrapper = shallow(
                          <Table style={{ color: 'blue' }}/>
                      );
                      expect(wrapper).toMatchSnapshot();
              Severity: Major
              Found in src/Table/__tests__/Table.test.jsx and 2 other locations - About 1 hr to fix
              src/Cell/__tests__/Cell.test.jsx on lines 36..41
              src/Row/__tests__/Row.test.jsx on lines 80..85

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

              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('merge styles passed as argument to component style', () => {
                      let wrapper = shallow(
                          <Cell style={{ color: 'red' }}/>
                      );
                      expect(wrapper).toMatchSnapshot();
              Severity: Major
              Found in src/Cell/__tests__/Cell.test.jsx and 2 other locations - About 1 hr to fix
              src/Row/__tests__/Row.test.jsx on lines 80..85
              src/Table/__tests__/Table.test.jsx on lines 41..46

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

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

              function runDevServer(host, port, protocol) {
                var devServer = new WebpackDevServer(compiler, {
                  // Enable gzip compression of generated files.
                  compress: true,
                  // Silence WebpackDevServer's own logs since they're generally not useful.
              Severity: Minor
              Found in scripts/start.js - About 1 hr to fix

                Function getStyles has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                Row.getStyles = (props, context) => {
                  let style = {
                    display: 'flex',
                    flexDirection: 'row',
                    flexWrap: 'wrap',
                Severity: Minor
                Found in src/Row/index.jsx - About 55 mins 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

                    it('does not fail if context.muiTheme is missing', () => {
                      const wrapper = shallow(
                        <Row material={true}/>
                      );
                      expect(wrapper).toMatchSnapshot();
                Severity: Major
                Found in src/Row/__tests__/Row.test.jsx and 3 other locations - About 50 mins to fix
                src/Cell/__tests__/Cell.test.jsx on lines 51..56
                src/Cell/__tests__/Cell.test.jsx on lines 58..63
                src/Row/__tests__/Row.test.jsx on lines 96..101

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 51.

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

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

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

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

                Refactorings

                Further Reading

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

                    it('does not take striped boolean into account if material is false', () => {
                      const wrapper = shallow(
                        <Row striped={true}/>
                      );
                      expect(wrapper).toMatchSnapshot();
                Severity: Major
                Found in src/Row/__tests__/Row.test.jsx and 3 other locations - About 50 mins to fix
                src/Cell/__tests__/Cell.test.jsx on lines 51..56
                src/Cell/__tests__/Cell.test.jsx on lines 58..63
                src/Row/__tests__/Row.test.jsx on lines 103..108

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 51.

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

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

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

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

                Refactorings

                Further Reading

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

                      it('does not take header boolean into account if material is false', () => {
                        let wrapper = shallow(
                          <Cell header={true}/>
                        );
                        expect(wrapper).toMatchSnapshot();
                Severity: Major
                Found in src/Cell/__tests__/Cell.test.jsx and 3 other locations - About 50 mins to fix
                src/Cell/__tests__/Cell.test.jsx on lines 58..63
                src/Row/__tests__/Row.test.jsx on lines 96..101
                src/Row/__tests__/Row.test.jsx on lines 103..108

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 51.

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

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

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

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

                Refactorings

                Further Reading

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

                      it('does not fail if context.muiTheme is missing', () => {
                        let wrapper = shallow(
                          <Cell material={true}/>
                        );
                        expect(wrapper).toMatchSnapshot();
                Severity: Major
                Found in src/Cell/__tests__/Cell.test.jsx and 3 other locations - About 50 mins to fix
                src/Cell/__tests__/Cell.test.jsx on lines 51..56
                src/Row/__tests__/Row.test.jsx on lines 96..101
                src/Row/__tests__/Row.test.jsx on lines 103..108

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 51.

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

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

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

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

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language