gfw-api/gfw-quicc-alerts-api

View on GitHub

Showing 3 of 12 total issues

Function init has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const init: () => Promise<IInit> = async (): Promise<IInit> => {
    return new Promise((resolve: (value: IInit | PromiseLike<IInit>) => void
    ) => {

        const app: Koa = new Koa();
Severity: Major
Found in src/app.ts - About 2 hrs to fix

    File cartoDBService.ts has 260 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import config from 'config';
    import logger from 'logger';
    import Mustache from 'mustache';
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    Severity: Minor
    Found in src/services/cartoDBService.ts - About 2 hrs to fix

      Function use has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          static async use(ctx: Context): Promise<void> {
              logger.info('Obtaining use data with name %s and id %s', ctx.params.name, ctx.params.id);
              let useTable: string = null;
              switch (ctx.params.name) {
      
      
      Severity: Minor
      Found in src/routes/quiccAlerts.router.ts - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language