commitsto/commits.to

View on GitHub

Showing 55 of 55 total issues

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

  public render() {
    const { promises, stats: { counted = 0, pending = 0, reliability = 0 } = {} } = this.state;
    const { domain: { subdomain: username = '' } = {} } = this.props;

    return (
Severity: Minor
Found in client/src/views/user.tsx - About 1 hr to fix

    Function componentDidMount has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public componentDidMount() {
        const {
          domain: { subdomain: username = '' } = {},
          location: { pathname: urtext = '' } = {}
        } = this.props;
    Severity: Minor
    Found in client/src/components/confirm.tsx - About 1 hr to fix

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

          const {
            domain: { subdomain: username = '' } = {},
            location: { pathname: urtext = '' } = {}
          } = this.props;
      Severity: Minor
      Found in client/src/views/promise.tsx and 1 other location - About 50 mins to fix
      client/src/components/confirm.tsx on lines 36..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 51.

      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

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

          const {
            domain: { subdomain: username = '' } = {},
            location: { pathname: urtext = '' } = {}
          } = this.props;
      Severity: Minor
      Found in client/src/components/confirm.tsx and 1 other location - About 50 mins to fix
      client/src/views/promise.tsx on lines 43..46

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

      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 hscale has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      const hscale = function(h, x, a, b, u, v) {
      Severity: Minor
      Found in lib/latepenalty.js - About 45 mins to fix

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

              <p>
                For more help, also consider joining our <a href="http://slack.commits.to"> Slack channel</a> and checking the <a href="https://forum.beeminder.com/c/commitsto">Beeminder forum</a>.
              </p>
        Severity: Minor
        Found in client/src/views/signup.tsx and 1 other location - About 40 mins to fix
        client/src/views/signup.tsx on lines 16..18

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

        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

            <p>
              Read the <a href="https://github.com/commitsto/commits.to/wiki">the spec</a> or the <a href="https://blog.beeminder.com/will">original blog post</a>.
            </p>
        Severity: Minor
        Found in client/src/views/signup.tsx and 1 other location - About 40 mins to fix
        client/src/views/signup.tsx on lines 12..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 48.

        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 escale has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        const escale = function(x, a, b, u, v) {
        Severity: Minor
        Found in lib/latepenalty.js - About 35 mins to fix

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

                  fetch('/api/v1/promise/delete', {
                    body: JSON.stringify({ id }),
                    headers: {
                      'content-type': 'application/json',
                    },
          Severity: Minor
          Found in client/src/views/edit.tsx and 1 other location - About 35 mins to fix
          client/src/components/card/index.tsx on lines 60..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 47.

          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

                fetch('/api/v1/promise/complete', {
                  body: JSON.stringify({ id }),
                  headers: {
                    'content-type': 'application/json',
                  },
          Severity: Minor
          Found in client/src/components/card/index.tsx and 1 other location - About 35 mins to fix
          client/src/views/edit.tsx on lines 77..87

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

          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

          FIXME found
          Open

                  // FIXME abstract these out
          Severity: Minor
          Found in client/src/views/edit.tsx by fixme

          FIXME found
          Open

            margin-left: .5rem; // FIXME

          TODO found
          Open

          // TODO: remove
          Severity: Minor
          Found in server/app/middleware.js by fixme

          BUG found
          Open

          | BUG         | Opposite of feature                                                             |
          Severity: Minor
          Found in README.md by fixme

          TODO found
          Open

            // TODO: move this check into PledgeParser?
          Severity: Minor
          Found in server/api/v1/promise.js by fixme

          TODO found
          Open

              // TODO
          Severity: Minor
          Found in client/src/views/edit.tsx by fixme

          TODO found
          Open

            /* TODO: splt these into separate styled components? */
          Severity: Minor
          Found in client/src/views/edit.tsx by fixme

          FIXME found
          Open

          // FIXME void -> voided
          Severity: Minor
          Found in lib/helpers/calculate.ts by fixme

          FIXME found
          Open

            // FIXME
          Severity: Minor
          Found in server/api/v1/promise.js by fixme

          TODO found
          Open

          // TODO: https://github.com/Vincit/objection.js/tree/master/examples/express-ts
          Severity: Minor
          Found in models/pledge.ts by fixme
          Severity
          Category
          Status
          Source
          Language