keviocastro/angular2-components

View on GitHub

Showing 6 of 6 total issues

Function __generator has a Cognitive Complexity of 56 (exceeds 5 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/auth.service.js - About 1 day 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 AuthService has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var AuthService = (function () {
    function AuthService() {
        this.onThen = new EventEmitter();
    }
    AuthService.prototype.create = function (authEnv) {
Severity: Major
Found in lib/auth.service.js - About 3 hrs to fix

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

        private authOptions(env) {
            return {
                oidcConformant: true,
                closable: false,
                language: 'pt-br',
    Severity: Minor
    Found in src/app/auth/auth.service.ts - About 1 hr to fix

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

          AuthService.prototype.authOptions = function (env) {
              return {
                  oidcConformant: true,
                  closable: false,
                  language: 'pt-br',
      Severity: Minor
      Found in lib/auth.service.js - About 1 hr to fix

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

            private authOptions(env) {
                return {
                    oidcConformant: true,
                    closable: false,
                    language: 'pt-br',
        Severity: Minor
        Found in lib/auth.service.ts - About 1 hr to fix

          Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (config) {
            config.set({
              basePath: '',
              frameworks: ['jasmine', '@angular/cli'],
              plugins: [
          Severity: Minor
          Found in karma.conf.js - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language