VoxaAI/voxa-cli

View on GitHub
src/Processor.ts

Summary

Maintainability
D
2 days
Test Coverage

Function intentUtterProcessor has 154 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function intentUtterProcessor(voxaSheets: IVoxaSheet[], AVAILABLE_LOCALES: string[]) {
  const voxaSheetsIntent = filterSheets(voxaSheets, [SheetTypes.INTENT]);

  const voxaSheetsUtter = _.reduce(
    filterSheets(voxaSheets, [SheetTypes.UTTERANCE]),
Severity: Major
Found in src/Processor.ts - About 6 hrs to fix

    File Processor.ts has 396 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2018 Rain Agency <contact@rain.agency>
     * Author: Rain Agency <contact@rain.agency>
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy of
    Severity: Minor
    Found in src/Processor.ts - About 5 hrs to fix

      Function result has 132 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          .map((voxaSheetIntent: IVoxaSheet) => {
            const locale = sheetLocale(voxaSheetIntent, AVAILABLE_LOCALES);
            let previousIntent: string;
            voxaSheetIntent.data = _.chain(voxaSheetIntent.data)
              .map(row => {
      Severity: Major
      Found in src/Processor.ts - About 5 hrs to fix

        Function viewsProcessor has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function viewsProcessor(voxaSheets: IVoxaSheet[], AVAILABLE_LOCALES: string[]) {
          function sanitizeView(text: string = "") {
            return text
              .replace(/’/g, "'")
              .replace(/’/g, "'")
        Severity: Major
        Found in src/Processor.ts - About 2 hrs to fix

          Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Invalid

                .reduce((acc, view) => {
                  const { path } = view;
                  const pathLowerCase = _.toLower(path) as string;
                  let { value } = view;
                  if (_.isEmpty(path)) {
          Severity: Minor
          Found in src/Processor.ts - About 1 hr to fix

            Function publishingProcessor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function publishingProcessor(voxaSheets: IVoxaSheet[], AVAILABLE_LOCALES: string[]) {
              const voxaSheetsPublishing = voxaSheets.filter(voxaSheet =>
                _.includes(
                  [
                    SheetTypes.SKILL_ENVIRONMENTS,
            Severity: Minor
            Found in src/Processor.ts - About 1 hr to fix

              Function slotProcessor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function slotProcessor(voxaSheets: IVoxaSheet[], AVAILABLE_LOCALES: string[]) {
                const voxaSheetsSlots = voxaSheets.filter(voxaSheet =>
                  _.includes([SheetTypes.SLOTS], getSheetType(voxaSheet))
                );
              
              
              Severity: Minor
              Found in src/Processor.ts - About 1 hr to fix

                There are no issues that match your filters.

                Category
                Status