antimalware/manul

View on GitHub

Showing 272 of 400 total issues

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

      innerXml: function(node) {
         var s = ""
         if ("innerHTML" in node)
            s = node.innerHTML;
         else {
Severity: Minor
Found in src/log_analyzer/js/xml2json.js - About 1 hr to fix

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

        _calcPos : function(direction, dimensions) {
            var res = {},
                offsets = this.params.offsets,
                owner = dimensions.owner,
                popup = dimensions.popup;
    Severity: Minor
    Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

          _findBlocks : function(select, elem, block, onlyFirst) {
              if(!block) {
                  block = elem;
                  elem = undef;
              }
      Severity: Minor
      Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                that.append = function(data, onprogress) {
                    var err, buffers = [], lastIndex = 0, bufferIndex = 0, bufferSize = 0, array;
                    if (!data.length)
                        return;
                    z.next_in_index = 0;
        Severity: Minor
        Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

                      close : function(callback) {
                          var data, length = 0, index = 0, indexFilename, file;
                          for (indexFilename = 0; indexFilename < filenames.length; indexFilename++) {
                              file = files[filenames[indexFilename]];
                              length += 46 + file.filename.length + file.comment.length;
          Severity: Minor
          Found in src/log_analyzer/js/zip.js - About 1 hr to fix

            Function inflate has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

              Function copy has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

                Function inflate_trees_dynamic has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        that.inflate_trees_dynamic = function(nl, // number of literal/length codes
                        nd, // number of distance codes
                        c, // that many (total) code lengths
                        bl, // literal desired/actual bit depth
                        bd, // distance desired/actual bit depth
                Severity: Major
                Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

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

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

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

                        _calcDimensions : function() {
                            var pos = this._pos,
                                owner = this._owner,
                                popupWidth = this.domElem.outerWidth(),
                                popupHeight = this.domElem.outerHeight(),
                    Severity: Minor
                    Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                              that.inflate_trees_dynamic = function(nl, // number of literal/length codes
                              nd, // number of distance codes
                              c, // that many (total) code lengths
                              bl, // literal desired/actual bit depth
                              bd, // distance desired/actual bit depth
                      Severity: Minor
                      Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

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

                                function handleSignatureScan(response) {
                        
                                       if (response.phpError || ( response.meta && response.meta.phpError)) {
                                           errorInfo = response.phpError ? response.phpError : response.meta.phpError;
                                           showErrorMessage('PHP error', errorInfo);
                        Severity: Minor
                        Found in src/scanner/static/js/common.js - About 1 hr to fix

                          Method getInfoByName has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getInfoByName($filePath)
                              {
                                  $this->MAX_FILE_SIZE_FOR_HASHING = 1024 * 1024;
                          
                                  $this->absoluteName = $filePath;
                          Severity: Minor
                          Found in src/scanner/classes/FileInfo.inc.php - About 1 hr to fix

                            Function parseWebsiteLog has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function parseWebsiteLog(fileDictDict) {
                                var fileInfoArrayArray = new Array;
                                for(var fileDictName in fileDictDict) {
                                    var fileInfoArray = new Array;
                                    var fileDict = fileDictDict[fileDictName];
                            Severity: Minor
                            Found in src/log_analyzer/js/analyzer.tableBuilder.js - 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 getCompactPhpInfo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private function getCompactPhpInfo()
                                {
                                    if (function_exists('phpinfo') && is_callable('phpinfo')) {
                                        ob_start();
                                        phpinfo();
                            Severity: Minor
                            Found in src/scanner/classes/WebServerEnvInfo.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 repackXMLLog has a Cognitive Complexity of 10 (exceeds 5 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

                            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 define has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        define = function(name, deps, declFn) {
                                            if(!declFn) {
                                                declFn = deps;
                                                deps = [];
                                            }
                            Severity: Minor
                            Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                                      function _tr_flush_block(buf, // input block, or NULL if too old
                                      stored_len, // length of input block
                                      eof // true if this is the last block for a file
                                      ) {
                                          var opt_lenb, static_lenb;// opt_len and static_len in bytes
                              Severity: Minor
                              Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

                                        getHumanStringFromDate: function (params) {
                                            var humanString,
                                                date = params.date,
                                                year = date.getFullYear(),
                                                month = (date.getMonth() + 1).toString(),
                                Severity: Minor
                                Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                                      lines: function(el, o) {
                                        var i = 0
                                          , start = (o.lines - 1) * (1 - o.direction) / 2
                                          , seg
                                  
                                  
                                  Severity: Minor
                                  Found in src/log_analyzer/js/spin.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language