infusion-code/ng2-app-scaffold

View on GitHub

Showing 7 of 17 total issues

File globalCss.ts has 372 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Component, ViewEncapsulation } from '@angular/core';
import { ConfigService } from '../services/configService';

@Component({
    selector: 'global-css',
Severity: Minor
Found in components/globalCss.ts - About 4 hrs to fix

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

        protected ProcessRouteNotification(currentRoute: ActivatedRoute) {
            let url: string = '';
            let id: number = 0;
    
            this._breadcrumbNodes = new Array<NavNode>();
    Severity: Minor
    Found in services/breadcrumb.ts - About 1 hr to fix

      Function WebStorage has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      export let WebStorage = (service: StorageService, key: string) => {
          return (target: Object, propertyName: string): void => {
              key = key || propertyName;
              let storedValue = service.get(key);
      
      
      Severity: Minor
      Found in decorators/storage.ts - About 45 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

      Function CollapseNavIfNecessary has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          private CollapseNavIfNecessary(event: MouseEvent|any){
              if(this._sideMenuExpanded === false) return;
              if(event == null) return;
              if(event.path == null) return;
      
      
      Severity: Minor
      Found in components/app.ts - About 45 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

      Function HandleCurrentNavHoverChange has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          private HandleCurrentNavHoverChange(state: boolean) {
              this._sideMenuHovered = state;
              if(this._config.PushContentOnCurrentNavHover) {
                  if(this._sideMenuToggled) this._sideMenuExpanded = true;
                  else{
      Severity: Minor
      Found in components/app.ts - About 45 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

      Function forRoot has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          static forRoot(breadcrumb?: BreadcrumbService, hero?: HeroService, notification?: NotificationsService, subscriptions?: SubscriptionService, currentNavProvider?: CurrentNavProvider, configService?: ConfigService, delegateService?: DelegateService): ModuleWithProviders {
              return {
                  ngModule: AppScaffoldModule,
                  providers: [
                      breadcrumb ? { provide: BreadcrumbService, useValue: breadcrumb } : BreadcrumbService,
      Severity: Minor
      Found in index.ts - About 35 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

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

          protected GetData() {
      
              //
              // add payload to messages from backend system.
              //
      Severity: Minor
      Found in services/notifications.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

      Severity
      Category
      Status
      Source
      Language