faloker/purify

View on GitHub

Showing 5 of 73 total issues

UsersService has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

@Injectable()
export class UsersService {
  constructor(
    @InjectModel('User') private readonly userModel: Model<User>,
    @InjectModel('Token')
Severity: Minor
Found in api/src/users/users.service.ts - About 2 hrs to fix

    File projects.service.ts has 261 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable @typescript-eslint/camelcase */
    const uniqolor = require('uniqolor');
    import { Model } from 'mongoose';
    import { Injectable, NotFoundException } from '@nestjs/common';
    import { InjectModel } from '@nestjs/mongoose';
    Severity: Minor
    Found in api/src/projects/projects.service.ts - About 2 hrs to fix

      File types.ts has 256 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      export interface SystemConfig {
        jira: boolean;
        registration: boolean;
        saml: boolean;
        upstreamAuth: boolean;
      Severity: Minor
      Found in web/src/store/types.ts - About 2 hrs to fix

        Avoid deeply nested control flow statements.
        Open

            } else if (typeof fieldValue === 'object') {
              for (const key of Object.keys(fieldValue)) {
                // @ts-ignore
                mkdwn += parseField(key, fieldValue[key]);
              }
        Severity: Major
        Found in web/src/utils/helpers.ts - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                for (const [index, element] of fieldValue.entries()) {
                  mkdwn += `<details><summary><b># ${index}</b></summary><p>\n\n`;
          
                  Object.keys(element).forEach((key) => {
                    mkdwn += parseField(key, element[key]);
          Severity: Major
          Found in web/src/utils/helpers.ts - About 45 mins to fix
            Severity
            Category
            Status
            Source
            Language