betajs/betajs-data

View on GitHub

Showing 182 of 182 total issues

Avoid too many return statements within this function.
Open

                            return false;
Severity: Major
Found in src/data/queries/queries.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return false;
    Severity: Major
    Found in src/data/queries/queries.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return false;
      Severity: Major
      Found in src/data/queries/queries.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                return true;
        Severity: Major
        Found in src/data/queries/queries.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return false;
          Severity: Major
          Found in src/data/queries/queries.js - About 30 mins to fix

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

                        validItemRefreshMeta: function (refreshMeta) {
                            return this._options.itemRefreshTime === null || refreshMeta >= this._options.now();
                        },
            Severity: Major
            Found in src/data/stores/partial/cached_store.js and 3 other locations - About 30 mins to fix
            src/data/stores/partial/cached_store.js on lines 607..609
            src/data/stores/partial/cached_store.js on lines 611..613
            src/data/stores/partial/cached_store.js on lines 615..617

            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

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

                        validItemAccessMeta: function (accessMeta) {
                            return this._options.itemAccessTime === null || accessMeta >= this._options.now();
                        },
            Severity: Major
            Found in src/data/stores/partial/cached_store.js and 3 other locations - About 30 mins to fix
            src/data/stores/partial/cached_store.js on lines 603..605
            src/data/stores/partial/cached_store.js on lines 607..609
            src/data/stores/partial/cached_store.js on lines 615..617

            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

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

                        validQueryAccessMeta: function (accessMeta) {
                            return this._options.queryAccessTime === null || accessMeta >= this._options.now();
                        }
            Severity: Major
            Found in src/data/stores/partial/cached_store.js and 3 other locations - About 30 mins to fix
            src/data/stores/partial/cached_store.js on lines 603..605
            src/data/stores/partial/cached_store.js on lines 607..609
            src/data/stores/partial/cached_store.js on lines 611..613

            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

            Avoid too many return statements within this function.
            Open

                                            return false;
            Severity: Major
            Found in src/data/queries/queries.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return promise;
              Severity: Major
              Found in src/collections/abstract_query_collection.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return Queries.subsumizes(constrainedQuery.query, constrainedQuery2.query);
                Severity: Major
                Found in src/data/queries/constrained_queries.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return this.__error_string;
                  Severity: Major
                  Found in src/modelling/validations/regex_validators.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                            return false;
                    Severity: Major
                    Found in src/data/queries/queries.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return promise.and(this._execute(Objs.tree_extend(Objs.clone(this._query, 2), {
                                          options: {
                                              skip: currentSkip + currentLimit,
                                              limit: !nextLimit ? null : nextLimit - currentLimit
                                          }
                      Severity: Major
                      Found in src/collections/abstract_query_collection.js - About 30 mins to fix

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

                                    validQueryRefreshMeta: function (refreshMeta) {
                                        return this._options.queryRefreshTime === null || refreshMeta >= this._options.now();
                                    },    
                        Severity: Major
                        Found in src/data/stores/partial/cached_store.js and 3 other locations - About 30 mins to fix
                        src/data/stores/partial/cached_store.js on lines 603..605
                        src/data/stores/partial/cached_store.js on lines 611..613
                        src/data/stores/partial/cached_store.js on lines 615..617

                        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

                        Avoid too many return statements within this function.
                        Open

                                            return (!qopts2.limit || (qopts2.limit >= qopts.skip));
                        Severity: Major
                        Found in src/data/queries/constrained_queries.js - About 30 mins to fix

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

                                          return this.__store.query(query, options, ctx).mapSuccess(function(iterator) {
                                              return (new MappedIterator(iterator, function(obj) {
                                                  return this.materialize(obj, ctx);
                                              }, this)).auto_destroy(iterator, true);
                                          }, this);
                          Severity: Minor
                          Found in src/modelling/tables.js and 1 other location - About 30 mins to fix
                          src/data/stores/delegators/contextualized_store.js on lines 139..143

                          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

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

                                      _invoke: function (member, data, context) {
                                          return this.transport.send("invoke", {
                                              member: member,
                                              data: data,
                                              context: context
                          Severity: Minor
                          Found in src/data/stores/remote/channel_stores.js and 1 other location - About 30 mins to fix
                          src/data/stores/remote/channel_stores.js on lines 26..32

                          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

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

                                          return this._rawQuery(query, options, ctx).mapSuccess(function (results) {
                                              return (new MappedIterator(results, function (row) {
                                                  return this._decodeRow(row, ctx);
                                              }, this)).auto_destroy(results, true);
                                          }, this);
                          Severity: Minor
                          Found in src/data/stores/delegators/contextualized_store.js and 1 other location - About 30 mins to fix
                          src/modelling/tables.js on lines 150..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 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

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

                                      _invokeWatcher: function (member, data, context) {
                                          return this.transport.send("invokewatcher", {
                                              member: member,
                                              data: data,
                                              context: context
                          Severity: Minor
                          Found in src/data/stores/remote/channel_stores.js and 1 other location - About 30 mins to fix
                          src/data/stores/remote/channel_stores.js on lines 18..24

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language