cityssm/unleet

View on GitHub

Showing 12 of 12 total issues

File mappings.ts has 407 lines of code (exceeds 250 allowed). Consider refactoring.
Open

interface MappingsObject {
[character: string]: string[];
}
 
/*
Severity: Minor
Found in mappings/mappings.ts - About 5 hrs to fix

    File mappings.js has 405 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    export const mappings = {
    "A": ["4",
    "𝖠", "𝘈", "𝘼", "𝑨", "𝐀", "𝗔", "𝙰",
    "AΜ²",
    "π’œ", "𝓐", "𝐴", "𝔄", "𝕬",
    Severity: Minor
    Found in mappings/mappings.js - About 5 hrs to fix

      Function unleetRecurse has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

      const unleetRecurse = (lowerCaseLeetString: string,
      unleetStrings: Set<string>,
      previousStrings: Set<string>,
      complexTranslationKeys: string[]) => {
       
       
      Severity: Minor
      Found in index.ts - About 2 hrs to fix

      Function unleetRecurse has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

      const unleetRecurse = (lowerCaseLeetString, unleetStrings, previousStrings, complexTranslationKeys) => {
      for (const leetSymbol of complexTranslationKeys) {
      if (lowerCaseLeetString.includes(leetSymbol)) {
      let matchingIndicies = utils.indiciesOf(lowerCaseLeetString, leetSymbol);
      if (matchingIndicies.length === 0) {
      Severity: Minor
      Found in index.js - About 2 hrs to fix

      Function unleet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const unleet = (leetString) => {
      if (leetString === null || leetString === undefined || leetString === "") {
      return [""];
      }
      let cleanLeetString = leetString.toString();
      Severity: Minor
      Found in index.js - About 1 hr to fix

        Function unleet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const unleet = (leetString: string | number): string[] => {
         
        if (leetString === null || leetString === undefined || leetString === "") {
        return [""];
        }
        Severity: Minor
        Found in index.ts - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

          if (potentialValue.includes(translationKey)) {
           
          isSimple = false;
          break;
          }
          Severity: Major
          Found in mappings/build.ts - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

            if (!previousStrings.has(newString)) {
            previousStrings.add(newString);
            unleetRecurse(newString, unleetStrings, previousStrings, complexTranslationKeys);
            }
            Severity: Major
            Found in index.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

              if (!previousStrings.has(newString)) {
              previousStrings.add(newString);
              unleetRecurse(newString, unleetStrings, previousStrings, complexTranslationKeys);
              }
              Severity: Major
              Found in index.ts - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                if (potentialValue.includes(translationKey)) {
                isSimple = false;
                break;
                }
                Severity: Major
                Found in mappings/build.js - About 45 mins to fix

                  Function unleet has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export const unleet = (leetString: string | number): string[] => {
                   
                  if (leetString === null || leetString === undefined || leetString === "") {
                  return [""];
                  }
                  Severity: Minor
                  Found in index.ts - About 35 mins to fix

                  Function unleet has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export const unleet = (leetString) => {
                  if (leetString === null || leetString === undefined || leetString === "") {
                  return [""];
                  }
                  let cleanLeetString = leetString.toString();
                  Severity: Minor
                  Found in index.js - About 35 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language