FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

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

    toScript(indentLevel=1){
        let entry=null, out=`{
`;

        for(let i=0; i<this.entries.length; i++){
Severity: Minor
Found in src/JavaScriptHelper.js - About 1 hr to fix

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

        init(){
            let im = InspectorManager.getInstance();
    
            // init config
            // TODO remove engine configuration
    Severity: Minor
    Found in src/DexcaliburProject.js - About 1 hr to fix

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

          toString(){
              let v = '[', e=null;
              //console.log(this);
              for(let i=0; i<this.value.length; i++){
                  e = this.value[i];
      Severity: Minor
      Found in src/SmaliVM.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 multiVar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          multiVar: function(raw_src){
              let m = null, v = [];
      
              m = Core.RX.REF_REG_MULT.exec(raw_src);
      
      
      Severity: Minor
      Found in src/Opcode.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 parse has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

        parse() {
          const xmlHeader = this.readChunkHeader();
          if (xmlHeader.chunkType !== ChunkType.XML) {
            throw new Error('Invalid XML header');
          }
      Severity: Minor
      Found in src/libs/BinaryXmlParser.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 AppFile has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function AppFile(config){
          this.name = null;
          this.type = null;
          this.size = null;
          this.path = null;
      Severity: Minor
      Found in src/File.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 connect has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          async connect( pIpAddress, pPortNumber, pDevice){
              let success = false, wrapper=null;
      
              
              for(let i in this.bridges){
      Severity: Minor
      Found in src/DeviceManager.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 fromXml has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          static fromXml(xmlobj){
              let intf = new IntentFilter();
      
              if(xmlobj.action != null && xmlobj.action instanceof Array){
                  for(let i=0; i<xmlobj.action.length; i++){
      Severity: Minor
      Found in src/AndroidAppComponents.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 resolveInheritedField has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function resolveInheritedField(fieldRef, parentClass){
          for(let i in parentClass.fields){
              if(parentClass.fields[i].name===fieldRef.name){
                  if(parentClass.fields[i].tags.indexOf('missing')>-1){
                      return parentClass.fields[i];
      Severity: Minor
      Found in src/Analyzer.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 getBasicBlockByLabel has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      Method.prototype.getBasicBlockByLabel = function(pLabel, pType){
          //if(pType == CONST.INSTR_TYPE.IF){
          switch(pType)
          {
              case CONST.INSTR_TYPE.IF:
      Severity: Minor
      Found in src/CoreClass.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 parse has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          parse(src){
              let ls=src.split(EOL), ln=null, sml=null, obj=null;
          
              //console.log(ls);
              for(let l=0; l<ls.length; l++){
      Severity: Minor
      Found in src/SmaliParser.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 showCFG_old has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      Analyzer.prototype.showCFG_old = function(bblocks, prefix=""){
      
          let pathTRUE = Chalk.green(prefix+"    |\n"+prefix+"    |\n"+prefix+"    |\n"+prefix+"    +-----[TRUE]-->");
          let path_len = "    +-----[TRUE]-->".length;
          let pathFALSE = Chalk.red(prefix+"    |\n"+prefix+"    |\n"+prefix+"    |\n"+prefix+"    +-----[FALSE]->");
      Severity: Minor
      Found in src/Analyzer.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 resolveInheritedMethod has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      function resolveInheritedMethod(methodRef, parentClass){
          for(let i in parentClass.methods){
              if(parentClass.methods[i].name===methodRef.name){
                  if(parentClass.methods[i].tags.indexOf('missing')>-1){
                      return parentClass.methods[i];
      Severity: Minor
      Found in src/Analyzer.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 synchronizePlatform has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          async synchronizePlatform( pName){
              let pm = PlatformManager.getInstance(), res=false;
      
              // select platform
              switch(pName){
      Severity: Minor
      Found in src/DexcaliburProject.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 toScript has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          toScript(indentLevel=1){
              let entry=null, out=`{
      `;
      
              for(let i=0; i<this.entries.length; i++){
      Severity: Minor
      Found in src/JavaScriptHelper.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 scan has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      Scanner.prototype.scan = function(force){
          let match = null;
          for(let cat in this.rules){
              for(let name in this.rules[cat]){
                  if((this.rules[cat][name] instanceof Rule) 
      Severity: Minor
      Found in src/Scanner.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 callgraph_to has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      GraphMaker.prototype.callgraph_to = function(obj, n=1, m=2){
          let tree={ name:null, children:null };
      
          // call graph
          if(obj instanceof CLASS.Method){
      Severity: Minor
      Found in src/Graph.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 compare has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Field.prototype.compare = function(field){
          let diff = [];
      
          for(let i in this){
              switch(i){
      Severity: Minor
      Found in src/CoreClass.js - About 1 hr to fix

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

        Analyzer.prototype.showCFG = function(bblocks, offset=0, prefix="", fn=null){
        
            if(bblocks.length==0 || bblocks[offset]==undefined){
                Logger.debug(offset+" => not block");
                return null;
        Severity: Minor
        Found in src/Analyzer.js - About 1 hr to fix

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

              parsePackageList( pPackageListStr, pOptions=''){
                  var reg = new RegExp("^package:(?<apk_name>.*)");
                  var packages = [];
          
                  if(pPackageListStr.indexOf("error:")==0){
          Severity: Minor
          Found in src/AdbWrapper.js - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language