nukeop/nuclear

View on GitHub

Showing 71 of 245 total issues

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 packages/app/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 packages/app/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 packages/app/server/http/api/playlist.js - About 2 hrs to fix

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

        const HelpModal = () => {
          const [isOpen, setIsOpen] = useState(false);
          const handleOpen = useCallback(() => setIsOpen(true), []);
          const handleClose = useCallback(() => setIsOpen(false), []);
          const { t } = useTranslation('help');
        Severity: Minor
        Found in packages/app/app/components/HelpModal/index.js - About 1 hr 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 packages/app/app/App.js - About 1 hr to fix

            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 packages/app/app/components/Settings/index.js - About 1 hr to fix

              Function renderPlaylistInfo has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                renderPlaylistInfo (playlist) {
                  let popupTrigger = (
                    <a href='#' className={styles.more_button}>
                      <Icon name='ellipsis horizontal' />
                    </a>
              Severity: Minor
              Found in packages/app/app/components/PlaylistView/index.js - About 1 hr to fix

                Function QueueItem has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const QueueItem = props => {
                  let {
                    isLoading,
                    isCurrent,
                    track,
                Severity: Minor
                Found in packages/ui/lib/components/QueueItem/index.js - About 1 hr to fix

                  Function PlayerReducer has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function PlayerReducer(state=initialState, action) {
                    switch (action.type) {
                    case START_PLAYBACK:
                      return Object.assign({}, state, {
                        playbackStatus: Sound.status.PLAYING
                  Severity: Minor
                  Found in packages/app/app/reducers/player.js - About 1 hr to fix

                    Function DownloadsReducer has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function DownloadsReducer(state=initialState, action) {
                      switch (action.type) {
                      case ADD_TO_DOWNLOADS:
                        return Object.assign({}, state, {
                          downloads: _.concat(state.downloads, action.payload.item)
                    Severity: Minor
                    Found in packages/app/app/reducers/downloads.js - About 1 hr to fix

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

                        render () {
                          let { artist, tracks, t } = this.props;
                      
                          return (
                            <div className={cx(
                      Severity: Minor
                      Found in packages/app/app/components/ArtistView/PopularTracks/index.js - About 1 hr to fix

                        Function registerDownloadsEvents has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const registerDownloadsEvents = window => {
                          ipcMain.once('started', event => {
                            rendererWindow = event.sender;
                          });
                        
                        
                        Severity: Minor
                        Found in packages/app/server/downloads.js - About 1 hr to fix

                          Function ScrobblingReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function ScrobblingReducer(state=initialState, action) {
                            switch (action.type) {
                            case LASTFM_CONNECT:
                              return Object.assign({}, state, {
                                lastFmAuthToken: action.payload
                          Severity: Minor
                          Found in packages/app/app/reducers/scrobbling.js - About 1 hr to fix

                            Function createChart has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const createChart = (canvas) => {
                              const context = canvas.getContext('2d');
                              
                              const lineGradient = context.createLinearGradient(0, 0, 0, 400);
                              lineGradient.addColorStop(0, 'rgb(80, 250, 123, 0.3)');   
                            Severity: Minor
                            Found in packages/app/app/components/Equalizer/chart.js - About 1 hr to fix

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

                                renderLastFmLoginButtons () {
                                  let {
                                    lastFmAuthToken,
                                    lastFmName,
                                    lastFmSessionKey
                              Severity: Minor
                              Found in packages/app/app/components/Settings/index.js - About 1 hr to fix

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

                                module.exports = env => {
                                  let entry = env && env.LINUX ? './server/main.prod.linux.js' : './server/main.prod.js';
                                
                                  return {
                                    entry,
                                Severity: Minor
                                Found in packages/app/webpack.config.electron.prod.js - About 1 hr to fix

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

                                  export default function SearchReducer (state = initialState, action) {
                                    switch (action.type) {
                                    case UNIFIED_SEARCH_START:
                                      return reduceUnifiedSearchStart(state, action);
                                    case ALBUM_SEARCH_SUCCESS:
                                  Severity: Minor
                                  Found in packages/app/app/reducers/search.js - About 1 hr to fix

                                    Function Toast has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const Toast = props => {
                                      return (
                                        <div
                                          className={cx(
                                            common.nuclear,
                                    Severity: Minor
                                    Found in packages/ui/lib/components/ToastContainer/Toast/index.js - About 1 hr to fix

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

                                        render () {
                                          let {
                                            dashboardData,
                                            artistInfoSearchByName,
                                            albumInfoSearchByName,
                                      Severity: Minor
                                      Found in packages/app/app/components/Dashboard/BestNewMusicTab/index.js - About 1 hr to fix

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

                                          renderQueueItems() {
                                            if (!this.props.items) {
                                              return null;
                                            }
                                        
                                        
                                        Severity: Minor
                                        Found in packages/app/app/components/PlayQueue/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language