r37r0m0d3l/vicis

View on GitHub
src/core/class/Vicis.ts

Summary

Maintainability
F
1 wk
Test Coverage

File Vicis.ts has 549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { IFunction } from "../../interface/common/IFunction";
import { IObject } from "../../interface/common/IObject";

import { ICast } from "../../interface/config/ICast";
import { IConfig } from "../../interface/config/IConfig";
Severity: Major
Found in src/core/class/Vicis.ts - About 1 day to fix

    Function testConfig has 135 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static testConfig(config: IConfig): IConfigObject {
        let configFull: IConfigObjectFull;
        if (isFunction(config)) {
          configFull = convertFunctionToConfig(config as IFunction);
        } else {
    Severity: Major
    Found in src/core/class/Vicis.ts - About 5 hrs to fix

      Vicis has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export class Vicis {
        //#region Config Fields
        /**
         * @name cast
         * @private
      Severity: Minor
      Found in src/core/class/Vicis.ts - About 4 hrs to fix

        Function validateConfig has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public validateConfig() {
            const cast = objectGetKeys(this.__cast);
            const rename = objectGetKeys(this.__rename);
            const replace = objectGetKeys(this.__replace);
            const transform = objectGetKeys(this.__transform);
        Severity: Major
        Found in src/core/class/Vicis.ts - About 3 hrs to fix

          Function testConfig has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

            static testConfig(config: IConfig): IConfigObject {
              let configFull: IConfigObjectFull;
              if (isFunction(config)) {
                configFull = convertFunctionToConfig(config as IFunction);
              } else {
          Severity: Minor
          Found in src/core/class/Vicis.ts - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function config has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            config(config: IConfig = {}) {
              let configFull: IConfigObjectFull;
              if (isFunction(config)) {
                configFull = convertFunctionToConfig(config as IFunction);
              } else {
          Severity: Minor
          Found in src/core/class/Vicis.ts - About 1 hr to fix

            Function validateData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              public validateData() {
                if (this.__dataOriginal === undefined) {
                  return this;
                }
                if (
            Severity: Minor
            Found in src/core/class/Vicis.ts - About 1 hr to fix

              Function validateConfig has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                public validateConfig() {
                  const cast = objectGetKeys(this.__cast);
                  const rename = objectGetKeys(this.__rename);
                  const replace = objectGetKeys(this.__replace);
                  const transform = objectGetKeys(this.__transform);
              Severity: Minor
              Found in src/core/class/Vicis.ts - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function validateData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                public validateData() {
                  if (this.__dataOriginal === undefined) {
                    return this;
                  }
                  if (
              Severity: Minor
              Found in src/core/class/Vicis.ts - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

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

                  if (
                    "omit" in configFull && "required" in configFull &&
                    arrayHasSame(configFull.omit as IOmit, configFull.required as IRequired)
                  ) {
                    errors.push(
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 3 hrs to fix
              src/core/class/Vicis.ts on lines 517..528
              src/core/class/Vicis.ts on lines 529..540

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

              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

                  if (
                    "omit" in configFull && "defined" in configFull &&
                    arrayHasSame(configFull.omit as IOmit, configFull.defined as IDefined)
                  ) {
                    errors.push(
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 3 hrs to fix
              src/core/class/Vicis.ts on lines 529..540
              src/core/class/Vicis.ts on lines 559..570

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

              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

                  if (
                    "omit" in configFull && "pick" in configFull &&
                    arrayHasSame(configFull.omit as IOmit, configFull.pick as IPick)
                  ) {
                    errors.push(
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 3 hrs to fix
              src/core/class/Vicis.ts on lines 517..528
              src/core/class/Vicis.ts on lines 559..570

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

              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

                  if ("omit" in configFull && arrayHasSame(configFull.omit as IOmit, cast)) {
                    errors.push(
                      new ValidationError(
                        `'omit' has same keys as 'cast': ${
                          arrayBasicIntersect(configFull.omit as IOmit, cast)
              Severity: Major
              Found in src/core/class/Vicis.ts and 3 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 541..549
              src/core/class/Vicis.ts on lines 550..558
              src/core/class/Vicis.ts on lines 571..579

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

                  if ("omit" in configFull && arrayHasSame(configFull.omit as IOmit, rename)) {
                    errors.push(
                      new ValidationError(
                        `'omit' has same keys as 'rename': ${
                          arrayBasicIntersect(configFull.omit as IOmit, rename)
              Severity: Major
              Found in src/core/class/Vicis.ts and 3 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 508..516
              src/core/class/Vicis.ts on lines 550..558
              src/core/class/Vicis.ts on lines 571..579

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

                  if ("omit" in configFull && arrayHasSame(configFull.omit as IOmit, replace)) {
                    errors.push(
                      new ValidationError(
                        `'omit' has same keys as 'replace': ${
                          arrayBasicIntersect(configFull.omit as IOmit, replace)
              Severity: Major
              Found in src/core/class/Vicis.ts and 3 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 508..516
              src/core/class/Vicis.ts on lines 541..549
              src/core/class/Vicis.ts on lines 571..579

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

                  if ("omit" in configFull && arrayHasSame(configFull.omit as IOmit, transform)) {
                    errors.push(
                      new ValidationError(
                        `'omit' has same keys as 'transform': ${
                          arrayBasicIntersect(configFull.omit as IOmit, transform)
              Severity: Major
              Found in src/core/class/Vicis.ts and 3 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 508..516
              src/core/class/Vicis.ts on lines 541..549
              src/core/class/Vicis.ts on lines 550..558

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

                nullish(propertyNullishValues: INullish = {}) {
                  this.__nullish = nullishConfig(propertyNullishValues); // do not deep clone!
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 681..686
              src/core/class/Vicis.ts on lines 793..798

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

                replace(replacePropertyValues: IReplace = {}) {
                  this.__replace = replaceConfig(replacePropertyValues); // do not deep clone!
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 681..686
              src/core/class/Vicis.ts on lines 723..728

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

                defaults(propertyDefaultValues: IDefaults = {}) {
                  this.__defaults = defaultsConfig(propertyDefaultValues); // do not deep clone!
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 723..728
              src/core/class/Vicis.ts on lines 793..798

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

                omit(propertiesToOmit: IOmit = []) {
                  this.__omit = omitConfig(propertiesToOmit);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 695..700
              src/core/class/Vicis.ts on lines 709..714
              src/core/class/Vicis.ts on lines 751..756
              src/core/class/Vicis.ts on lines 765..770
              src/core/class/Vicis.ts on lines 807..812

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

                exclude(propertiesToExclude: IExclude = []) {
                  this.__exclude = excludeConfig(propertiesToExclude);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 695..700
              src/core/class/Vicis.ts on lines 737..742
              src/core/class/Vicis.ts on lines 751..756
              src/core/class/Vicis.ts on lines 765..770
              src/core/class/Vicis.ts on lines 807..812

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

                order(propertiesToStreamline: IOrder = []) {
                  this.__order = orderConfig(propertiesToStreamline);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 695..700
              src/core/class/Vicis.ts on lines 709..714
              src/core/class/Vicis.ts on lines 737..742
              src/core/class/Vicis.ts on lines 765..770
              src/core/class/Vicis.ts on lines 807..812

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

                pick(propertiesToPick: IPick = []) {
                  this.__pick = pickConfig(propertiesToPick);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 695..700
              src/core/class/Vicis.ts on lines 709..714
              src/core/class/Vicis.ts on lines 737..742
              src/core/class/Vicis.ts on lines 751..756
              src/core/class/Vicis.ts on lines 807..812

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

                defined(propertiesMustBeDefined: IDefined = []) {
                  this.__defined = definedConfig(propertiesMustBeDefined);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 709..714
              src/core/class/Vicis.ts on lines 737..742
              src/core/class/Vicis.ts on lines 751..756
              src/core/class/Vicis.ts on lines 765..770
              src/core/class/Vicis.ts on lines 807..812

              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

                rename(renamePropertyFromTo: IRename = {}) {
                  this.__rename = renameConfig(renamePropertyFromTo);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 1 other location - About 1 hr to fix
              src/core/class/Vicis.ts on lines 667..672

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

                required(propertiesRequired: IRequired = []) {
                  this.__required = requiredConfig(propertiesRequired);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 5 other locations - About 1 hr to fix
              src/core/class/Vicis.ts on lines 695..700
              src/core/class/Vicis.ts on lines 709..714
              src/core/class/Vicis.ts on lines 737..742
              src/core/class/Vicis.ts on lines 751..756
              src/core/class/Vicis.ts on lines 765..770

              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

                cast(propertyToType: ICast = {}) {
                  this.__cast = castConfig(propertyToType);
                  this.validateConfig();
                  this.validateData();
                  return this;
              Severity: Major
              Found in src/core/class/Vicis.ts and 1 other location - About 1 hr to fix
              src/core/class/Vicis.ts on lines 779..784

              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

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

                  if (isFunction(config)) {
                    configFull = convertFunctionToConfig(config as IFunction);
                  } else {
                    configFull = config as unknown as IConfigObjectFull;
                  }
              Severity: Minor
              Found in src/core/class/Vicis.ts and 1 other location - About 40 mins to fix
              src/core/class/Vicis.ts on lines 628..632

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

              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

                  if (arrayHasSame(this.__omit, this.__required)) {
                    throw new ValidationError(
                      `'omit' has same keys as 'required': ${
                        arrayBasicIntersect(this.__omit, this.__required)
                      }.`,
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 40 mins to fix
              src/core/class/Vicis.ts on lines 185..191
              src/core/class/Vicis.ts on lines 192..198

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

              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 (isFunction(config)) {
                    configFull = convertFunctionToConfig(config as IFunction);
                  } else {
                    configFull = config as unknown as IConfigObjectFull;
                  }
              Severity: Minor
              Found in src/core/class/Vicis.ts and 1 other location - About 40 mins to fix
              src/core/class/Vicis.ts on lines 483..487

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

              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

                  if (arrayHasSame(this.__omit, this.__pick)) {
                    throw new ValidationError(
                      `'omit' has same keys as 'pick': ${
                        arrayBasicIntersect(this.__omit, this.__pick)
                      }.`,
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 40 mins to fix
              src/core/class/Vicis.ts on lines 185..191
              src/core/class/Vicis.ts on lines 213..219

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

              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

                  if (arrayHasSame(this.__omit, this.__defined)) {
                    throw new ValidationError(
                      `'omit' has same keys as 'defined': ${
                        arrayBasicIntersect(this.__omit, this.__defined)
                      }.`,
              Severity: Major
              Found in src/core/class/Vicis.ts and 2 other locations - About 40 mins to fix
              src/core/class/Vicis.ts on lines 192..198
              src/core/class/Vicis.ts on lines 213..219

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

              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

              There are no issues that match your filters.

              Category
              Status