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",
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';
- Read upRead up
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';
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',
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';
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
- Read upRead up
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 = [];
- Read upRead up
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) {
- Read upRead up
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: [
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',
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,
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;
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 });
}
- Read upRead up
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':
- Read upRead up
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);
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
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';
- Read upRead up
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
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,
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';