Giter Site home page Giter Site logo

mp-codecheckbin-ubuntu's People

Contributors

justin-merly avatar pgotts avatar seeker71 avatar urs-muff avatar

Stargazers

 avatar  avatar  avatar

Forkers

alexkissijr

mp-codecheckbin-ubuntu's Issues

MPCC abort due to failed to parse config.json

MPCC 0.1.2 abort during the training step due to config.json parsing issue:

Env: Linux 5.13.0-40-generic #45~20.04.1-Ubuntu SMP

$ ./MPCC infer -D fdb 
ERROR: Unable to read MP-CodeCheck user configuration file (/home/zuyu/.merly.ai/debugging/MP-CodeCheck/config.json), Error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
[1]  abort ./MPCC infer -D fdb

$ cat /home/zuyu/.merly.ai/debugging/MP-CodeCheck/config.json
{
  "colors": {
    "anomaly_background": {
      "rgb": "741da3",
      "type": 3
    },
    "background": {
      "rgb": "1e1e1e",
      "type": 3
    },
    "bad_score": {
      "rgb": "d98900",
      "type": 3
    },
    "builtin": {
      "rgb": "c586c0",
      "type": 3
    },
    "color_on": true,
    "comment": {
      "rgb": "57a64a",
      "type": 3
    },
    "constant": {
      "rgb": "569cd6",
      "type": 3
    },
    "delimiter": {
      "rgb": "eeeeee",
      "type": 3
    },
    "expression_id_background": {
      "rgb": "3f1359",
      "type": 3
    },
    "foreground": {
      "rgb": "d4d4d4",
      "type": 3
    },
    "function": {
      "rgb": "dcdca8",
      "type": 3
    },
    "highlight_background": {
      "rgb": "005c22",
      "type": 3
    },
    "keyword": {
      "rgb": "d8a0df",
      "type": 3
    },
    "keyword_pre_processor": {
      "rgb": "9b9b93",
      "type": 3
    },
    "known_bad": {
      "rgb": "ff0000",
      "type": 3
    },
    "known_good": {
      "rgb": "394700",
      "type": 3
    },
    "line_nr": {
      "rgb": "1a5e7c",
      "type": 3
    },
    "line_nr_background": {
      "rgb": "2e2e2e",
      "type": 3
    },
    "local": {
      "rgb": "9cdcfe",
      "type": 3
    },
    "member": {
      "rgb": "b8d7a3",
      "type": 3
    },
    "number": {
      "rgb": "b5cea8",
      "type": 3
    },
    "operator": {
      "rgb": "fff2c9",
      "type": 3
    },
    "pre_processor": {
      "rgb": "beb7ff",
      "type": 3
    },
    "string": {
      "rgb": "ffbea3",
      "type": 3
    },
    "string_escape": {
      "rgb": "ae81ff",
      "type": 3
    },
    "type": {
      "rgb": "4ec9b0",
      "type": 3
    }
  },
  "filter": {
    "min_class": "trivial",
    "min_score": 0,
    "nested_ifs": false
  },
  "local_db_root_path": "/home/zuyu/code/.",
  "local_source_root_path": "/home/zuyu/code/.stream",
  "local_source_zip_root_path": "/home/zuyu/code/.zip",
  "log_path": "/home/zuyu/code/logs",
  "output": {
    "line_before": 15,
    "lines_after": 5
  },
  "remote_storage_root_path": "",
  "run_training": true
}

Bugs not captured by MP-CC

Hi,

I am trying to use MP-CodeCheck to find some bugs in code that are intentionally placed. I have example C++ code here:

#include` <iostream>

using namespace std;

int main(int argc, char* argv[]) {
  int num = argc - 1;

  if (num == 0) {
    cout << "No arguments provided\n";
  } else if (num == 0) { // intentional mistake
    cout << "1 argument provided\n";
  } else if (num = 2) { // intentional mistake
    cout << "2 arguments provided\n";
  } else {
    cout << num << " arguments provided\n";
  }
  if (argv != 0) {
    cout << "argv not null\n";;// intentional mistake
  }
  if (argv == nullptr) {
    return **argv; // intentional mistake
  }

  return 0;
}

I see no anomalies detected in MP-CodeCheck, is this expected behaviour?
Capture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.