csballz/koala-puree

View on GitHub

Showing 580 of 580 total issues

Avoid deeply nested control flow statements.
Open

                                        if ( one ) {
                                            debug("creating just one?", m[0]);
                                            return model._createDocument(m[0]);
                                        }
Severity: Major
Found in lib/models.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        if ( fn ) {
                                            p = p.then(fn);
                                        }
    Severity: Major
    Found in lib/models.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if ( id._id ) {
                                          id = id._id;
                                      }
      Severity: Major
      Found in lib/models.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if ( "link" !== rel.linkType ) {
                                        if ( rel.in ) {
                                            reverseCond = "out";
                                        } else if ( rel.out ) {
                                            reverseCond = "in";
        Severity: Major
        Found in lib/models.js - About 45 mins to fix

          Function genModel has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function genModel(file, remove, orientose, app, builders, parentSchema) {
          Severity: Minor
          Found in lib/models.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if ( fn ) {
                                                    p = p.then(fn);
                                                }
            Severity: Major
            Found in lib/models.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ( one ) {
                                                  query.limit(1);
                                              }
              Severity: Major
              Found in lib/models.js - About 45 mins to fix

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

                          var fn = co.wrap(compose((self._middleware.map(function(el){
                              return el.teardown;
                          }).filter(function(el){return undefined !== el;}))));
                Severity: Minor
                Found in index.js and 1 other location - About 40 mins to fix
                index.js on lines 265..267

                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

                              var fn = co.wrap(compose([serverMw].concat(self._middleware.map(function(el){
                                  return el.setup;
                              }).filter(function(el){return undefined !== el;}))));
                Severity: Minor
                Found in index.js and 1 other location - About 40 mins to fix
                index.js on lines 290..292

                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

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

                                if (app._app.env !== "production") {
                                    dbname = `${dbname}-${app._app.env}`;
                                }
                Severity: Minor
                Found in lib/models.js and 1 other location - About 35 mins to fix
                lib/models.js on lines 502..504

                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

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

                            if (app._app.env !== "production") {
                                dbname = `${dbname}-${app._app.env}`;
                            }
                Severity: Minor
                Found in lib/models.js and 1 other location - About 35 mins to fix
                lib/models.js on lines 389..391

                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

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

                        if (this._passport && this._passport.instance) {
                            property = this._passport.instance._userProperty || "user";
                        }
                Severity: Minor
                Found in lib/passport-req.js and 2 other locations - About 35 mins to fix
                lib/passport-req.js on lines 62..64
                lib/passport-req.js on lines 80..82

                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

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

                        if (this._passport && this._passport.instance) {
                            property = this._passport.instance._userProperty || "user";
                        }
                Severity: Minor
                Found in lib/passport-req.js and 2 other locations - About 35 mins to fix
                lib/passport-req.js on lines 33..35
                lib/passport-req.js on lines 80..82

                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

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

                        if (this._passport && this._passport.instance) {
                            property = this._passport.instance._userProperty || "user";
                        }
                Severity: Minor
                Found in lib/passport-req.js and 2 other locations - About 35 mins to fix
                lib/passport-req.js on lines 33..35
                lib/passport-req.js on lines 62..64

                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

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

                                        puree._sio.on("connection", function(socket){
                                            debug("socket connected");
                                            puree.sio.emit("connection", socket);
                                        });
                Severity: Minor
                Found in lib/sio.js and 1 other location - About 30 mins to fix
                lib/sio.js on lines 106..109

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

                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

                                    puree._sio.on("connection", function(socket){
                                        debug("socket connected");
                                        puree.sio.emit("connection", socket);
                                    });
                Severity: Minor
                Found in lib/sio.js and 1 other location - About 30 mins to fix
                lib/sio.js on lines 96..99

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

                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

                Rule doesn't have all its properties in alphabetical order.
                Open

                .code-caption

                margin can't be used with display: table-cell.
                Open

                    margin: 0px;

                Heading (h3) should not be qualified.
                Open

                nav h3 {

                Using width with border can sometimes make elements larger than you expect.
                Open

                    border: 1px solid #ddd;
                Severity
                Category
                Status
                Source
                Language