Showing 51 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>",
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",
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",
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";
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 = (
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
Function handler
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
get handler() {
return Object.assign(super.handler, {
get: (t, idx) => {
// TODO: review for removal
// if (typeof idx === "symbol") {
- Read upRead up
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
File itemsModel.test.js
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {Model} from "./index";
import {default as deepEqual} from "deep-equal";
import {
stringsCollection,
stringsMinMaxCollection,
Function next
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
next(data) {
// enforces JSON formatting if feature is present
data = data && data.toJSON ? data.toJSON() : data;
const _targetProps = _pipes.get(this.target);
// tests for presence of rate-limit timeout
- Read upRead up
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 init
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
static init(pipe, properties) {
const {callbacks, pipesOrVOsOrSchemas, pipes} = properties;
const _txP = {};
const _inPipe = (
- Read upRead up
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 constructor
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
constructor(owner, schemas, options = {}) {
// ensures that we are given something that represents a Model object
if ((!owner) || !(owner instanceof Model)) {
throw "Model is required at arguments[0]";
}
- Read upRead up
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
BaseModel
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
export class BaseModel {
constructor() {
createMetaDataRef(this, ...arguments);
}
Function createAjv
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const createAjv = (inst, schemas, opts) => {
const _ajv = new Ajv(opts);
addFormats(_ajv);
if (schemas) {
- Read upRead up
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 next
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
next(data) {
// enforces JSON formatting if feature is present
data = data && data.toJSON ? data.toJSON() : data;
const _targetProps = _pipes.get(this.target);
// tests for presence of rate-limit timeout
Pipeline
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export class Pipeline {
static getExecs(..._pvs) {
return _pvs.map((_p) => {
_p = Array.isArray(_p) ? _p[0] : _p;
return (d) => {
Function castToExec
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const castToExec = (obj) => {
if (!obj) {
return DefaultPipeTx;
}
Function constructor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
constructor(schemas, ajvOptions = {}) {
if (_validators.get(this) === void (0)) {
_validators.set(this, {});
}
- Read upRead up
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 toJSON
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
toJSON() {
let _derive = (itm) => {
// uses toJSON impl if defined
if (itm.hasOwnProperty("toJSON") &&
(typeof this.toJSON) === "function") {
- Read upRead up
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 constructor
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(owner, schemas, options = {}) {
// ensures that we are given something that represents a Model object
if ((!owner) || !(owner instanceof Model)) {
throw "Model is required at arguments[0]";
}
Function handler
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
get handler() {
return Object.assign(super.handler, {
get: (t, idx) => {
// TODO: review for removal
// if (typeof idx === "symbol") {