bokuweb/tsukiakari

View on GitHub

Showing 103 of 103 total issues

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

    propTypes: {
        copyKeys: React.PropTypes.object,
        volume: React.PropTypes.number,
        unmute: React.PropTypes.func,
        setVolume: React.PropTypes.func,
Severity: Major
Found in src/renderer/stylesheets/components/controls/mute/Mute.js and 1 other location - About 2 hrs to fix
src/renderer/stylesheets/components/progressbar/ProgressBar.js on lines 5..12

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

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

    propTypes: {
        orientation: React.PropTypes.string,
        step: React.PropTypes.number,
        progress: React.PropTypes.number,
        onChange: React.PropTypes.func,
src/renderer/stylesheets/components/controls/mute/Mute.js on lines 7..14

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

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

File tweetitem.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Component } from 'react';
import B from '../lib/bem';
import log from '../lib/log';
import { decodeHtml } from '../utils/utils';
import { isEqual } from 'lodash';
Severity: Minor
Found in src/renderer/src/components/tweetitem.js - About 2 hrs to fix

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

    var Video = React.createClass({
    
        propTypes: {
            // Non-standard props
            copyKeys: React.PropTypes.object,
    Severity: Minor
    Found in src/renderer/stylesheets/components/video/Video.js - About 2 hrs to fix

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

        const tweet = (state.tweets.timeline[props.timelineKey] &&
                       state.tweets.timeline[props.timelineKey].entities.tweets[props.id]) ||
                state.addColumnMenu.searchedTweets.entities.tweets[props.id];
      Severity: Major
      Found in src/renderer/src/containers/tweetitem-footer.js and 1 other location - About 2 hrs to fix
      src/renderer/src/containers/tweetitem.js on lines 9..11

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

      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

          tweet: (state.tweets.timeline[props.timelineKey] &&
                  state.tweets.timeline[props.timelineKey].entities.tweets[props.id]) ||
            state.addColumnMenu.searchedTweets.entities.tweets[props.id],
      Severity: Major
      Found in src/renderer/src/containers/tweetitem.js and 1 other location - About 2 hrs to fix
      src/renderer/src/containers/tweetitem-footer.js on lines 7..9

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

      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

        declare type TakeFn = {
          <P: Pattern>(                  pattern: P): TakeEffect<P>;
          <P: Pattern>(channel: Channel, pattern: P): TakeEffect<P>;
        }
      Severity: Major
      Found in flow-typed/npm/redux-saga_v0.11.x.js and 1 other location - About 2 hrs to fix
      flow-typed/npm/redux-saga_v0.11.x.js on lines 449..452

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

      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

        declare type PutFn = {
          <T: Object>(action: T): PutEffect<T>;
          <T: Object>(channel: Channel, action: T): PutEffect<T>;
        }
      Severity: Major
      Found in flow-typed/npm/redux-saga_v0.11.x.js and 1 other location - About 2 hrs to fix
      flow-typed/npm/redux-saga_v0.11.x.js on lines 444..447

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

      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

              return this.props.seek !== nextProps.seek ||
                     this.props.percentageBuffered !== nextProps.percentageBuffered ||
                     this.props.percentagePlayed !== nextProps.percentagePlayed ||
                     this.props.duration !== nextProps.duration;
      Severity: Major
      Found in src/renderer/stylesheets/components/controls/seek/Seek.js and 1 other location - About 2 hrs to fix
      src/renderer/stylesheets/components/controls/mute/Mute.js on lines 23..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 77.

      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

              return this.props.muted !== nextProps.muted ||
                     this.props.toggleMute !== nextProps.toggleMute ||
                     this.props.volume !== nextProps.volume ||
                     this.props.setVolume !== nextProps.setVolume ||
      Severity: Major
      Found in src/renderer/stylesheets/components/controls/mute/Mute.js and 1 other location - About 2 hrs to fix
      src/renderer/stylesheets/components/controls/seek/Seek.js on lines 31..34

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

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

        render(): ?React$Element<*> {
          // eslint-disable-next-line no-undef
          const remain = 140 - twttr.txt.getTweetLength(this.state.status);
          let buttonState;
          if (remain < 0 || remain === 140) buttonState = 'isDisabled';
      Severity: Minor
      Found in src/renderer/src/components/tweet-window.js - About 1 hr to fix

        Function renderTweet has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          renderTweet(tweet, user, text) {
            return (
              <div className={b('body')}>
                <div
                  onMouseOver={() => this.setState({ destroyTooltip: false })}
        Severity: Minor
        Found in src/renderer/src/components/tweetitem.js - About 1 hr to fix

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

              return (
                <div>
                  <i className={`${b('icon')} icon-tweet`} />
                  <span className={b('text', { newtweet: true })}>New tweet</span>
                </div>
          Severity: Major
          Found in src/renderer/src/components/sidemenu.js and 1 other location - About 1 hr to fix
          src/renderer/src/components/sidemenu.js on lines 61..66

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

          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

                return (
                  <div>
                    <i className={`${b('icon')} lnr lnr-cross`} />
                    <span className={b('text', { newtweet: true })}>Close window</span>
                  </div>
          Severity: Major
          Found in src/renderer/src/components/sidemenu.js and 1 other location - About 1 hr to fix
          src/renderer/src/components/sidemenu.js on lines 68..73

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

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

            render() {
              const { account, buttonText } = this.props;
              return (
                <div className={b()}>
                  <div
          Severity: Minor
          Found in src/renderer/src/components/account-tooltip.js - About 1 hr to fix

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

                propTypes: {
                    copyKeys: React.PropTypes.object,
                    seek: React.PropTypes.func,
                    percentageBuffered: React.PropTypes.number,
                    percentagePlayed: React.PropTypes.number,
            Severity: Major
            Found in src/renderer/stylesheets/components/controls/seek/Seek.js and 1 other location - About 1 hr to fix
            src/renderer/stylesheets/components/video/overlay/Overlay.js on lines 7..13

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

            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

                propTypes: {
                    error: React.PropTypes.bool,
                    togglePlay: React.PropTypes.func,
                    paused: React.PropTypes.bool,
                    copyKeys: React.PropTypes.object,
            src/renderer/stylesheets/components/controls/seek/Seek.js on lines 6..12

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

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

            export const watchFilterStreamRequest = () => {
              // const q = [];
              let stream;
            
              ipcMain.on('request-filterstream-connection', (event, account, params) => {
            Severity: Minor
            Found in src/browser/src/filter-stream.js - About 1 hr to fix

              Function request has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                request() {
                  return new Promise((resolve, reject) => {
                    this.twitter.getRequestToken((error, requestToken, requestTokenSecret) => {
                      if (error) {
                        console.log(error);
              Severity: Minor
              Found in src/browser/src/auth.js - About 1 hr to fix

                Function renderImages has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  renderImages(entities) {
                    if (entities.media.length === 1) {
                      return (
                        <div className={b('media')}>
                          {this.renderFirstMedia(entities.media[0].media_url_https, 'single')}
                Severity: Minor
                Found in src/renderer/src/components/tweetitem.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language