haraka/haraka-tld

View on GitHub

Showing 4 of 4 total issues

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

if (
level >= 3 &&
split[0] &&
exports.three_level_tlds[`${split[0]}.${domain}`]
) {
Severity: Major
Found in index.js and 1 other location - About 2 hrs to fix
index.js on lines 112..118

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

if (
level >= 2 &&
split[0] &&
exports.two_level_tlds[`${split[0]}.${domain}`]
) {
Severity: Major
Found in index.js and 1 other location - About 2 hrs to fix
index.js on lines 120..126

Function isRemoteNewer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.isRemoteNewer = function (dest, opts) {
if (!dest) dest = pslFile
 
return new Promise((resolve, reject) => {
this.getFileStats(dest)
Severity: Minor
Found in lib/update.js - About 1 hr to fix

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

    exports.split_hostname = function (host, level) {
    if (!level || (level && !(level >= 1 && level <= 3))) {
    level = 2
    }
     
     
    Severity: Minor
    Found in index.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language