valor-software/angular2-bootstrap

View on GitHub

Showing 272 of 791 total issues

Function calendar has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

export function calendar(date: Date,
                         time: Date,
                         formats: CalendarSpec,
                         locale: Locale = getLocale(),
                         config: DateParsingConfig = {}): string {
Severity: Minor
Found in src/chronos/moment/calendar.ts - About 35 mins to fix

    Function createLocalOrUTC has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function createLocalOrUTC(input: DateInput, format?: string | string[], localeKey?: string, strict?: boolean, isUTC?: boolean): DateParsingConfig {
    Severity: Minor
    Found in src/chronos/create/from-anything.ts - About 35 mins to fix

      Function diff has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      export function diff(date: Date, input: Date,
                           units: UnitOfTime, asFloat: boolean,
                           config: DateParsingConfig = {}
      Severity: Minor
      Found in src/chronos/moment/diff.ts - About 35 mins to fix

        Function parseDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        export function parseDate(input: DateInput, format?: string | string[],
                                  localeKey?: string, strict?: boolean, isUTC?: boolean): Date {
        Severity: Minor
        Found in src/chronos/create/local.ts - About 35 mins to fix

          Function substituteTimeAgo has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function substituteTimeAgo(str: 'future' | 'past', num: number,
                                     withoutSuffix: boolean, isFuture: boolean,
                                     locale: Locale): string {
          Severity: Minor
          Found in src/chronos/duration/humanize.ts - About 35 mins to fix

            Function dayOfYearFromWeeks has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              year: number,
              week: number,
              weekday: number,
              dow: number,
              doy: number
            Severity: Minor
            Found in src/chronos/units/week-calendar-utils.ts - About 35 mins to fix

              Function setUTCOffset has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function setUTCOffset(date: Date, input: number | string, keepLocalTime?: boolean, keepMinutes?: boolean, config: DateParsingConfig = {}): Date {
              Severity: Minor
              Found in src/chronos/units/offset.ts - About 35 mins to fix

                Function isBetween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  date: Date,
                  from: Date,
                  to: Date,
                  units: UnitOfTime,
                  inclusivity = '()'
                Severity: Minor
                Found in src/chronos/utils/date-compare.ts - About 35 mins to fix

                  Function formatDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  export function formatDate(date: Date, format: string, locale?: string, isUTC?: boolean, offset = 0): string {
                  Severity: Minor
                  Found in src/chronos/format.ts - About 35 mins to fix

                    Function formatMoment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    export function formatMoment(date: Date, _format: string, locale: Locale, isUTC?: boolean, offset = 0): string {
                    Severity: Minor
                    Found in src/chronos/format.ts - About 35 mins to fix

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

                        setEventHandlers(container: BsDatepickerAbstractComponent): BsDatepickerEffects {
                          container.setViewMode = (event: BsDatepickerViewMode): void => {
                            this._store.dispatch(this._actions.changeViewMode(event));
                          };
                      
                      
                      Severity: Minor
                      Found in src/datepicker/reducer/bs-datepicker.effects.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 exports has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      module.exports = function (config) {
                        const configuration = {
                          basePath: '',
                          frameworks: ['jasmine', '@angular/cli'],
                          plugins: [
                      Severity: Minor
                      Found in karma-demo.conf.js - 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 monthsRegex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        monthsRegex(isStrict: boolean): RegExp {
                          if (this._monthsParseExact) {
                            if (!hasOwnProp(this, '_monthsRegex')) {
                              this.computeMonthsParse();
                            }
                      Severity: Minor
                      Found in src/chronos/locale/locale.class.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 setTime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export function setTime(value: Date, opts: Time): Date {
                        let hour = parseHours(opts.hour);
                        const minute = parseMinutes(opts.minute);
                        const seconds = parseSeconds(opts.seconds) || 0;
                      
                      
                      Severity: Minor
                      Found in src/timepicker/timepicker.utils.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 ngOnInit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        ngOnInit(): void {
                          if (this.isAnimated) {
                            this._renderer.addClass(
                              this._element.nativeElement,
                              CLASS_NAME.FADE
                      Severity: Minor
                      Found in src/modal/modal-container.component.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 formatReducer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function formatReducer(state: BsDatepickerState,
                                             action: Action): BsDatepickerState {
                        if (state.view.mode === 'day') {
                          const formattedMonths = state.monthsModel.map((month, monthIndex) =>
                            formatDaysCalendar(month, getFormatOptions(state), monthIndex)
                      Severity: Minor
                      Found in src/datepicker/reducer/bs-datepicker.reducer.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 daySelectHandler has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        daySelectHandler(day: DayViewModel): void {
                          if (day.isOtherMonth || day.isDisabled) {
                            return;
                          }
                      
                      
                      Severity: Minor
                      Found in src/datepicker/themes/bs/bs-daterangepicker-container.component.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 monthsShortRegex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        monthsShortRegex(isStrict: boolean): RegExp {
                          if (this._monthsParseExact) {
                            if (!hasOwnProp(this, '_monthsRegex')) {
                              this.computeMonthsParse();
                            }
                      Severity: Minor
                      Found in src/chronos/locale/locale.class.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 changeTime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export function changeTime(value: Date, diff: Time): Date {
                        if (!value) {
                          return changeTime(createDate(new Date(), 0, 0, 0), diff);
                        }
                      
                      
                      Severity: Minor
                      Found in src/timepicker/timepicker.utils.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 ngOnInit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        ngOnInit(): void {
                          if (typeof window !== 'undefined') {
                            this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';
                          }
                          // watch for maxSize
                      Severity: Minor
                      Found in src/pagination/pagination.component.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

                      Severity
                      Category
                      Status
                      Source
                      Language