nukeop/nuclear

View on GitHub

Showing 65 of 206 total issues

File App.js has 363 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 app/App.js - About 4 hrs to fix

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

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

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

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

        Function createWindow has 84 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 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 app/containers/TrackPopupContainer/index.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 server/http/api/player.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 server/http/swagger.js - About 3 hrs to fix

                File index.js has 286 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 app/components/AlbumView/index.js - About 2 hrs to fix

                  Function createWindow has 65 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 server/main.prod.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 server/http/api/swagger.js - About 2 hrs to fix

                      Function createWindow has 59 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 server/main.prod.linux.js - About 2 hrs to fix

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

                        @withTranslation('app')
                        class App extends React.Component {
                          constructor(props) {
                            super(props);
                          }
                        Severity: Minor
                        Found in app/App.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 app/reducers/equalizer.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 app/components/Dashboard/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 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 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 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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language