codingblocks/qit.cloud

View on GitHub

Showing 50 of 50 total issues

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

describe('<AddToQueueButton className="{string}" />', () => {
  it('className property should be included', () => {
    const expectedValue = (new Date()).getTime().toString()
    const wrapper = shallow(<AddToQueueButton className={expectedValue} />)
    const button = wrapper.dive().find('button')
Severity: Major
Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 4 hrs to fix
website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 16..23

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

describe('<RemoveFromQueueButton className="{string}" />', () => {
  it('className property should be included', () => {
    const expectedValue = (new Date()).getTime().toString()
    const wrapper = shallow(<RemoveFromQueueButton className={expectedValue} />)
    const button = wrapper.dive().find('button')
website/src/components/Main/Episode/AddToQueueButton.test.js on lines 18..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 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 2 locations. Consider refactoring.
Open

describe('<AddToQueueButton onclick="{function}" />', () => {
  it('should trigger the function on button click', () => {
    const customMethod = sinon.spy()
    const wrapper = shallow(<AddToQueueButton onClick={customMethod} />)
    const button = wrapper.dive().find('button')
Severity: Major
Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 3 hrs to fix
website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 25..33

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

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

describe('<RemoveFromQueueButton onclick="{function}" />', () => {
  it('should trigger the function on button click', () => {
    const customMethod = sinon.spy()
    const wrapper = shallow(<RemoveFromQueueButton onClick={customMethod} />)
    const button = wrapper.dive().find('button')
website/src/components/Main/Episode/AddToQueueButton.test.js on lines 41..49

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

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

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

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

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

Refactorings

Further Reading

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

const ConnectedApp = connect(state => ({
  searchTerm: state.search.searchTerm,
  currentSearch: state.search.currentSearch,
  loading: state.search.loading,
  nowPlaying: state.player.nowPlaying,
Severity: Major
Found in website/src/App.js and 1 other location - About 3 hrs to fix
website/src/components/Main/SearchResults.js on lines 102..110

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

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

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

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

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

Refactorings

Further Reading

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

export const ConnectedSearchResults = connect(state => ({
  nowPlaying: state.player.nowPlaying,
  results: state.search.results,
  resultCount: state.search.resultCount,
  queue: state.player.queue,
Severity: Major
Found in website/src/components/Main/SearchResults.js and 1 other location - About 3 hrs to fix
website/src/App.js on lines 84..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 111.

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

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

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

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

Refactorings

Further Reading

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

  render () {
    return (
      <div ref={this.sliderRef}>
        <ScrubberWrapper>
          {!this.props.hideLabel ? (
Severity: Major
Found in website/src/components/Player/Slider.js - About 3 hrs to fix

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

      render () {
        return (
          <AudioControlsContainer>
            <TimeSliderContainer>
              <TimeSlider
    Severity: Major
    Found in website/src/components/Player/AudioPlayer.js - About 3 hrs to fix

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

        beforeEach(function () {
          cy.server()
      
          cy.route({
            method: 'GET',
      Severity: Major
      Found in website/cypress/integration/main.spec.js and 1 other location - About 3 hrs to fix
      website/cypress/integration/queue.spec.js on lines 2..15

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

      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

        beforeEach(function () {
          cy.server()
      
          cy.route({
            method: 'GET',
      Severity: Major
      Found in website/cypress/integration/queue.spec.js and 1 other location - About 3 hrs to fix
      website/cypress/integration/main.spec.js on lines 3..16

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

      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

        layout: {
          width: 'auto',
          display: 'block', // Fix IE11 issue.
          marginLeft: theme.spacing.unit * 3,
          marginRight: theme.spacing.unit * 3,
      Severity: Major
      Found in website/src/components/Main/SignInForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignUpForm.js on lines 19..29

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

      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

        layout: {
          width: 'auto',
          display: 'block', // Fix IE11 issue.
          marginLeft: theme.spacing.unit * 3,
          marginRight: theme.spacing.unit * 3,
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignInForm.js on lines 19..29

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

      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

        paper: {
          marginTop: theme.spacing.unit * 8,
          display: 'flex',
          flexDirection: 'column',
          alignItems: 'center',
      Severity: Major
      Found in website/src/components/Main/SignInForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignUpForm.js on lines 30..37

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

      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

        paper: {
          marginTop: theme.spacing.unit * 8,
          display: 'flex',
          flexDirection: 'column',
          alignItems: 'center',
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignInForm.js on lines 30..37

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

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

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

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

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

      Refactorings

      Further Reading

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

        render () {
          const { classes, showSignin } = this.props
          const { handleSubmit, handleChange } = this
          return (
            <div>
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js - About 2 hrs to fix

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

          render () {
            const {
              className,
              results,
              resultCount,
        Severity: Major
        Found in website/src/components/Main/SearchResults.js - About 2 hrs to fix

          File AudioPlayer.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import styled from 'styled-components'
          import React from 'react'
          import { actions } from 'mirrorx'
          import Mousetrap from 'mousetrap'
          
          
          Severity: Minor
          Found in website/src/components/Player/AudioPlayer.js - About 2 hrs to fix

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

            describe('<AddToQueueButton />', () => {
              it('should render without any props', () => {
                const wrapper = shallow(<AddToQueueButton />)
                const button = wrapper.dive().find('button')
                expect(button).not.toBeNull()
            Severity: Major
            Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 2 hrs to fix
            website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 8..14

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

            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

            describe('<RemoveFromQueueButton />', () => {
              it('should render without any props', () => {
                const wrapper = shallow(<RemoveFromQueueButton />)
                const button = wrapper.dive().find('button')
                expect(button).not.toBeNull()
            website/src/components/Main/Episode/AddToQueueButton.test.js on lines 10..16

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

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

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

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

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

            Refactorings

            Further Reading

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

              render () {
                const { classes, showSignup } = this.props
                const { handleSubmit, handleChange } = this
                return (
                  <div>
            Severity: Major
            Found in website/src/components/Main/SignInForm.js - About 2 hrs to fix
              Severity
              Category
              Status
              Source
              Language