nukeop/nuclear

View on GitHub
packages/app/app/containers/CommandPaletteContainer/hooks.ts

Summary

Maintainability
F
3 days
Test Coverage

Function useCommandPaletteActions has 178 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useCommandPaletteActions = (): CommandPaletteAction[] => {
  const history = useHistory();
  const dispatch = useDispatch();
  const { t } = useTranslation('command-palette');
  const settings = useSelector(settingsSelector);
Severity: Major
Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts - About 7 hrs to fix

    Function actions has 158 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const actions = () => {
        return [{
          id: 'play',
          name: t('actions.play'),
          shortcut: ['space'],
    Severity: Major
    Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts - About 6 hrs to fix

      Function useCommandPaletteActions has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      export const useCommandPaletteActions = (): CommandPaletteAction[] => {
        const history = useHistory();
        const dispatch = useDispatch();
        const { t } = useTranslation('command-palette');
        const settings = useSelector(settingsSelector);
      Severity: Minor
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts - About 45 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 2 locations. Consider refactoring.
      Open

          }, {
            id: 'go-to-previous-page',
            name: t('actions.go-to-previous-page'),
            shortcut: [isMac() ? '⌥ + ←' : 'alt + ←'],
            icon: 'chevron left',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 66..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 61.

      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

          }, {
            id: 'next',
            name: t('actions.next'),
            shortcut: [isMac() ? '⌘ + →' : 'ctrl + →'],
            icon: 'forward',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 59..66

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

      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

          }, {
            id: 'go-to-next-page',
            name: t('actions.go-to-next-page'),
            shortcut: [isMac() ? '⌥ + →' : 'alt + →'],
            icon: 'chevron right',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 73..80

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

      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

          }, {
            id: 'previous',
            name: t('actions.previous'),
            shortcut: [isMac() ? '⌘ + ←' : 'ctrl + ←'],
            icon: 'backward',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 52..59

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

      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

          }, {
            id: 'pause',
            name: t('actions.pause'),
            shortcut: ['space'],
            icon: 'pause',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 38..45

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

          return [{
            id: 'play',
            name: t('actions.play'),
            shortcut: ['space'],
            icon: 'play',
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 45..52

      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

          }, {
            id: 'maximize',
            name: t('actions.maximize'),
            icon: 'window maximize',
            category: t('categories.application'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 2 other locations - About 40 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 111..117
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 117..123

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

      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

          }, {
            id: 'minimize',
            name: t('actions.minimize'),
            icon: 'window minimize',
            category: t('categories.application'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 2 other locations - About 40 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 111..117
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 123..129

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

      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

          }, {
            id: 'quit',
            name: t('actions.quit'),
            icon: 'power off',
            category: t('categories.application'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 2 other locations - About 40 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 117..123
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 123..129

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

      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

          }, {
            id: 'go-to-equalizer',
            name: t('actions.go-to-equalizer'),
            icon: 'align right',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-visualizer',
            name: t('actions.go-to-visualizer'),
            icon: 'tint',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-library',
            name: t('actions.go-to-library'),
            icon: 'file audio outline',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189

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

      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

          }, {
            id: 'go-to-search',
            name: t('actions.go-to-search'),
            icon: 'search',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-settings',
            name: t('actions.go-to-settings'),
            icon: 'cog',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-playlists',
            name: t('actions.go-to-playlists'),
            icon: 'list alternate outline',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-downloads',
            name: t('actions.go-to-downloads'),
            icon: 'download',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-lyrics',
            name: t('actions.go-to-lyrics'),
            icon: 'microphone',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-favorite-tracks',
            name: t('actions.go-to-favorite-tracks'),
            icon: 'music',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-dashboard',
            name: t('actions.go-to-dashboard'),
            icon: 'dashboard',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 147..153
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

          }, {
            id: 'go-to-plugins',
            name: t('actions.go-to-plugins'),
            icon: 'flask',
            category: t('categories.navigation'),
      Severity: Major
      Found in packages/app/app/containers/CommandPaletteContainer/hooks.ts and 10 other locations - About 35 mins to fix
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 129..135
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 135..141
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 141..147
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 153..159
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 159..165
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 165..171
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 171..177
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 177..183
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 183..189
      packages/app/app/containers/CommandPaletteContainer/hooks.ts on lines 189..195

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

      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

      There are no issues that match your filters.

      Category
      Status