tofuness/Toshocat

View on GitHub

Showing 100 of 100 total issues

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

  render() {
    return (
      <div className="picker-btn" ref="pickerBtn">
        <div className="picker-animate-success" ref="successOvl">
          <div className="icon-check" ref="successIcon"></div>
Severity: Minor
Found in src/components/PickerButton.js - About 1 hr to fix

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

              <div className="day-name">
                {this.props.day[0] ? moment(this.props.day[0].airdate).format('ddd') : null}
              </div>
    Severity: Major
    Found in src/components/CalendarDay.js and 1 other location - About 1 hr to fix
    src/components/CalendarDay.js on lines 26..28

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

    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

              <div className="day-date">
                {this.props.day[0] ? moment(this.props.day[0].airdate).format('DD') : null}
              </div>
    Severity: Major
    Found in src/components/CalendarDay.js and 1 other location - About 1 hr to fix
    src/components/CalendarDay.js on lines 29..31

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

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

      scan() {
        return new Promise((resolve, reject) => {
          let scriptPath;
          if (process.env.NODE_ENV === 'development') {
            scriptPath = path.resolve(__dirname, '../bin/detect-media.ps1');
    Severity: Minor
    Found in main/MediaDetector.js - About 1 hr to fix

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

      ChartMenu.propTypes = {
        // Actions
        loadChart: PropTypes.func.isRequired,
        switchSeason: PropTypes.func.isRequired,
      
      
      Severity: Major
      Found in src/components/ChartMenu.js and 1 other location - About 1 hr to fix
      src/components/Chart.js on lines 43..51

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

      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

      export function featured(state = initialState.featured, action = {}) {
        switch (action.type) {
          case SHOW_FEATURED_SUCCESS:
            return action.featured;
          case SHOW_FEATURED_FAILURE:
      Severity: Major
      Found in src/reducers/explore.js and 1 other location - About 1 hr to fix
      src/reducers/explore.js on lines 28..39

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

      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

      Chart.propTypes = {
        // Actions
        loadChart: PropTypes.func.isRequired,
        switchSeason: PropTypes.func.isRequired,
      
      
      Severity: Major
      Found in src/components/Chart.js and 1 other location - About 1 hr to fix
      src/components/ChartMenu.js on lines 39..47

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

      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

      export function collections(state = initialState.collections, action = {}) {
        switch (action.type) {
          case SHOW_COLLECTIONS_SUCCESS:
            return action.collections;
          case SHOW_COLLECTIONS_FAILURE:
      Severity: Major
      Found in src/reducers/explore.js and 1 other location - About 1 hr to fix
      src/reducers/explore.js on lines 15..26

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

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

      export function requestScrobble(data) {
        return (dispatch, getState) => {
          const { currentScrobble, currentList } = getState();
          if (!_.isEqual(currentScrobble, data)) {
            request
      Severity: Minor
      Found in src/actions/scrobble.js - About 1 hr to fix

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

          render() {
            return (
              <div
                className={cx({
                  notification: true,
        Severity: Minor
        Found in src/notification.js - About 1 hr to fix

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

                request
                .post(`http://hummingbird.me/api/v1/libraries/${series.hb_id}/remove`)
                .send({
                  auth_token: toshoStore.get('hummingbird.token')
                })
          Severity: Major
          Found in src/syncers/HummingbirdSyncer.js and 1 other location - About 1 hr to fix
          src/syncers/MyAnimeListSyncer.js on lines 51..70

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

          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

                request
                .post(`${this.APIBase}/${listType}list/${listType}`)
                .auth(this.credentials.username, this.credentials.password)
                .send({
                  manga_id: series.mal_id,
          Severity: Major
          Found in src/syncers/MyAnimeListSyncer.js and 1 other location - About 1 hr to fix
          src/syncers/HummingbirdSyncer.js on lines 95..106

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

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

            render() {
              return (
                <div className="logo">
                  <div className="logo-image" onClick={this.toggleMenu}>
                    <div
          Severity: Minor
          Found in src/components/Logo.js - About 1 hr to fix

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

              render() {
                const cardStyle = {
                  backgroundImage: `url(${this.props.series.anime.poster_image})`
                };
                return (
            Severity: Minor
            Found in src/components/CalendarFeaturedSeries.js - About 1 hr to fix

              Function showSeries has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function showSeries(id, type = 'anime', seriesData) {
                if (seriesData) {
                  return (dispatch) => {
                    dispatch({
                      type: SHOW_SERIES_SUCCESS,
              Severity: Minor
              Found in src/actions/series.js - About 1 hr to fix

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

                  render() {
                    return (
                      <div className="carousel" onWheel={this.handleWheel} onMouseEnter={this.setMaxPositionX} ref="carousel">
                        <div className="carousel-top">
                          <div className="carousel-header">
                Severity: Minor
                Found in src/components/UI/Carousel.js - About 1 hr to fix

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

                    render() {
                      return (
                        <div className="chart">
                          <ChartMenu {...this.props} />
                          <div className="chart-items">
                  Severity: Minor
                  Found in src/components/Chart.js - About 1 hr to fix

                    Function loadRSS has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function loadRSS() {
                      return (dispatch, getState) => {
                        dispatch({
                          type: SHOW_RSS_REQUEST
                        });
                    Severity: Minor
                    Found in src/actions/rss.js - About 1 hr to fix

                      Function loadCalendar has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function loadCalendar() {
                        return (dispatch) => {
                          dispatch({
                            type: LOAD_CALENDAR_REQUEST,
                          });
                      Severity: Minor
                      Found in src/actions/calendar.js - About 1 hr to fix

                        Function loadEpisodes has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function loadEpisodes() {
                          return (dispatch, getState) => {
                            const { seriesVisible, currentSeries } = getState();
                            if (seriesVisible && currentSeries.type === 'tv') {
                              dispatch({
                        Severity: Minor
                        Found in src/actions/series.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language