fluidtrends/papanache

View on GitHub

Showing 3 of 3 total issues

Function __generator has a Cognitive Complexity of 58 (exceeds 30 allowed). Consider refactoring.
Open

var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
Severity: Minor
Found in lib/web/Packer.js - About 4 hrs 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 Packer has 92 lines of code (exceeds 50 allowed). Consider refactoring.
Open

var Packer = /** @class */ (function () {
    /**
     *
     * @param opts
     */
Severity: Major
Found in lib/web/Packer.js - About 2 hrs to fix

    Function Config has 53 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    export function Config (options: PackingOptions): Configuration {
      let entry: any = {}
      let chunks: any = {}
         
      entry = { __main: path.resolve(options.entryFile) }
    Severity: Major
    Found in src/web/config/main.ts - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language