lgaticaq/info-rut

View on GitHub

Showing 3 of 5 total issues

Function getData has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getData = params => {
  return new Promise((resolve, reject) => {
    const paths = new Map([
      ['rut', '/rut'],
      ['name', '/buscar']
Severity: Major
Found in src/index.js - About 3 hrs to fix

    Function req has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const req = https.request(options, res => {
          if (res.statusCode !== 200) {
            reject(new Error(`Request Failed. Status Code: ${res.statusCode}`))
          } else {
            res.setEncoding('utf8')
    Severity: Minor
    Found in src/index.js - About 2 hrs to fix

      Function data has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                const data = Array.from($('table tbody tr')).map(el => {
                  const keys = new Map([
                    [
                      'person',
                      new Map([
      Severity: Minor
      Found in src/index.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language