antimalware/manul

View on GitHub

Showing 272 of 400 total issues

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

        function scan_tree(tree,// the tree to be scanned
        max_code // and its largest code of non zero frequency
        ) {
            var n; // iterates over all tree elements
            var prevlen = -1; // last emitted length
Severity: Minor
Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

            function longest_match(cur_match) {
                var chain_length = max_chain_length; // max hash chain length
                var scan = strstart; // current string
                var match; // matched string
                var len; // length of current match
    Severity: Minor
    Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

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

              _onDateChoose: function (e) {
                  var target = $(e.target)
                  var first,
                      last;
      
      
      Severity: Minor
      Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

        Function __construct has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public function __construct($rootPath = '.')
            {
                $this->rootPath = $rootPath;
                $this->versions = array();
                $this->types = array();
        Severity: Minor
        Found in src/scanner/classes/CmsVersionDetector.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 inflateSync has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                that.inflateSync = function(z) {
                    var n; // number of bytes to look at
                    var p; // pointer to bytes
                    var m; // number of marker bytes found in a row
                    var r, w; // temporaries to save total_in and total_out
        Severity: Minor
        Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

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

              _liveCtxBind : function(ctx, e, data, fn, fnCtx) {
                  if(typeof e === 'object') {
                      if(functions.isFunction(data) || functions.isFunction(fn)) { // mod change event
                          e = this._buildModEventName(e);
                      } else {
          Severity: Minor
          Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

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

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

                      function fill_window() {
                          var n, m;
                          var p;
                          var more; // Amount of free space at the end of the window.
              
              
              Severity: Minor
              Found in src/log_analyzer/js/deflate.js - About 1 hr to fix

                Function append has 37 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 === 0)
                                return;
                            z.next_in_index = 0;
                Severity: Minor
                Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

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

                  function addPointerEvent(type, toExtend) {
                  
                      var eventName = 'pointer' + type,
                  
                          eventSpecial = $.event.special[eventName] = {
                  Severity: Minor
                  Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

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

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

                          function HttpReader(url) {
                              var that = this;
                      
                              function getData(callback, onerror) {
                                  var request;
                      Severity: Minor
                      Found in src/log_analyzer/js/zip-ext.js - About 1 hr to fix

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

                                emit : function(e, data) {
                                    var storage = this[storageExpando],
                                        eventInstantiated = false;
                        
                                    if(storage) {
                        Severity: Minor
                        Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                            function sanitize(options) {
                              var buttons;
                              var total;
                          
                              if (typeof options !== "object") {
                          Severity: Minor
                          Found in src/scanner/static/js/bootbox.js - About 1 hr to fix

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

                                        getEntries : function(callback) {
                                            if (reader.size < 22) {
                                                onerror(ERR_BAD_FORMAT);
                                                return;
                                            }
                            Severity: Minor
                            Found in src/log_analyzer/js/zip.js - About 1 hr to fix

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

                                  Spinner.prototype.lines = function(el, o) {
                                    var r = o.length+o.width
                                      , s = 2*r
                              
                                    function grp() {
                              Severity: Minor
                              Found in src/log_analyzer/js/spin.js - About 1 hr to fix

                                Function huft_build has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        function huft_build(b, // code lengths in bits (all assumed <=
                                        // BMAX)
                                        bindex, n, // number of codes (assumed <= 288)
                                        s, // number of simple-valued codes (0..s-1)
                                        d, // list of base values for non-simple codes
                                Severity: Major
                                Found in src/log_analyzer/js/inflate.js - About 1 hr to fix

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

                                                  'inited': function () {
                                                      var self = this;
                                                      this.bindTo('timeslot', 'click tap', function () {
                                                          this.toggleMod(this.elem('timeslot'), 'open', 'yes');
                                                         
                                  Severity: Minor
                                  Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

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

                                            _changeMonth: function (direction) {
                                    
                                                var self = this,
                                                    titleClickContent = this.months[this._dates[direction].month + 1] + ' ' + this._dates[direction].year,
                                                    backCalendar = this.findElem('body', 'position', 'back'),
                                    Severity: Minor
                                    Found in src/log_analyzer/js/analyzer.table.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if ( ( minDateStr == '' && '' == maxDateStr ) ||
                                                   ( minDateStr == '' && date <= maxDate ) ||
                                                   ( minDate <= date && '' == maxDateStr ) ||
                                                   ( minDate <= date && date <= maxDate ) )
                                              {      
                                      Severity: Critical
                                      Found in src/log_analyzer/js/analyzer.tableBuilder.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language