antimalware/manul

View on GitHub

Showing 272 of 400 total issues

Function HttpRangeReader has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function HttpRangeReader(url) {
        var that = this;

        function init(callback, onerror) {
            var request = new XMLHttpRequest();
Severity: Minor
Found in src/log_analyzer/js/zip-ext.js - About 1 hr to fix

    Function compress_block has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function compress_block(ltree, dtree) {
                var dist; // distance of matched string
                var lc; // match length or unmatched char (if dist === 0)
                var lx = 0; // running index in l_buf
                var code; // the code to send
    Severity: Minor
    Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

      Function deflate_stored has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function deflate_stored(flush) {
                  // Stored blocks are limited to 0xffff bytes, pending_buf is limited
                  // to pending_buf_size, and each stored block has a 5 byte header:
      
                  var max_block_size = 0xffff;
      Severity: Minor
      Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

        Function launchProcess has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function launchProcess(process, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
                var chunkIndex = 0, index, outputSize = 0;
        
                function step() {
                    var outputData;
        Severity: Minor
        Found in src/log_analyzer/js/zip.js - About 1 hr to fix

          Function deflateInit has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  that.deflateInit = function(strm, _level, bits, _method, memLevel, _strategy) {
                      if (!_method)
                          _method = Z_DEFLATED;
                      if (!memLevel)
                          memLevel = DEF_MEM_LEVEL;
          Severity: Minor
          Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

            Method repackXMLLog has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function repackXMLLog()
                {
                    global $projectRootDir;
            
                    $xmlLogFilename = $this->XML_LOG_FILENAME;
            Severity: Minor
            Found in src/scanner/classes/MalwareDetector.inc.php - About 1 hr to fix

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

                  spin: function(target) {
                    this.stop()
              
                    var self = this
                      , o = self.opts
              Severity: Minor
              Found in src/log_analyzer/js/spin.js - About 1 hr to fix

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

                function extendPointerPress(params) {
                
                    var data = params.event.data;
                
                    return {
                Severity: Minor
                Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                          that.inflate_flush = function(z, r) {
                              var n;
                              var p;
                              var q;
                  
                  
                  Severity: Minor
                  Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

                    Function launchProcess has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function launchProcess(process, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
                    Severity: Major
                    Found in src/log_analyzer/js/zip.js - About 1 hr to fix

                      Function launchWorkerProcess has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          function launchWorkerProcess(worker, reader, writer, offset, size, onappend, onprogress, onend, onreaderror, onwriteerror) {
                      Severity: Major
                      Found in src/log_analyzer/js/zip.js - About 1 hr to fix

                        Function checkForValidPhp has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function checkForValidPhp($content)
                            {
                                $len = strlen($content);
                                $start = 0;
                                $valid = false;
                        Severity: Minor
                        Found in src/scanner/classes/MalwareDetector.inc.php - About 1 hr 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 __construct has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function __construct($filename, $mode = 'r')
                            {
                                $this->filename = $filename;
                                $this->mode = $mode;
                                $result = false;
                        Severity: Minor
                        Found in src/scanner/classes/Archiver.inc.php - About 1 hr 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 on has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                on : function(e, data, fn, ctx, _special) {
                                    if(typeof e === 'string') {
                                        if(functions.isFunction(data)) {
                                            ctx = fn;
                                            fn = data;
                        Severity: Minor
                        Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

                          Method folderWalker has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function folderWalker($path, &$files_found)
                              {
                                  if ($path === '.')
                                      $path = $_SERVER['DOCUMENT_ROOT'];
                          
                          
                          Severity: Minor
                          Found in src/scanner/classes/FileList.inc.php - About 1 hr to fix

                            Function process has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function process(fileEntry, entry, onend, onprogress, onerror, totalSize) {
                                        var childIndex = 0;
                            
                                        function addChild(child) {
                                            function nextChild(childFileEntry) {
                            Severity: Minor
                            Found in src/log_analyzer/js/zip-fs.js - About 1 hr to fix

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

                              function base64_decode(data) {
                                if (!data)
                                   return "";
                              
                                //  discuss at: http://phpjs.org/functions/base64_decode/
                              Severity: Minor
                              Found in src/log_analyzer/js/analyzer.tableBuilder.js - About 1 hr to fix

                                Method start has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function start()
                                    {
                                        global $projectTmpDir, $php_errormsg;
                                
                                        $authenticator = new Auth();
                                Severity: Minor
                                Found in src/scanner/classes/ScannerController.inc.php - About 1 hr to fix

                                  Function onTouchStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  FastClick.prototype.onTouchStart = function(event) {
                                      'use strict';
                                      var targetElement, touch, selection;
                                  
                                      // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
                                  Severity: Minor
                                  Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

                                    Function step has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            function step() {
                                                var outputData;
                                                index = chunkIndex * CHUNK_SIZE;
                                                if (index < size)
                                                    reader.readUint8Array(offset + index, Math.min(CHUNK_SIZE, size - index), function(inputData) {
                                    Severity: Minor
                                    Found in src/log_analyzer/js/zip.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language