antimalware/manul

View on GitHub
src/log_analyzer/js/zip-fs.js

Summary

Maintainability
D
2 days
Test Coverage

File zip-fs.js has 458 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 Copyright (c) 2013 Gildas Lormeau. All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
Severity: Minor
Found in src/log_analyzer/js/zip-fs.js - About 7 hrs to fix

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

        function addFileEntry(zipEntry, fileEntry, onend, onerror) {
            function getChildren(fileEntry, callback) {
                if (fileEntry.isDirectory)
                    fileEntry.createReader().readEntries(callback);
                if (fileEntry.isFile)
    Severity: Minor
    Found in src/log_analyzer/js/zip-fs.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 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 process has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function process(zipEntry, fileEntry, onend) {
                      getChildren(fileEntry, function(children) {
                          var childIndex = 0;
          
                          function addChild(child) {
          Severity: Minor
          Found in src/log_analyzer/js/zip-fs.js - About 1 hr to fix

            Function getFileEntry has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function getFileEntry(fileEntry, entry, onend, onprogress, onerror, totalSize, checkCrc32) {
            Severity: Major
            Found in src/log_analyzer/js/zip-fs.js - About 50 mins to fix

              Function process has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      function process(fileEntry, entry, onend, onprogress, onerror, totalSize) {
              Severity: Minor
              Found in src/log_analyzer/js/zip-fs.js - About 45 mins to fix

                Function exportZip has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function exportZip(zipWriter, entry, onend, onprogress, totalSize) {
                Severity: Minor
                Found in src/log_analyzer/js/zip-fs.js - About 35 mins to fix

                  Function getFileEntry has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          getFileEntry : function(fileEntry, onend, onprogress, onerror, checkCrc32) {
                  Severity: Minor
                  Found in src/log_analyzer/js/zip-fs.js - About 35 mins to fix

                    Function bufferedCopy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function bufferedCopy(reader, writer, onend, onprogress, onerror) {
                    Severity: Minor
                    Found in src/log_analyzer/js/zip-fs.js - About 35 mins to fix

                      Function process has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              function process(zipWriter, entry, onend, onprogress, totalSize) {
                      Severity: Minor
                      Found in src/log_analyzer/js/zip-fs.js - About 35 mins to fix

                        There are no issues that match your filters.

                        Category
                        Status