Webfreshener/datamatic

View on GitHub

Showing 111 of 111 total issues

File search_index.js has 1754 lines of code (exceeds 250 allowed). Consider refactoring.
Open

window.esdocSearchIndex = [
  [
    "datamatic/src/model/_ajvwrapper.js~ajvwrapper",
    "class/src/Model/_ajvWrapper.js~AjvWrapper.html",
    "<span>AjvWrapper</span> <span class=\"search-result-import-path\">datamatic/src/Model/_ajvWrapper.js</span>",
Severity: Major
Found in docs/script/search_index.js - About 4 days to fix

    File SwaggerV2.js has 1607 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    export default {
        title: "A JSON Schema for Swagger 2.0 API.",
        $id: "http://swagger.io/v2/schema.json#",
        schema: "http://json-schema.org/draft-04/schema#",
        type: "object",
    Severity: Major
    Found in fixtures/SwaggerV2.js - About 4 days to fix

      File OpenAPIv3.js has 1254 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      export default {
          title: "A JSON Schema for OpenAPI 3.0.",
          $id: "http://openapis.org/v3/schema.json#",
          // schema: "http://json-schema.org/draft-04/schema#",
          type: "object",
      Severity: Major
      Found in fixtures/OpenAPIv3.js - About 3 days to fix

        File Pipe-api.test.js has 512 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {Validator} from "./Validator";
        import {Pipeline} from "./Pipeline";
        import {basicCollection} from "../../fixtures/PropertiesModel.schemas";
        import {default as data} from "../../fixtures/pipes-test.data";
        import {default as _pipesOrSchemas} from "../../fixtures/pipes-or-schema";
        Severity: Major
        Found in src/Pipeline/Pipe-api.test.js - About 1 day to fix

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

                  it("should be observable", (done) => {
                      let _ival = 0;
                      const _arr = new Array(0, 2000);
                      const _iterator = {
                          next: (
          Severity: Major
          Found in src/Model/base-model.test.js and 1 other location - About 5 hrs to fix
          src/dist.test.js on lines 25..41

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

          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

              it("should be an observable", (done) => {
                  let _ival = 0;
                  const _arr = new Array(0, 2000);
                  const _iterator = {
                      next: (
          Severity: Major
          Found in src/dist.test.js and 1 other location - About 5 hrs to fix
          src/Model/base-model.test.js on lines 37..53

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

          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

                  const _sub = _p.subscribe({
                      next: () => {
                          _sub.unsubscribe();
                          done("pipeline should not have sent next notification");
                      },
          Severity: Major
          Found in src/Pipeline/Pipe-exec.js and 1 other location - About 5 hrs to fix
          src/Pipeline/Pipe-api.test.js on lines 161..172

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

          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

                  const _sub = _p.subscribe({
                      next: () => {
                          _sub.unsubscribe();
                          done("pipeline should not have sent next notification");
                      },
          Severity: Major
          Found in src/Pipeline/Pipe-api.test.js and 1 other location - About 5 hrs to fix
          src/Pipeline/Pipe-exec.js on lines 77..88

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

          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 ((typeof schemas) === "object") {
                      if (schemas.hasOwnProperty("schemas")) {
                          if (Array.isArray(schemas.schemas)) {
                              schemas.schemas = schemas.schemas.map(_procSchema);
                          } else {
          Severity: Major
          Found in src/Pipeline/_ajvWrapper.js and 1 other location - About 4 hrs to fix
          src/Model/_ajvWrapper.js on lines 161..175

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

          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

              } else if (ev.keyCode === 38) {
                // arrow up
                var current = result.children[selectedIndex];
                var selected = result.children[selectedIndex - 1];
                if (selected && selected.classList.contains('search-separator')) {
          Severity: Major
          Found in docs/script/search.js and 1 other location - About 4 hrs to fix
          docs/script/search.js on lines 51..88

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

          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 ((typeof schemas) === "object") {
                      if (schemas.hasOwnProperty("schemas")) {
                          if (Array.isArray(schemas.schemas)) {
                              schemas.schemas = schemas.schemas.map(_procSchema);
                          } else {
          Severity: Major
          Found in src/Model/_ajvWrapper.js and 1 other location - About 4 hrs to fix
          src/Pipeline/_ajvWrapper.js on lines 103..118

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

          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

              if (ev.keyCode === 40) {
                // arrow down
                var current = result.children[selectedIndex];
                var selected = result.children[selectedIndex + 1];
                if (selected && selected.classList.contains('search-separator')) {
          Severity: Major
          Found in docs/script/search.js and 1 other location - About 4 hrs to fix
          docs/script/search.js on lines 65..88

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

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

              static init(pipe, properties) {
                  const {callbacks, pipesOrVOsOrSchemas, pipes} = properties;
                  const _txP = {};
          
                  const _inPipe = (
          Severity: Major
          Found in src/Pipeline/Properties.js - About 4 hrs to fix

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

                    oauth2PasswordSecurity: {
                        type: "object",
                        additionalProperties: false,
                        required: [
                            "type",
            Severity: Major
            Found in fixtures/SwaggerV2.js and 2 other locations - About 4 hrs to fix
            fixtures/SwaggerV2.js on lines 1328..1365
            fixtures/SwaggerV2.js on lines 1404..1441

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

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

                    oauth2ImplicitSecurity: {
                        type: "object",
                        additionalProperties: false,
                        required: [
                            "type",
            Severity: Major
            Found in fixtures/SwaggerV2.js and 2 other locations - About 4 hrs to fix
            fixtures/SwaggerV2.js on lines 1366..1403
            fixtures/SwaggerV2.js on lines 1404..1441

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

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

                    oauth2ApplicationSecurity: {
                        type: "object",
                        additionalProperties: false,
                        required: [
                            "type",
            Severity: Major
            Found in fixtures/SwaggerV2.js and 2 other locations - About 4 hrs to fix
            fixtures/SwaggerV2.js on lines 1328..1365
            fixtures/SwaggerV2.js on lines 1366..1403

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

            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

            File Pipeline.js has 332 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* ############################################################################
            The MIT License (MIT)
            
            Copyright (c) 2019 Van Schroeder
            Copyright (c) 2019 Webfreshener, LLC
            Severity: Minor
            Found in src/Pipeline/Pipeline.js - About 4 hrs to fix

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

                          it("should initialize a schema and a schema object", () => {
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof PropertiesModel).toBe(true);
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof PropertiesModel).toBe(true);
              Severity: Major
              Found in src/Model/propertiesModel.test.js and 2 other locations - About 3 hrs to fix
              src/Model/itemsModel.test.js on lines 77..82
              src/Model/propertiesModel.test.js on lines 92..97

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

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

                          it("should initialize a valid schema and a schema object", () => {
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof PropertiesModel).toBe(true);
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof PropertiesModel).toBe(true);
              Severity: Major
              Found in src/Model/propertiesModel.test.js and 2 other locations - About 3 hrs to fix
              src/Model/itemsModel.test.js on lines 77..82
              src/Model/propertiesModel.test.js on lines 16..21

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

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

                          it("should initialize a valid schema and a schema object", () => {
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof BaseModel).toBe(true);
                              expect(_owner.model.$model).toBeDefined();
                              expect(_owner.model.$model instanceof BaseModel).toBe(true);
              Severity: Major
              Found in src/Model/itemsModel.test.js and 2 other locations - About 3 hrs to fix
              src/Model/propertiesModel.test.js on lines 16..21
              src/Model/propertiesModel.test.js on lines 92..97

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

              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