Showing 12 of 14 total issues
File icons.ts
has 728 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
access,
access2,
addSecurity,
activeDeactivate,
File Table.stories.ts
has 622 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Meta, Story } from '@storybook/angular';
import { IonTableComponent } from '../projects/ion/src/lib/table/table.component';
import { SafeAny } from '../projects/ion/src/lib/utils/safe-any';
import {
File SmartTable.stories.ts
has 570 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { action } from '@storybook/addon-actions';
import { Meta, Story } from '@storybook/angular';
import { LIST_OF_PAGE_OPTIONS } from '../projects/ion/src/lib/pagination/pagination.component';
import { IonSmartTableComponent } from '../projects/ion/src/lib/smart-table/smart-table.component';
File index.ts
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export { default as access } from './access';
export { default as access2 } from './access2';
export { default as activeDeactivate } from './active-deactivate';
export { default as addSecurity } from './add-security';
export { default as addTelephone } from './add-telephone';
File Tooltip.stories.ts
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { CommonModule } from '@angular/common';
import { moduleMetadata } from '@storybook/angular/dist/ts3.9/client';
import { Meta, Story } from '@storybook/angular/types-6-0';
import {
TooltipPosition,
Function list
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
list(): Observable<
IResponse<{ id: string; nome: string; data_criacao: string }>
> {
const page1 = [
{
IonPaginationComponent
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'ion-pagination',
templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.scss'],
})
Function smartData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
smartData(): void {
this.configTable.loading = true;
if (this.firstLoad) {
const firstOrderedColumn = this.configTable.columns.filter(
Function open
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open(
component: Type<unknown>,
configuration?: IonModalConfiguration
): Observable<IonModalResponse | unknown> {
const modal = this.componentFactoryResolver
Function getTooltipPositions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public getTooltipPositions(
respositionData: RepositionData
): tooltipPositionChecks {
const { height, left, width } = respositionData.tooltipCoordinates;
Function returnTableConfig
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
tableData,
tableColumns,
tableActions,
paginationTotal,
debounceOnSort = 0,
Function isEmpty
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export function isEmpty(value: unknown): boolean {
if (value === null || value === undefined) {
return true;
}
- 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"