XingFramework/Relayer

View on GitHub

Showing 390 of 591 total issues

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

  constructor(
      templatedUrlFromUrlFactory,
      resourceBuilderFactory,
      primaryResourceBuilderFactory,
      primaryResourceTransformerFactory,
Severity: Major
Found in dist/relayer/mappers/ListResourceMapper.js and 1 other location - About 1 hr to fix
src/relayer/mappers/ListResourceMapper.js on lines 12..36

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

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

    get relationships() {
      if (!this.hasOwnProperty("_relationships")) {
        this._relationships = Object.create(this._relationships || {});
      }
      return this._relationships;
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 1 hr to fix
dist/relayer.es5.js on lines 3854..3859

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

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

  constructor(
      templatedUrlFromUrlFactory,
      resourceBuilderFactory,
      primaryResourceBuilderFactory,
      primaryResourceTransformerFactory,
Severity: Major
Found in src/relayer/mappers/ListResourceMapper.js and 1 other location - About 1 hr to fix
dist/relayer/mappers/ListResourceMapper.js on lines 12..36

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

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

    get properties() {
      if (!this.hasOwnProperty("_properties")) {
        this._properties = Object.create(this._properties || {});
      }
      return this._properties;
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 1 hr to fix
dist/relayer.es5.js on lines 3848..3853

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

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

  function CreateResourceTransformer(relationshipDescription, uriTemplate) {
    _classCallCheck(this, CreateResourceTransformer);

    _get(Object.getPrototypeOf(CreateResourceTransformer.prototype), "constructor", this).call(this, relationshipDescription);
    this.uriTemplate = uriTemplate;
Severity: Major
Found in dist/cjs/relayer/transformers/CreateResourceTransformer.js and 3 other locations - About 1 hr to fix
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 28..33
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 28..33
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 28..33

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

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

  function ListResourceSerializer(manyResourceSerializerFactory, resource) {
    _classCallCheck(this, ListResourceSerializer);

    _get(Object.getPrototypeOf(ListResourceSerializer.prototype), "constructor", this).call(this, resource);
    this.manyResourceSerializerFactory = manyResourceSerializerFactory;
Severity: Major
Found in dist/cjs/relayer/serializers/ListResourceSerializer.js and 3 other locations - About 1 hr to fix
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 28..33
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 28..33
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 22..27

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

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

  function ManyResourceSerializer(resourceSerializerFactory, resource) {
    _classCallCheck(this, ManyResourceSerializer);

    _get(Object.getPrototypeOf(ManyResourceSerializer.prototype), "constructor", this).call(this, resource);
    this.resourceSerializerFactory = resourceSerializerFactory;
Severity: Major
Found in dist/cjs/relayer/serializers/ManyResourceSerializer.js and 3 other locations - About 1 hr to fix
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 28..33
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 28..33
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 22..27

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

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

  function MapResourceSerializer(resourceSerializerFactory, resource) {
    _classCallCheck(this, MapResourceSerializer);

    _get(Object.getPrototypeOf(MapResourceSerializer.prototype), "constructor", this).call(this, resource);
    this.resourceSerializerFactory = resourceSerializerFactory;
Severity: Major
Found in dist/cjs/relayer/serializers/MapResourceSerializer.js and 3 other locations - About 1 hr to fix
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 28..33
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 28..33
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function FactoryInjectable(Target) {
    _classCallCheck(this, FactoryInjectable);

    _get(Object.getPrototypeOf(FactoryInjectable.prototype), 'constructor', this).call(this);
    this.Target = Target;
Severity: Major
Found in dist/cjs/relayer/injector.js and 6 other locations - About 1 hr to fix
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function PromiseEndpoint(promiseFunction) {
    _classCallCheck(this, PromiseEndpoint);

    _get(Object.getPrototypeOf(PromiseEndpoint.prototype), "constructor", this).call(this);
    this.endpointPromise = promiseFunction;
Severity: Major
Found in dist/cjs/relayer/endpoints/PromiseEndpoint.js and 6 other locations - About 1 hr to fix
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function ConstructableInjectable(Target) {
    _classCallCheck(this, ConstructableInjectable);

    _get(Object.getPrototypeOf(ConstructableInjectable.prototype), 'constructor', this).call(this);
    this.Target = Target;
Severity: Major
Found in dist/cjs/relayer/injector.js and 6 other locations - About 1 hr to fix
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function EmbeddedPropertyTransformer(path) {
    _classCallCheck(this, EmbeddedPropertyTransformer);

    _get(Object.getPrototypeOf(EmbeddedPropertyTransformer.prototype), "constructor", this).call(this);
    this.path = path;
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function PrimaryResourceTransformer(relationshipDescription) {
    _classCallCheck(this, PrimaryResourceTransformer);

    _get(Object.getPrototypeOf(PrimaryResourceTransformer.prototype), "constructor", this).call(this);
    this.relationshipDescription = relationshipDescription;
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function ValueInjectable(value) {
    _classCallCheck(this, ValueInjectable);

    _get(Object.getPrototypeOf(ValueInjectable.prototype), 'constructor', this).call(this);
    this.value = value;
Severity: Major
Found in dist/cjs/relayer/injector.js and 6 other locations - About 1 hr to fix
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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 7 locations. Consider refactoring.
Open

  function EmbeddedRelationshipTransformer(relationshipName) {
    _classCallCheck(this, EmbeddedRelationshipTransformer);

    _get(Object.getPrototypeOf(EmbeddedRelationshipTransformer.prototype), "constructor", this).call(this);
    this.relationshipName = relationshipName;
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 20..25
dist/cjs/relayer/injector.js on lines 102..107
dist/cjs/relayer/injector.js on lines 122..127
dist/cjs/relayer/injector.js on lines 150..155
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 22..27
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 22..27

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

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

    _transformRequest: function(transformers, request) {
      var $__4 = this;
      return transformers.slice(0).reverse().reduce((function(interimRequest, transformer) {
        return transformer.transformRequest($__4, interimRequest);
      }), request);
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 1 hr to fix
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 85..92

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

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

    value: function _transformRequest(transformers, request) {
      var _this3 = this;

      return transformers.slice(0).reverse().reduce(function (interimRequest, transformer) {

Severity: Major
Found in dist/cjs/relayer/endpoints/ResolvedEndpoint.js and 1 other location - About 1 hr to fix
dist/relayer.es5.js on lines 736..741

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

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

    removeDataPathLink: function(resource, path) {
      this._paths = this._paths.filter((function(pathLink) {
        return (pathLink.resource != resource) || (pathLink.path != path);
      }));
    }
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 1 hr to fix
dist/cjs/relayer/TemplatedUrl.js on lines 72..76

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

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

    value: function removeDataPathLink(resource, path) {
      this._paths = this._paths.filter(function (pathLink) {
        return pathLink.resource != resource || pathLink.path != path;
      });
    }
Severity: Major
Found in dist/cjs/relayer/TemplatedUrl.js and 1 other location - About 1 hr to fix
dist/relayer.es5.js on lines 1014..1018

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

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 (!Array.isArray) {
  Array.isArray = function(vArg) {
    return Object.prototype.toString.call(vArg) === "[object Array]";
  };
}
Severity: Major
Found in dist/relayer/jsonpath.js and 1 other location - About 1 hr to fix
src/relayer/jsonpath.js on lines 7..11

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

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