cloud-ess/ess

View on GitHub

Showing 9 of 31 total issues

Function exports has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {

    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-eslint');
Severity: Major
Found in Gruntfile.js - About 3 hrs to fix

    Function post has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.post = function (req, res) {
    
        const form = new formidable.IncomingForm();
        form.uploadDir = spoolDir;
        form.keepExtensions = true;
    Severity: Minor
    Found in lib/scanner.js - About 1 hr to fix

      Function scanTcp has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          scanTcp  (file, done) {
              if (!this.available.tcp) return done(new Error('TCP listener not found'));
      
              // https://rspamd.com/doc/architecture/protocol.html
              const httpOpts = {
      Severity: Minor
      Found in lib/rspamd.js - About 1 hr to fix

        Function ping has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ping (socket, connOpts, done) {
                let pingErr;
        
                if (!socket) {
                    socket = new net.Socket();
        Severity: Minor
        Found in lib/dspam.js - About 1 hr to fix

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

              ping (socket, connOpts, done) {
                  let pingErr;
          
                  socket.connect(connOpts, () => {
                      socket.write('nPING\n');
          Severity: Minor
          Found in lib/clamav.js - About 1 hr to fix

            Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                constructor (name) {
                    super()
            
                    this.name = name || 'dspam';
            
            
            Severity: Minor
            Found in lib/dspam.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                constructor (name) {
                    super()
            
                    this.name = name || 'clamav';
            
            
            Severity: Minor
            Found in lib/clamav.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                constructor (name) {
                    super()
            
                    this.name = name || 'rspamd';
            
            
            Severity: Minor
            Found in lib/rspamd.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                constructor (name) {
                    super()
            
                    this.name = name || 'spamassassin'
            
            
            Severity: Minor
            Found in lib/spamassassin.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Severity
            Category
            Status
            Source
            Language