haraka/haraka-plugin-dcc

View on GitHub

Showing 2 of 2 total issues

Function hook_data_post has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.hook_data_post = function (next, connection) {
const plugin = this
 
// Fix-up rDNS for DCC
const training = plugin.should_train(connection.transaction)
Severity: Major
Found in index.js - About 2 hrs to fix

    Function get_response_headers has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.get_response_headers = function (c, rl) {
    // Read headers
    const headers = []
    for (let i = 0; i < rl.length; i++) {
    if (/^\s/.test(rl[i]) && headers.length) {
    Severity: Minor
    Found in index.js - About 1 hr to fix
    Severity
    Category
    Status
    Source
    Language