bokuweb/tsukiakari

View on GitHub

Showing 103 of 103 total issues

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

  postTweet(params) {
    return new Promise((resolve, reject) => {
      this.client.post(
        'statuses/update',
        params,
Severity: Major
Found in src/renderer/src/lib/twitter-client.js and 4 other locations - About 1 hr to fix
src/renderer/src/lib/twitter-client.js on lines 84..94
src/renderer/src/lib/twitter-client.js on lines 96..106
src/renderer/src/lib/twitter-client.js on lines 108..118
src/renderer/src/lib/twitter-client.js on lines 144..154

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

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 3 locations. Consider refactoring.
Open

          <div>
            <p className={b('status-header')}>following</p>
            <p className={b('status-number')}>{account.friends_count}</p>
          </div>
Severity: Major
Found in src/renderer/src/components/account-tooltip.js and 2 other locations - About 1 hr to fix
src/renderer/src/components/account-tooltip.js on lines 56..59
src/renderer/src/components/account-tooltip.js on lines 64..67

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

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 5 locations. Consider refactoring.
Open

  createFavorite(params) {
    return new Promise((resolve, reject) => {
      this.client.post(
        'favorites/create',
        params,
Severity: Major
Found in src/renderer/src/lib/twitter-client.js and 4 other locations - About 1 hr to fix
src/renderer/src/lib/twitter-client.js on lines 60..70
src/renderer/src/lib/twitter-client.js on lines 96..106
src/renderer/src/lib/twitter-client.js on lines 108..118
src/renderer/src/lib/twitter-client.js on lines 144..154

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

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 5 locations. Consider refactoring.
Open

  createRetweet(params) {
    return new Promise((resolve, reject) => {
      this.client.post(
        'statuses/retweet',
        params,
Severity: Major
Found in src/renderer/src/lib/twitter-client.js and 4 other locations - About 1 hr to fix
src/renderer/src/lib/twitter-client.js on lines 60..70
src/renderer/src/lib/twitter-client.js on lines 84..94
src/renderer/src/lib/twitter-client.js on lines 108..118
src/renderer/src/lib/twitter-client.js on lines 144..154

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

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 5 locations. Consider refactoring.
Open

  getFriends(params) {
    return new Promise((resolve, reject) => {
      this.client.get(
        'friends/list',
        params,
Severity: Major
Found in src/renderer/src/lib/twitter-client.js and 4 other locations - About 1 hr to fix
src/renderer/src/lib/twitter-client.js on lines 60..70
src/renderer/src/lib/twitter-client.js on lines 84..94
src/renderer/src/lib/twitter-client.js on lines 96..106
src/renderer/src/lib/twitter-client.js on lines 108..118

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

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 5 locations. Consider refactoring.
Open

  destroyFavorite(params) {
    return new Promise((resolve, reject) => {
      this.client.post(
        'favorites/destroy',
        params,
Severity: Major
Found in src/renderer/src/lib/twitter-client.js and 4 other locations - About 1 hr to fix
src/renderer/src/lib/twitter-client.js on lines 60..70
src/renderer/src/lib/twitter-client.js on lines 84..94
src/renderer/src/lib/twitter-client.js on lines 96..106
src/renderer/src/lib/twitter-client.js on lines 144..154

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

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 3 locations. Consider refactoring.
Open

          <div>
            <p className={b('status-header')}>tweets</p>
            <p className={b('status-number')}>{account.statuses_count}</p>
          </div>
Severity: Major
Found in src/renderer/src/components/account-tooltip.js and 2 other locations - About 1 hr to fix
src/renderer/src/components/account-tooltip.js on lines 60..63
src/renderer/src/components/account-tooltip.js on lines 64..67

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

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 3 locations. Consider refactoring.
Open

          <div>
            <p className={b('status-header')}>followers</p>
            <p className={b('status-number')}>{account.followers_count}</p>
          </div>
Severity: Major
Found in src/renderer/src/components/account-tooltip.js and 2 other locations - About 1 hr to fix
src/renderer/src/components/account-tooltip.js on lines 56..59
src/renderer/src/components/account-tooltip.js on lines 60..63

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

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

  render(): ?React$Element<*> {
    return (
      <div className={b()}>
        <div className={b('input-wrapper')}>
          <i className={`${b('icon', { file: true })} fa fa-camera`} />
Severity: Minor
Found in src/renderer/src/components/tweet-window-footer.js - About 1 hr to fix

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

      render() {
        if (this.props.accountLength === 0) {
          return <Spinner style={{ padding: '10% 0 0 80px' }} />;
        }
        const isBlur = this.props.isLightBoxOpen || this.props.video.isFullscreen;
    Severity: Minor
    Found in src/renderer/src/components/tsukiakari.js - About 1 hr to fix

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

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

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

          render() {
            return (
              <div className={b()}>
                <div className={b('title-wrapper')}>
                  <span className={b('title')}>Choose account</span>
        Severity: Minor
        Found in src/renderer/src/components/account-selector.js - About 1 hr to fix

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

          export const watchUserStreamRequest = () => {
            ipcMain.on('request-userstream-connection', (event, account) => {
              const t = new T({
                consumer_key: global.consumerKey,
                consumer_secret: global.consumerSecret,
          Severity: Minor
          Found in src/browser/src/user-stream.js - About 1 hr to fix

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

              render(): ?React$Element<*> {
                const { loadingStatus, result } = this.props;
                if (loadingStatus === 'idle') return null;
                if (loadingStatus === 'loading') return <Spinner style={{ marginTop: '90px' }} />;
                if (loadingStatus === 'loaded' && result.length === 0) {
            Severity: Minor
            Found in src/renderer/src/components/add-column-menu-timeline.js - About 1 hr to fix

              Function RECIEVE_TWEET has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                RECIEVE_TWEET: (state, action) => {
                  // TODO: refactor
                  let results;
                  const { account: { id_str }, tweet, type, q } = action.payload;
                  const key = type === 'Search' ? `${q}:${type}` : `${id_str}:${type}`;
              Severity: Minor
              Found in src/renderer/src/reducers/tweets.js - About 1 hr to fix

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

                  render(): ?React$Element<*> {
                    return (
                      <div className={b()}>
                        <div className={b('title-wrapper')} >
                          <span className={b('title')}>Search tweets</span>
                Severity: Minor
                Found in src/renderer/src/components/add-column-search-form.js - About 1 hr to fix

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

                    render() {
                      const { tweet } = this.props;
                      return (
                        <div className={b()}>
                          <span className={b('icon-wrapper')}>
                  Severity: Minor
                  Found in src/renderer/src/components/tweetitem-footer.js - About 1 hr to fix

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

                        const t = new T({
                          consumer_key: global.consumerKey,
                          consumer_secret: global.consumerSecret,
                          access_token: account.accessToken,
                          access_token_secret: account.accessTokenSecret,
                    Severity: Major
                    Found in src/browser/src/user-stream.js and 1 other location - About 1 hr to fix
                    src/browser/src/filter-stream.js on lines 15..21

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

                    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 3 locations. Consider refactoring.
                    Open

                        & (<T1, T2, T3, T4, T5, T6, R, C: Context, Fn: Fn6<T1, T2, T3, T4, T5, T6, R>>(c: C, fn: Fn, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, ...rest: Array<void>) => CallEffect6<C, Fn, T1, T2, T3, T4, T5, T6>)
                    Severity: Major
                    Found in flow-typed/npm/redux-saga_v0.11.x.js and 2 other locations - About 1 hr to fix
                    flow-typed/npm/redux-saga_v0.11.x.js on lines 104..104
                    flow-typed/npm/redux-saga_v0.11.x.js on lines 333..333

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

                    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 3 locations. Consider refactoring.
                    Open

                        & (<T, R, C: Context, Fn: FnSpread<T, R>>(c: C, fn: Fn, t1: T, t2: T, t3: T, t4: T, t5: T, t6: T, ...args: Array<T>) => CallEffectSpread<null, Fn, T>);
                    Severity: Major
                    Found in flow-typed/npm/redux-saga_v0.11.x.js and 2 other locations - About 1 hr to fix
                    flow-typed/npm/redux-saga_v0.11.x.js on lines 104..104
                    flow-typed/npm/redux-saga_v0.11.x.js on lines 332..332

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language