nukeop/nuclear

View on GitHub

Showing 209 of 209 total issues

Function panes has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  panes () {
    const {
      actions,
      dashboardData,
      history,
Severity: Major
Found in app/components/Dashboard/index.js - About 2 hrs to fix

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

      router.post('/', validate(updateEqualizerSchema), (req, res) => {
        onUpdateEqualizer(req.body.values);
        res.send();
      })
        .describe(getStandardDescription({
    Severity: Major
    Found in server/http/api/equalizer.js and 2 other locations - About 2 hrs to fix
    server/http/api/player.js on lines 91..101
    server/http/api/player.js on lines 103..113

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

      router
        .post('/volume', validate(volumeSchema), (req, res) => {
          onVolume(req.body.value);
          res.send();
        })
    Severity: Major
    Found in server/http/api/player.js and 2 other locations - About 2 hrs to fix
    server/http/api/equalizer.js on lines 25..32
    server/http/api/player.js on lines 103..113

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

      router
        .post('/seek', validate(seekSchema), (req, res) => {
          onSeek(req.body.value);
          res.send();
        })
    Severity: Major
    Found in server/http/api/player.js and 2 other locations - About 2 hrs to fix
    server/http/api/equalizer.js on lines 25..32
    server/http/api/player.js on lines 91..101

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        let {
          compact,
          items,
          settings,
    Severity: Major
    Found in app/components/PlayQueue/index.js - About 2 hrs to fix

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

        render() {
          let {
            addPlaylist,
            updatePlaylist,
            clearQueue,
      Severity: Major
      Found in app/components/PlayQueue/QueueMenu/index.js - About 2 hrs to fix

        Function LocalReducer has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function LocalReducer(state = initialState, action) {
          switch (action.type) {
          case ADD_LOCAL_FOLDERS: {
            const folders = [
              ...state.folders,
        Severity: Major
        Found in app/reducers/local.js - About 2 hrs to fix

          Function playlistRouter has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function playlistRouter() {
          
            const router = express.Router();
            
            swagger.swaggerize(router);
          Severity: Minor
          Found in server/http/api/playlist.js - About 2 hrs to fix

            Function localFileRouter has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function localFileRouter() {
              let cache = store.get('localMeta');
              let byArtist = _.groupBy(Object.values(cache), track => track.artist.name);
            
              ipcMain.on('refresh-localfolders', async event => {
            Severity: Minor
            Found in server/http/api/localfile.js - About 2 hrs to fix

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

              QueueMenuMore.propTypes = {
                clearQueue: PropTypes.func,
                addFavoriteTrack: PropTypes.func,
                addToDownloads: PropTypes.func,
                updatePlaylist: PropTypes.func,
              Severity: Major
              Found in app/components/PlayQueue/QueueMenu/QueueMenuMore/index.js and 1 other location - About 2 hrs to fix
              app/components/OauthPopup/index.js on lines 57..65

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

              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

              OauthPopup.propTypes = {
                url: PropTypes.string,
                width: PropTypes.number,
                height: PropTypes.number,
                render: PropTypes.func,
              Severity: Major
              Found in app/components/OauthPopup/index.js and 1 other location - About 2 hrs to fix
              app/components/PlayQueue/QueueMenu/QueueMenuMore/index.js on lines 92..100

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

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

              export function settingsRouter() {
              
                const router = express.Router();
              
                swagger.swaggerize(router);
              Severity: Minor
              Found in server/http/api/settings.js - About 2 hrs to fix

                Function getChartOptions has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function getChartOptions(data) {
                  return {
                    type: 'line',
                    data,
                    options: {
                Severity: Minor
                Found in app/components/Equalizer/chart.js - About 2 hrs to fix

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

                    renderSidebarMenu () {
                      return (
                        <VerticalPanel
                          className={classnames(styles.left_panel, {
                            [`${compact.compact_panel}`]: this.props.settings.compactMenuBar
                  Severity: Minor
                  Found in app/App.js - About 1 hr to fix

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

                      win = new BrowserWindow({
                        width: 1366,
                        height: 768,
                        frame: !getOption('framelessWindow'),
                        icon: icon,
                    Severity: Major
                    Found in server/main.prod.js and 2 other locations - About 1 hr to fix
                    server/main.dev.js on lines 36..49
                    server/main.prod.linux.js on lines 27..40

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

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

                      win = new BrowserWindow({
                        width: 1366,
                        height: 768,
                        frame: !getOption('framelessWindow'),
                        icon: icon,
                    Severity: Major
                    Found in server/main.prod.linux.js and 2 other locations - About 1 hr to fix
                    server/main.dev.js on lines 36..49
                    server/main.prod.js on lines 27..40

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

                    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 artistSearch(terms) {
                      return new Promise((fulfill, reject) => {
                        nb.search('artist', {artist: terms}, (err, response) => {
                          if (err) {
                            reject(err);
                    Severity: Major
                    Found in app/rest/Musicbrainz.js and 1 other location - About 1 hr to fix
                    app/rest/Musicbrainz.js on lines 39..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 74.

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

                      win = new BrowserWindow({
                        width: 1366,
                        height: 768,
                        frame: !getOption('framelessWindow'),
                        icon: icon,
                    Severity: Major
                    Found in server/main.dev.js and 2 other locations - About 1 hr to fix
                    server/main.prod.js on lines 27..40
                    server/main.prod.linux.js on lines 27..40

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

                    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 trackSearch(terms) {
                      return new Promise((fulfill, reject) => {
                        nb.search('work', {work: terms}, (err, response) => {
                          if (err) {
                            reject(err);
                    Severity: Major
                    Found in app/rest/Musicbrainz.js and 1 other location - About 1 hr to fix
                    app/rest/Musicbrainz.js on lines 5..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 74.

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

                      renderOption (settings, option, key) {
                        return (
                          <div
                            key={key}
                            className={
                    Severity: Minor
                    Found in app/components/Settings/index.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language