Vizzuality/landgriffon

View on GitHub
api/src/migrations/1645259040554-ImpactStoredFunctions.ts

Summary

Maintainability
C
1 day
Test Coverage
A
90%

Function up has 240 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
      CREATE OR REPLACE FUNCTION get_h3_uncompact_geo_region(geo_region_id uuid, h3_resolution int)
      RETURNS TABLE (h3index h3index) AS
      $$
Severity: Major
Found in api/src/migrations/1645259040554-ImpactStoredFunctions.ts - About 1 day to fix

    File 1645259040554-ImpactStoredFunctions.ts has 257 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { MigrationInterface, QueryRunner } from 'typeorm';
    
    export class ImpactStoredFunctions1645259040554 implements MigrationInterface {
      public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
    Severity: Minor
    Found in api/src/migrations/1645259040554-ImpactStoredFunctions.ts - About 2 hrs to fix

      There are no issues that match your filters.

      Category
      Status