valor-software/angular2-bootstrap

View on GitHub

Showing 272 of 791 total issues

File ng-api-doc.ts has 3264 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* tslint:disable */
export const ngdoc: any = {
  "AccordionPanelComponent": {
    "fileName": "src/accordion/accordion-group.component.ts",
    "className": "AccordionPanelComponent",
Severity: Major
Found in demo/src/ng-api-doc.ts - About 1 wk to fix

    Function processRelativeTime has a Cognitive Complexity of 113 (exceeds 5 allowed). Consider refactoring.
    Open

    function processRelativeTime(number: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {
      var result = number + ' ';
      switch (key) {
        case 's':
          return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
    Severity: Minor
    Found in src/chronos/i18n/sl.ts - About 2 days 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

    File demo_pages_spec.ts has 877 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { AccordionPo } from '../support/accordion.po';
    import { AlertsPo } from '../support/alerts.po';
    import { ButtonsPo } from '../support/buttons.po';
    import { CarouselPo } from '../support/carousel.po';
    import { CollapsePo } from '../support/collapse.po';
    Severity: Major
    Found in cypress/integration/demo_pages_spec.ts - About 2 days to fix

      File latin-map.ts has 826 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* tslint:disable */
      export const latinMap: { [key: string]: string } = {
          'Á': 'A',
          'Ă': 'A',
          'Ắ': 'A',
      Severity: Major
      Found in src/typeahead/latin-map.ts - About 1 day to fix

        File locale.class.ts has 591 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // tslint:disable:max-file-line-count max-line-length cyclomatic-complexity
        
        import { weekOfYear } from '../units/week-calendar-utils';
        import { hasOwnProp, isArray, isFunction } from '../utils/type-checks';
        import { getDay, getMonth } from '../utils/date-getters';
        Severity: Major
        Found in src/chronos/locale/locale.class.ts - About 1 day to fix

          Function translate has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
          Open

          function translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {
            const result = num + ' ';
          
            switch (key) {
              case 's':  // a few seconds / in a few seconds / a few seconds ago
          Severity: Minor
          Found in src/chronos/i18n/cs.ts - 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 handleWeekStrictParse has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
          Open

            private handleWeekStrictParse(weekdayName: string, format: string, strict: boolean): number {
              let ii;
              const llc = weekdayName.toLocaleLowerCase();
              if (!this._weekdaysParse) {
                this._weekdaysParse = [];
          Severity: Minor
          Found in src/chronos/locale/locale.class.ts - About 7 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 checkOverflow has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
          Open

          export function checkOverflow(config: DateParsingConfig): DateParsingConfig {
            let overflow;
            const a = config._a;
          
            if (a && getParsingFlags(config).overflow === -2) {
          Severity: Minor
          Found in src/chronos/create/check-overflow.ts - About 6 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 exports has 145 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (config) {
            const configuration = {
              basePath: '',
              frameworks: ['jasmine', '@angular/cli'],
              plugins: [
          Severity: Major
          Found in karma-demo.conf.js - About 5 hrs to fix

            File rollup.globals.js has 395 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            module.exports = {
              // Angular dependencies
              '@angular/animations':      'ng.animations',
              '@angular/core':            'ng.core',
              '@angular/common':          'ng.common',
            Severity: Minor
            Found in scripts/es2015/rollup.globals.js - About 5 hrs to fix

              File typeahead.directive.ts has 355 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* tslint:disable:max-file-line-count */
              import {
                ChangeDetectorRef,
                Directive,
                ElementRef,
              Severity: Minor
              Found in src/typeahead/typeahead.directive.ts - About 4 hrs to fix

                Locale has 33 functions (exceeds 20 allowed). Consider refactoring.
                Open

                export class Locale {
                  parentLocale?: Locale;
                  _abbr: string;
                  _config: LocaleData;
                  meridiemHour: (hour: number, meridiem: string) => number;
                Severity: Minor
                Found in src/chronos/locale/locale.class.ts - About 4 hrs to fix

                  Function timepickerReducer has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export function timepickerReducer(state = initialState, action: Action) {
                    switch (action.type) {
                      case TimepickerActions.WRITE_VALUE: {
                        return Object.assign({}, state, { value: action.payload });
                      }
                  Severity: Minor
                  Found in src/timepicker/reducer/timepicker.reducer.ts - About 3 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 translate has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {
                    switch (key) {
                      case 's':
                        return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
                      case 'ss':
                  Severity: Minor
                  Found in src/chronos/i18n/hu.ts - About 3 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 bsDatepickerReducer has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function bsDatepickerReducer(state = initialDatepickerState,
                                                      action: Action): BsDatepickerState {
                    switch (action.type) {
                      case BsDatepickerActions.CALCULATE: {
                        return calculateReducer(state);
                  Severity: Major
                  Found in src/datepicker/reducer/bs-datepicker.reducer.ts - About 3 hrs to fix

                    File modal.directive.ts has 317 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* tslint:disable:max-file-line-count */
                    // todo: should we support enforce focus in?
                    // todo: in original bs there are was a way to prevent modal from showing
                    // todo: original modal had resize events
                    
                    
                    Severity: Minor
                    Found in src/modal/modal.directive.ts - About 3 hrs to fix

                      Function translate has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function translate(num: number, withoutSuffix: boolean, key: string, isFuture: boolean): string {
                        var result = '';
                        switch (key) {
                          case 's':
                            return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
                      Severity: Minor
                      Found in src/chronos/i18n/fi.ts - About 3 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 positionElements has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        public positionElements(
                          hostElement: HTMLElement,
                          targetElement: HTMLElement,
                          placement: string,
                          appendToBody?: boolean
                      Severity: Major
                      Found in src/positioning/ng-positioning.ts - About 3 hrs to fix

                        File datepicker-inner.component.ts has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* tslint:disable:max-file-line-count */
                        import {
                          Component,
                          EventEmitter,
                          Input,
                        Severity: Minor
                        Found in src/datepicker/datepicker-inner.component.ts - About 3 hrs to fix

                          File datepicker-section.list.ts has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { DemoDatepickerBasicComponent } from './demos/basic/basic';
                          import { DemoDatepickerDateInitialStateComponent } from './demos/date-initial-state/date-initial-state';
                          import { DemoDatepickerColorThemingComponent } from './demos/color-theming/color-theming';
                          import { DemoDatepickerChangeLocaleComponent } from './demos/change-locale/change-locale';
                          import { DemoDatepickerMinMaxComponent } from './demos/min-max/min-max.component';
                          Severity: Minor
                          Found in demo/src/app/components/+datepicker/datepicker-section.list.ts - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language