frisb/fdboost

View on GitHub

Showing 55 of 55 total issues

Function exports has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  module.exports = function(encoding) {
    var IntegerAdapter;
    return IntegerAdapter = (function(_super) {
      __extends(IntegerAdapter, _super);

Severity: Minor
Found in lib/enhance/encoding/adapters/integer.js - About 1 hr to fix

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

        return function(keyPrefix, callback) {
          if (!keyPrefix) {
            throw new Error('keyPrefix cannot be undefined');
          }
          return fdb.future.create((function(_this) {
    Severity: Major
    Found in lib/enhance/database/getlastkey.js and 1 other location - About 1 hr to fix
    lib/enhance/database/countkeys.js on lines 172..181

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

    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 function(options, callback) {
          if (!options) {
            throw new Error('options cannot be undefined');
          }
          return fdb.future.create((function(_this) {
    Severity: Major
    Found in lib/enhance/database/countkeys.js and 1 other location - About 1 hr to fix
    lib/enhance/database/getlastkey.js on lines 58..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 69.

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

          RangeReader.prototype.execute = function(tr, iteratorType) {
            var complete, pastVersionCatchingCallback, toBeContinued, txi;
            if (typeof tr === 'string') {
              iteratorType = tr;
              tr = db;
    Severity: Minor
    Found in lib/enhance/rangereader.js - About 1 hr to fix

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

                for (_i = 0, _len = arr.length; _i < _len; _i++) {
                  item = arr[_i];
                  _results.push(fdb.encoding.encode(item, prefix));
                }
      Severity: Major
      Found in lib/enhance/tuple.js and 1 other location - About 1 hr to fix
      lib/enhance/tuple.js on lines 22..25

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

      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

              for (_i = 0, _len = encodedArr.length; _i < _len; _i++) {
                item = encodedArr[_i];
                _results.push(fdb.encoding.decode(item, prefix));
              }
      Severity: Major
      Found in lib/enhance/tuple.js and 1 other location - About 1 hr to fix
      lib/enhance/tuple.js on lines 10..13

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

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

        module.exports = function(fdb, debug) {
      
          /**
           * The callback format for the Transaction~getLastKey method
           * @callback Transaction~getLastKeyCallback
      Severity: Minor
      Found in lib/enhance/database/getlastkey.js - About 1 hr to fix

        Function exports has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          module.exports = function(encoding) {
            return {
              types: require('../typecodes'),
              Undefined: require('./undefined')(encoding),
              String: require('./string')(encoding),
        Severity: Minor
        Found in lib/enhance/encoding/adapters/index.js - About 1 hr to fix

          Function getIterator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                RangeReader.prototype.getIterator = function(tr, callback) {
                  var begin, iterator, options, ts;
                  debug(function(writer) {
                    return writer.log('getIterator');
                  });
          Severity: Minor
          Found in lib/enhance/rangereader.js - About 1 hr to fix

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

                AbstractAdapter.prototype.writeUInt32LE = function(value) {
                  this.verifyData();
                  this.data.writeUInt32LE(value, this.pos);
                  this.pos += 4;
                };
            Severity: Major
            Found in lib/enhance/encoding/adapters/abstract.js and 4 other locations - About 1 hr to fix
            lib/enhance/encoding/adapters/abstract.js on lines 110..114
            lib/enhance/encoding/adapters/abstract.js on lines 124..128
            lib/enhance/encoding/adapters/abstract.js on lines 138..142
            lib/enhance/encoding/adapters/abstract.js on lines 152..156

            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

                AbstractAdapter.prototype.writeUInt8 = function(value) {
                  this.verifyData();
                  this.data.writeUInt8(value, this.pos);
                  this.pos += 1;
                };
            Severity: Major
            Found in lib/enhance/encoding/adapters/abstract.js and 4 other locations - About 1 hr to fix
            lib/enhance/encoding/adapters/abstract.js on lines 110..114
            lib/enhance/encoding/adapters/abstract.js on lines 124..128
            lib/enhance/encoding/adapters/abstract.js on lines 138..142
            lib/enhance/encoding/adapters/abstract.js on lines 166..170

            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

                AbstractAdapter.prototype.writeDoubleBE = function(value) {
                  this.verifyData();
                  this.data.writeDoubleBE(value, this.pos);
                  this.pos += 8;
                };
            Severity: Major
            Found in lib/enhance/encoding/adapters/abstract.js and 4 other locations - About 1 hr to fix
            lib/enhance/encoding/adapters/abstract.js on lines 124..128
            lib/enhance/encoding/adapters/abstract.js on lines 138..142
            lib/enhance/encoding/adapters/abstract.js on lines 152..156
            lib/enhance/encoding/adapters/abstract.js on lines 166..170

            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

                AbstractAdapter.prototype.writeInt32BE = function(value) {
                  this.verifyData();
                  this.data.writeInt32BE(value, this.pos);
                  this.pos += 4;
                };
            Severity: Major
            Found in lib/enhance/encoding/adapters/abstract.js and 4 other locations - About 1 hr to fix
            lib/enhance/encoding/adapters/abstract.js on lines 110..114
            lib/enhance/encoding/adapters/abstract.js on lines 138..142
            lib/enhance/encoding/adapters/abstract.js on lines 152..156
            lib/enhance/encoding/adapters/abstract.js on lines 166..170

            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

                AbstractAdapter.prototype.writeInt32LE = function(value) {
                  this.verifyData();
                  this.data.writeInt32LE(value, this.pos);
                  this.pos += 4;
                };
            Severity: Major
            Found in lib/enhance/encoding/adapters/abstract.js and 4 other locations - About 1 hr to fix
            lib/enhance/encoding/adapters/abstract.js on lines 110..114
            lib/enhance/encoding/adapters/abstract.js on lines 124..128
            lib/enhance/encoding/adapters/abstract.js on lines 152..156
            lib/enhance/encoding/adapters/abstract.js on lines 166..170

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

              module.exports = function(encoding) {
                var ArrayAdapter;
                return ArrayAdapter = (function(_super) {
                  __extends(ArrayAdapter, _super);
            
            
            Severity: Minor
            Found in lib/enhance/encoding/adapters/array.js - About 1 hr to fix

              Function RangeReader has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function RangeReader(options) {
                      RangeReader.__super__.constructor.call(this);
                      this.begin = options.begin;
                      this.end = options.end;
                      this.marker = null;
              Severity: Minor
              Found in lib/enhance/rangereader.js - About 1 hr to fix

                Function exports has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  module.exports = function(fdb) {
                    var enhancements, fn, fnName, _results;
                    enhancements = {
                      packEncoded: function(arr, prefix) {
                        var encodedArr, item;
                Severity: Minor
                Found in lib/enhance/tuple.js - About 1 hr to fix

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

                          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                            item = _ref[_i];
                            _results.push(encoding.decode(item));
                          }
                  Severity: Major
                  Found in lib/enhance/encoding/adapters/array.js and 1 other location - About 1 hr to fix
                  lib/enhance/encoding/adapters/array.js on lines 39..42

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

                  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

                            for (_i = 0, _len = value.length; _i < _len; _i++) {
                              item = value[_i];
                              _results.push(encoding.encode(item));
                            }
                  Severity: Major
                  Found in lib/enhance/encoding/adapters/array.js and 1 other location - About 1 hr to fix
                  lib/enhance/encoding/adapters/array.js on lines 55..58

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

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

                    module.exports = function(encoding) {
                      var DateTimeAdapter;
                      return DateTimeAdapter = (function(_super) {
                        __extends(DateTimeAdapter, _super);
                  
                  
                  Severity: Minor
                  Found in lib/enhance/encoding/adapters/datetime.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language