NMDSdevopsServiceAdm/SopraSteria-SFC

View on GitHub

Showing 3,465 of 3,465 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class WorkplaceSummaryComponent implements OnInit, OnDestroy, OnChanges {
private _workplace: any;
public resp: any;
protected subscriptions: Subscription = new Subscription();
public hasCapacity: boolean;
frontend/src/app/shared/components/new-wdf-workplace-summary/wdf-workplace-summary.component.ts on lines 18..262

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class WDFWorkplaceSummaryComponent implements OnInit, OnDestroy, OnChanges {
private _workplace: any;
public resp: any;
protected subscriptions: Subscription = new Subscription();
public hasCapacity: boolean;
frontend/src/app/shared/components/workplace-summary/workplace-summary.component.ts on lines 18..262

Function exports has 2327 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (sequelize, DataTypes) {
const Establishment = sequelize.define(
'establishment',
{
id: {
Severity: Major
Found in backend/server/models/establishment.js - About 1 wk to fix

    File workplaceCSVValidator.js has 2808 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const BUDI = require('../BUDI').BUDI;
    const models = require('../../index');
    const clonedeep = require('lodash.clonedeep');
    const moment = require('moment');
    const { sanitisePostcode } = require('../../../utils/postcodeSanitizer');
    Severity: Major
    Found in backend/server/models/BulkImport/csv/workplaceCSVValidator.js - About 1 wk to fix

      File workerCSVValidator.js has 2693 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      const BUDI = require('../classes/BUDI').BUDI;
      const moment = require('moment');
      const get = require('lodash/get');
       
      const STOP_VALIDATING_ON = ['UNCHECKED', 'DELETE', 'NOCHANGE'];
      Severity: Major
      Found in lambdas/bulkUpload/classes/workerCSVValidator.js - About 1 wk to fix

        File establishment.js has 2331 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        const { Op } = require('sequelize');
        const moment = require('moment');
         
        module.exports = function (sequelize, DataTypes) {
        const Establishment = sequelize.define(
        Severity: Major
        Found in backend/server/models/establishment.js - About 6 days to fix

          Function exports has 1284 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (sequelize, DataTypes) {
          const Worker = sequelize.define(
          'worker',
          {
          id: {
          Severity: Major
          Found in backend/server/models/worker.js - About 6 days to fix

            File establishment.js has 2150 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
            * establishment.js
            *
            * The encapsulation of a Establishment, including all properties, all specific validation (not API, but object validation),
            * saving & restoring of data to database (via sequelize model), construction and deletion.
            Severity: Major
            Found in backend/server/models/classes/establishment.js - About 5 days to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.LeaversProperty = class LeaversProperty extends ChangePropertyPrototype {
              constructor() {
              super('Leavers');
              this._allowNull = true;
              }
              backend/server/models/classes/establishment/properties/startersProperty.js on lines 6..136

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.StartersProperty = class StartersProperty extends ChangePropertyPrototype {
              constructor() {
              super('Starters');
              this._allowNull = true;
              }
              backend/server/models/classes/establishment/properties/leaversProperty.js on lines 6..136

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              module.exports = {
              async up (queryInterface) {
              const oldJobId = 29;
              const newJobId = 21;
               
               
              Severity: Major
              Found in backend/migrations/20240419152128-remapTechnicianJobRole.js and 1 other location - About 4 days to fix
              backend/migrations/20240416100846-remapCareNavigatorJobRole.js on lines 5..157

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              module.exports = {
              async up (queryInterface) {
              const oldJobId = 9;
              const newJobId = 8;
               
               
              Severity: Major
              Found in backend/migrations/20240416100846-remapCareNavigatorJobRole.js and 1 other location - About 4 days to fix
              backend/migrations/20240419152128-remapTechnicianJobRole.js on lines 5..157

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.WorkerWeeklyHoursAverageProperty = class WorkerWeeklyHoursAverageProperty extends ChangePropertyPrototype {
              constructor() {
              super('WeeklyHoursAverage');
              this._allowNull = true;
              }
              backend/server/models/classes/worker/properties/weeklyHoursContractedProperty.js on lines 5..108

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.WorkerWeeklyHoursContractedProperty = class WorkerWeeklyHoursContractedProperty extends ChangePropertyPrototype {
              constructor() {
              super('WeeklyHoursContracted');
              this._allowNull = true;
              }
              backend/server/models/classes/worker/properties/weeklyHoursAverageProperty.js on lines 5..108

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              children: [
              {
              path: '',
              component: WdfStaffRecordComponent,
              data: { title: 'WDF Staff Record' },
              frontend/src/app/features/wdf/wdf-data-change/wdf-routing.module.ts on lines 256..411

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              children: [
              {
              path: '',
              component: WdfStaffRecordComponent,
              data: { title: 'WDF Staff Record' },
              frontend/src/app/features/wdf/wdf-data-change/wdf-routing.module.ts on lines 77..232

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              RED: {
              ESTFIRST: {
              A: 58,
              B: 59,
              C: 60,
              Severity: Major
              Found in backend/server/routes/reports/localAuthorityReport/user.js and 1 other location - About 4 days to fix
              backend/server/routes/reports/localAuthorityReport/user.js on lines 171..316

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              BLACK: {
              ESTFIRST: {
              A: 15,
              B: 16,
              C: 17,
              Severity: Major
              Found in backend/server/routes/reports/localAuthorityReport/user.js and 1 other location - About 4 days to fix
              backend/server/routes/reports/localAuthorityReport/user.js on lines 317..462

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.WorkerSocialCareQualificationProperty = class WorkerSocialCareQualificationProperty extends (
              ChangePropertyPrototype
              ) {
              constructor() {
              super('SocialCareQualification', 'SocialCareQualificationFk');
              backend/server/models/classes/worker/properties/highestQualificationProperty.js on lines 7..120

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              exports.WorkerHighestQualificationProperty = class WorkerHighestQualificationProperty extends ChangePropertyPrototype {
              constructor() {
              super('HighestQualification', 'HighestQualificationFk');
              this._allowNull = true;
              }
              backend/server/models/classes/worker/properties/socialCareQualificationProperty.js on lines 7..122
              Severity
              Category
              Status
              Source
              Language