iurynogueira/ion

View on GitHub

Showing 12 of 14 total issues

File icons.ts has 728 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  access,
  access2,
  addSecurity,
  activeDeactivate,
Severity: Major
Found in projects/ion/src/lib/icon/svgs/icons.ts - About 1 day to fix

    File Table.stories.ts has 622 lines of code (exceeds 250 allowed). Consider refactoring.
    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 {
    Severity: Major
    Found in stories/Table.stories.ts - About 1 day to fix

      File SmartTable.stories.ts has 570 lines of code (exceeds 250 allowed). Consider refactoring.
      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';
      Severity: Major
      Found in stories/SmartTable.stories.ts - About 1 day to fix

        File index.ts has 362 lines of code (exceeds 250 allowed). Consider refactoring.
        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';
        Severity: Minor
        Found in projects/ion/src/lib/icon/svgs/iconsText/index.ts - About 4 hrs to fix

          File Tooltip.stories.ts has 317 lines of code (exceeds 250 allowed). Consider refactoring.
          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,
          Severity: Minor
          Found in stories/Tooltip.stories.ts - About 3 hrs to fix

            Function list has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              list(): Observable<
                IResponse<{ id: string; nome: string; data_criacao: string }>
              > {
                const page1 = [
                  {
            Severity: Major
            Found in projects/ion/src/lib/use-table/ApiService.service.ts - About 3 hrs to fix

              IonPaginationComponent has 28 functions (exceeds 20 allowed). Consider refactoring.
              Open

              @Component({
                selector: 'ion-pagination',
                templateUrl: './pagination.component.html',
                styleUrls: ['./pagination.component.scss'],
              })
              Severity: Minor
              Found in projects/ion/src/lib/pagination/pagination.component.ts - About 3 hrs to fix

                Function smartData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  smartData(): void {
                    this.configTable.loading = true;
                
                    if (this.firstLoad) {
                      const firstOrderedColumn = this.configTable.columns.filter(
                Severity: Minor
                Found in projects/ion/src/core/bn-table/bn-table.ts - About 1 hr to fix

                  Function open has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    open(
                      component: Type<unknown>,
                      configuration?: IonModalConfiguration
                    ): Observable<IonModalResponse | unknown> {
                      const modal = this.componentFactoryResolver
                  Severity: Minor
                  Found in projects/ion/src/lib/modal/modal.service.ts - About 1 hr to fix

                    Function getTooltipPositions has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      public getTooltipPositions(
                        respositionData: RepositionData
                      ): tooltipPositionChecks {
                        const { height, left, width } = respositionData.tooltipCoordinates;
                    
                    
                    Severity: Minor
                    Found in projects/ion/src/lib/tooltip/tooltip.service.ts - About 1 hr to fix

                      Function returnTableConfig has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        tableData,
                        tableColumns,
                        tableActions,
                        paginationTotal,
                        debounceOnSort = 0,
                      Severity: Major
                      Found in stories/SmartTable.stories.ts - About 50 mins to fix

                        Function isEmpty has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export function isEmpty(value: unknown): boolean {
                          if (value === null || value === undefined) {
                            return true;
                          }
                        
                        
                        Severity: Minor
                        Found in projects/ion/src/core/utils/isEmpty.ts - About 25 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