Sellsuki/thai-address-database

View on GitHub

Showing 3 of 20 total issues

Function preprocess has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const preprocess = function (data) {
  let lookup = []
  let words = []
  let expanded = []
  let useLookup = false
Severity: Major
Found in src/index.js - About 2 hrs to fix

    Function preprocess has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var preprocess = function preprocess(data) {
        var lookup = [];
        var words = [];
        var expanded = [];
        var useLookup = false;
    Severity: Major
    Found in lib/index.js - About 2 hrs to fix

      Function resultTree has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      let resultTree = tree.map((item) => {
        if (!(provinces.find(prov => prov === item.province))) {
          provinces.push(item.province)
          console.log(item.province + ' ------- Done !')
          let prov = tree.filter(data => data.province === item.province)
      Severity: Minor
      Found in database/migrate/buildTree.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language