nukeop/nuclear

View on GitHub

Showing 71 of 245 total issues

File App.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import FontAwesome from 'react-fontawesome';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { NavLink, withRouter } from 'react-router-dom';
Severity: Minor
Found in packages/app/app/App.js - About 4 hrs to fix

    File index.js has 358 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import logger from 'electron-timber';
    import { LastFmApi } from '@nuclear/core';
    import _ from 'lodash';
    import artPlaceholder from '../../resources/media/art_placeholder.png';
    import globals from '../globals';
    Severity: Minor
    Found in packages/app/app/actions/index.js - About 4 hrs to fix

      File index.js has 350 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      import PropTypes from 'prop-types';
      import { remote } from 'electron';
      import { Button, Input, Radio, Segment, Dropdown } from 'semantic-ui-react';
      import Range from 'react-range-progress';
      Severity: Minor
      Found in packages/app/app/components/Settings/index.js - About 4 hrs to fix

        Function createWindow has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function createWindow() {
          logger.log('Electron is ready, creating a window');
          win = new BrowserWindow({
            width: 1366,
            height: 768,
        Severity: Major
        Found in packages/app/server/main.dev.js - About 3 hrs to fix

          Function TrackPopupContainer has 82 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const TrackPopupContainer = props => {
            const {
              trigger,
              track,
              artist,
          Severity: Major
          Found in packages/app/app/containers/TrackPopupContainer/index.js - About 3 hrs to fix

            Function initSwagger has 79 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function initSwagger(app) {
              swagger.reset();
              swagger.initialise(app, {
                title: 'Nuclear REST API',
                description: 'This Api allow you to remotly control nuclear desktop app',
            Severity: Major
            Found in packages/app/server/http/swagger.js - About 3 hrs to fix

              Function playerRouter has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function playerRouter() {
              
                const router = express.Router();
                
                swagger.swaggerize(router);
              Severity: Major
              Found in packages/app/server/http/api/player.js - About 3 hrs to fix

                File index.js has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from 'react';
                import PropTypes from 'prop-types';
                import { Dimmer, Icon, Loader } from 'semantic-ui-react';
                import { ipcRenderer } from 'electron';
                import { withTranslation } from 'react-i18next';
                Severity: Minor
                Found in packages/app/app/components/AlbumView/index.js - About 2 hrs to fix

                  Function createWindow has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function createWindow() {
                    win = new BrowserWindow({
                      width: 1366,
                      height: 768,
                      frame: !getOption('framelessWindow'),
                  Severity: Major
                  Found in packages/app/server/main.prod.linux.js - About 2 hrs to fix

                    Function createWindow has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function createWindow() {
                      win = new BrowserWindow({
                        width: 1366,
                        height: 768,
                        frame: !getOption('framelessWindow'),
                    Severity: Major
                    Found in packages/app/server/main.prod.js - About 2 hrs to fix

                      Function PluginsReducer has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function PluginsReducer(state=initialState, action) {
                        switch (action.type) {
                        case CREATE_PLUGINS:
                          return {
                            ...state,
                      Severity: Major
                      Found in packages/app/app/reducers/plugins.js - About 2 hrs to fix

                        Function swaggerRouter has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function swaggerRouter() {
                          const router = express.Router();
                        
                          router.get('/swagger.json', (req, res) => {
                            res.json(swagger.json());
                        Severity: Major
                        Found in packages/app/server/http/api/swagger.js - About 2 hrs to fix

                          Function LocalReducer has 61 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 packages/app/app/reducers/local.js - About 2 hrs to fix

                            Function EqualizerReducer has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function EqualizerReducer(state = getInitialState(), action) {
                              let newState;
                            
                              switch (action.type) {
                              case CHANGE_VALUE: {
                            Severity: Major
                            Found in packages/app/app/reducers/equalizer.js - About 2 hrs to fix

                              App has 21 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              @withTranslation('app')
                              class App extends React.Component {
                                constructor(props) {
                                  super(props);
                                }
                              Severity: Minor
                              Found in packages/app/app/App.js - About 2 hrs to fix

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

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

                                  Function localFileRouter has 53 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: Major
                                  Found in packages/app/server/http/api/localfile.js - About 2 hrs to fix

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

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

                                      Function scanFoldersAndGetMeta has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export async function scanFoldersAndGetMeta(directories, cache = {}, onProgress = null) {
                                        const baseFiles = await Promise.all(
                                          _.flatMap(
                                            SUPPORTED_FORMATS,
                                            format => directories.map(
                                      Severity: Major
                                      Found in packages/app/server/local-files.js - About 2 hrs to fix

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

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