just-paja/radio-drama-queen

View on GitHub

Showing 100 of 100 total issues

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

const BoardEmptyComponent = ({ onCategoryCreate }) => (
  <CanvasMessage heading='No sound categories!'>
    <Typography gutterBottom>
      Sound categories help you organize sounds so you can find what you
      want to play just by visual inspection.
Severity: Major
Found in src/soundBoards/components/BoardEmpty.jsx and 1 other location - About 2 hrs to fix
src/soundGallery/components/GalleryEmpty.jsx on lines 11..20

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

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 GalleryEmptyComponent = ({ onLibraryOpen }) => (
  <CanvasMessage heading='Sound gallery is empty!'>
    <Typography gutterBottom>
      The sound gallery stores all the sounds. You can browse and filter here.
    </Typography>
Severity: Major
Found in src/soundGallery/components/GalleryEmpty.jsx and 1 other location - About 2 hrs to fix
src/soundBoards/components/BoardEmpty.jsx on lines 10..20

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

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

  render () {
    const {
      categoryUuid,
      classes,
      focusableRef,
Severity: Minor
Found in src/soundCategories/components/CategoryItem.jsx - About 2 hrs to fix

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

      render () {
        const {
          classes,
          focusableRef,
          selectable,
    Severity: Minor
    Found in src/soundCategories/components/SoundSelectionItem.jsx - About 1 hr to fix

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

        render () {
          const { board, classes, handleSubmit } = this.props
          return (
            <Form
              className={classes.container}
      Severity: Minor
      Found in src/soundCategories/components/SoundAddDialog.jsx - About 1 hr to fix

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

          render () {
            const { categories, focusedCategory, onBoardCreate, openDialogs } = this.props
            if (openDialogs) {
              return null
            }
        Severity: Minor
        Found in src/soundWorkspaces/components/BoardShortcuts.jsx - About 1 hr to fix

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

            render () {
              const { classes, filterErrors, filterUsed, search } = this.props
              return (
                <div className={classes.container}>
                  <Input
          Severity: Minor
          Found in src/soundGallery/components/GallerySearch.jsx - About 1 hr to fix

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

              render () {
                const {
                  classes,
                  input,
                  type,
            Severity: Minor
            Found in src/components/Input.jsx - About 1 hr to fix

              Function getFrags has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getFrags (text, searchFragments) {
                const lowerCaseText = text.toLowerCase()
                return searchFragments
                  .reduce((acc, fragText) => {
                    const results = []
              Severity: Minor
              Found in src/components/HighlightText.jsx - About 1 hr to fix

                Function handleKeyDown has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                  handleKeyDown (event) {
                    if (event.key === 'ArrowDown') {
                      this.moveDown()
                    } else if (event.key === 'ArrowUp') {
                      this.moveUp()
                Severity: Minor
                Found in src/soundCategories/components/Category.jsx - About 1 hr 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

                Function matchSoundLoadFinish has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                export const matchSoundLoadFinish = (routine, uuid) => (action) => {
                  if (action) {
                    if (action.type === routine.FAILURE) {
                      return !uuid || (action.meta && action.meta.uuid === uuid)
                    }
                Severity: Minor
                Found in src/sounds/sagas/soundLoad.js - About 1 hr 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

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

                function validateDeep (file, parentName) {
                  const base = path.dirname(file)
                  const dirName = path.basename(base)
                  const mod = jetpack.read(file, 'json')
                  const modName = parentName ? `${parentName}/${dirName}` : (mod ? mod.name : path.basename(dirName))
                Severity: Minor
                Found in schema/validators.js - About 1 hr to fix

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

                    renderContent () {
                      const { activeStory, focusedStory, onStorySelect, stories } = this.props
                      if (stories.length === 0) {
                        return (
                          <CanvasMessage heading='No recent stories'>
                  Severity: Minor
                  Found in src/soundStories/components/StoryList.jsx - About 1 hr to fix

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

                      constructor (props) {
                        super(props)
                        this.handleRemove = this.handleRemove.bind(this)
                        this.handleRename = this.handleRename.bind(this)
                      }
                    Severity: Major
                    Found in src/soundBoards/components/BoardContextMenu.jsx and 8 other locations - About 1 hr to fix
                    src/soundStories/components/StoryContextMenu.jsx on lines 12..16
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/ContextMenuUncontrolled.jsx on lines 13..17
                    src/components/InputToggleButton.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundCategories/components/Category.jsx on lines 66..70
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26
                    src/soundWorkspaces/components/WorkspaceShortcuts.jsx on lines 13..17

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

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

                      constructor (props) {
                        super(props)
                        this.handleMenuClose = this.handleMenuClose.bind(this)
                        this.handleMenuOpen = this.handleMenuOpen.bind(this)
                      }
                    Severity: Major
                    Found in src/components/ContextMenuUncontrolled.jsx and 8 other locations - About 1 hr to fix
                    src/soundStories/components/StoryContextMenu.jsx on lines 12..16
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/InputToggleButton.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundBoards/components/BoardContextMenu.jsx on lines 13..17
                    src/soundCategories/components/Category.jsx on lines 66..70
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26
                    src/soundWorkspaces/components/WorkspaceShortcuts.jsx on lines 13..17

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

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

                      constructor (props) {
                        super(props)
                        this.moveLeft = this.moveLeft.bind(this)
                        this.moveRight = this.moveRight.bind(this)
                      }
                    Severity: Major
                    Found in src/soundWorkspaces/components/WorkspaceShortcuts.jsx and 8 other locations - About 1 hr to fix
                    src/soundStories/components/StoryContextMenu.jsx on lines 12..16
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/ContextMenuUncontrolled.jsx on lines 13..17
                    src/components/InputToggleButton.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundBoards/components/BoardContextMenu.jsx on lines 13..17
                    src/soundCategories/components/Category.jsx on lines 66..70
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26

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

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

                      constructor (props) {
                        super(props)
                        this.handleFocus = this.handleFocus.bind(this)
                        this.handleKeyDown = this.handleKeyDown.bind(this)
                      }
                    Severity: Major
                    Found in src/soundCategories/components/Category.jsx and 8 other locations - About 1 hr to fix
                    src/soundStories/components/StoryContextMenu.jsx on lines 12..16
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/ContextMenuUncontrolled.jsx on lines 13..17
                    src/components/InputToggleButton.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundBoards/components/BoardContextMenu.jsx on lines 13..17
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26
                    src/soundWorkspaces/components/WorkspaceShortcuts.jsx on lines 13..17

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

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

                      constructor (props) {
                        super(props)
                        this.handleChange = this.handleChange.bind(this)
                        this.handleBlur = this.handleBlur.bind(this)
                      }
                    Severity: Major
                    Found in src/components/InputToggleButton.jsx and 8 other locations - About 1 hr to fix
                    src/soundStories/components/StoryContextMenu.jsx on lines 12..16
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/ContextMenuUncontrolled.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundBoards/components/BoardContextMenu.jsx on lines 13..17
                    src/soundCategories/components/Category.jsx on lines 66..70
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26
                    src/soundWorkspaces/components/WorkspaceShortcuts.jsx on lines 13..17

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

                    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

                    function Placeholder (props) {
                      return (
                        <Typography
                          color='textSecondary'
                          className={props.selectProps.classes.placeholder}
                    Severity: Major
                    Found in src/components/InputSelect.jsx and 1 other location - About 1 hr to fix
                    src/components/InputSelect.jsx on lines 63..73

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 62.

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

                      constructor (props) {
                        super(props)
                        this.handleRemove = this.handleRemove.bind(this)
                        this.handleRename = this.handleRename.bind(this)
                      }
                    Severity: Major
                    Found in src/soundStories/components/StoryContextMenu.jsx and 8 other locations - About 1 hr to fix
                    src/components/ContextMenuControl.jsx on lines 21..25
                    src/components/ContextMenuUncontrolled.jsx on lines 13..17
                    src/components/InputToggleButton.jsx on lines 13..17
                    src/components/withContextMenu.jsx on lines 10..14
                    src/soundBoards/components/BoardContextMenu.jsx on lines 13..17
                    src/soundCategories/components/Category.jsx on lines 66..70
                    src/soundCategories/components/SoundSelection.jsx on lines 22..26
                    src/soundWorkspaces/components/WorkspaceShortcuts.jsx on lines 13..17

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

                    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