pjambet/beech-server

View on GitHub

Showing 166 of 166 total issues

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

      if (!selector) {
        selector = $this.attr('href')
        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
      }
Severity: Minor
Found in doc/apidoc/javascripts/bundled/bootstrap.js and 2 other locations - About 35 mins to fix
doc/apidoc/javascripts/bundled/bootstrap.js on lines 92..95
doc/apidoc/javascripts/bundled/bootstrap.js on lines 585..588

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

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

  def index
    @likes = @event.likes.includes(:user)
    if params[:before]
      @likes = @likes.before(params[:before])
    else
Severity: Minor
Found in app/controllers/api/likes_controller.rb and 1 other location - About 30 mins to fix
app/controllers/api/comments_controller.rb on lines 4..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 33.

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

  def index
    @comments = @event.comments.includes(:user)
    if params[:before]
      @comments = @comments.before(params[:before])
    else
Severity: Minor
Found in app/controllers/api/comments_controller.rb and 1 other location - About 30 mins to fix
app/controllers/api/likes_controller.rb on lines 4..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 33.

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

Avoid too many return statements within this function.
Open

                    return this;
Severity: Major
Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return ret;
    Severity: Major
    Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                              return true;
      Severity: Major
      Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return ( context || rootjQuery ).find( selector );
        Severity: Major
        Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return siblingCheck( ap[i], bp[i] );
          Severity: Major
          Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                    return makeArray( context.querySelectorAll(query), extra );
            Severity: Major
            Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                          return rootjQuery.find( selector );
              Severity: Major
              Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return rootjQuery.ready( selector );
                Severity: Major
                Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return value;
                  Severity: Major
                  Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return i === al ?
                                siblingCheck( a, bp[i], -1 ) :
                                siblingCheck( ap[i], b, 1 );
                    Severity: Major
                    Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                                  return makeArray( [], extra );
                      Severity: Major
                      Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return oldSizzle(query, context, extra, seed);
                        Severity: Major
                        Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return;
                          Severity: Major
                          Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                                    return diff === 0;
                            Severity: Major
                            Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                      return ( diff % first === 0 && diff / first >= 0 );
                              Severity: Major
                              Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                            return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
                                Severity: Major
                                Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return event.result;
                                  Severity: Major
                                  Found in doc/apidoc/javascripts/bundled/jquery-1.7.2.js - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language