Showing 139 of 731 total issues
File date-time.component.spec.ts
has 670 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import moment from 'moment-timezone';
import { MomentModule } from 'ngx-moment';
File calendar.component.ts
has 573 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Component,
Input,
Output,
EventEmitter,
InputComponent
has 59 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
exportAs: 'ngxInput',
selector: 'ngx-input',
templateUrl: './input.component.html',
styleUrls: ['./input.component.scss'],
File json-editor.cy.ts
has 504 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe('Json Editor', () => {
before(() => {
cy.visit('/json-editor');
cy.get('.page-loader').should('not.exist', { timeout: 20000 });
});
CalendarComponent
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'ngx-calendar',
exportAs: 'ngxCalendar',
templateUrl: './calendar.component.html',
styleUrls: ['./calendar.component.scss'],
File commands.ts
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
fillValue,
findInput,
findLabel,
getValue,
File date-time.component.ts
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Component,
Input,
Output,
EventEmitter,
File time-display.component.spec.ts
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { NgxTimeDisplayComponent as TestComponent } from './time-display.component';
DateTimeComponent
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
exportAs: 'ngxDateTime',
selector: 'ngx-date-time',
templateUrl: './date-time.component.html',
styleUrls: ['./date-time.component.scss'],
File input.component.ts
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
AfterViewInit,
OnDestroy,
Component,
ElementRef,
File select.component.ts
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
SelectComponent
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
exportAs: 'ngxSelect',
selector: 'ngx-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.scss'],
File selects.cy.ts
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe('Selects', () => {
before(() => {
cy.visit('/selects');
cy.injectAxe();
cy.get('.page-loader').should('not.exist', { timeout: 20000 });
File calender.component.spec.ts
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { MomentModule } from 'ngx-moment';
import moment from 'moment-timezone';
Function indexProperties
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
indexProperties(): void {
const props = this.schemaBuilderMode ? this.schemaRef.properties : this.model;
for (const prop in props) {
if (this.isIndexed(prop)) {
- 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
RadioButtonGroupComponent
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
exportAs: 'ngxRadiobuttonGroup',
selector: 'ngx-radiobutton-group',
providers: [RADIOGROUP_VALUE_ACCESSOR],
template: ' <ng-content></ng-content> ',
File select.component.spec.ts
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { KeyboardKeys } from '../../enums/keyboard-keys.enum';
File select-dropdown.component.spec.ts
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ComponentFixture, TestBed, flush, fakeAsync } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA, ElementRef } from '@angular/core';
import * as faker from 'faker/locale/en';
import { KeyboardKeys } from '../../enums/keyboard-keys.enum';
StepperComponent
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
exportAs: 'ngxStepper',
selector: 'ngx-stepper',
templateUrl: './stepper.component.html',
styleUrls: ['./stepper.component.scss'],
Function addPackages
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addPackages = (options: Schema) => {
return (tree: Tree, _context: SchematicContext) => {
const ngCoreVersionTag = getPackageJsonDependency(tree, '@angular/core');
// TODO: find appropriate angular version and then get the matching ngxUI
const ngxUIVersion = getNgxUIVersion();