haros icon indicating copy to clipboard operation
haros copied to clipboard

ERROR:haros.analysis_manager:Plugin haros_plugin_cccc ran into an error.

Open melnarte opened this issue 4 years ago • 1 comments

Haros is installed with pip install haros no other actions were taken.

After yaml file was created to scan only one custom package

%YAML 1.1
---
packages:
    - qr_filtering

Launching was not successful:

pi@robot:~/catkin_ws/src/core $ haros full -p delete.yaml
[HAROS] Running setup operations...
[HAROS] Loading common definitions...
[HAROS] Loading plugins...
  > Loaded haros_plugin_cccc
  > Loaded haros_plugin_ccd
  > Loaded haros_plugin_cppcheck
  > Loaded haros_plugin_cpplint
  > Loaded haros_plugin_lizard
  > Loaded haros_plugin_mi_calculator
  > Loaded haros_plugin_pylint
  > Loaded haros_plugin_radon
[HAROS] Reading project and indexing source code...
WARNING:haros.extractor:C++ AST parser not found.
[HAROS] Running analysis...
WARNING:haros.analysis_manager:Could not import pyflwor. Skipping query execution.
ERROR:haros.analysis_manager:Plugin haros_plugin_cccc ran into an error.
ERROR:haros.analysis_manager:Plugin haros_plugin_cppcheck ran into an error.
[HAROS] Saving analysis results...
[HAROS] Serving visualisation at localhost:8080
[HAROS] Press enter to shutdown the viz server:

Any ideas what should I install also?

melnarte avatar Sep 06 '21 11:09 melnarte

Output seems normal, with a few key points (1).

It should have opened a web browser with the visualizer, after displaying the last couple lines of output. If it did not open the browser, I will have to look into it and ask that you share some details about your environment.

  • Running with or without Docker?
  • Which version of Python?

(1) About the error messages.

WARNING:haros.extractor:C++ AST parser not found.

Expected. Only needed if you want to extract models from source code. Requires libclang in your system and clang in Python, both with equal versions. More details:

  • https://github.com/git-afsantos/haros/blob/master/INSTALL.md#model-extraction

WARNING:haros.analysis_manager:Could not import pyflwor. Skipping query execution.

Expected. Only needed if you want to write/run queries over extracted models. More details:

  • https://github.com/git-afsantos/haros/blob/master/INSTALL.md#computation-graph-model-queries

ERROR:haros.analysis_manager:Plugin haros_plugin_cccc ran into an error. ERROR:haros.analysis_manager:Plugin haros_plugin_cppcheck ran into an error.

Probably missing the corresponding tools. The HAROS plugins for these are just wrappers that call the tools cccc and cppcheck respectively.

[sudo] apt-get install cppcheck
[sudo] apt-get install cccc

CCCC is used for metrics, such as complexity and coupling, in C++ code.

CppCheck detects bugs, undefined behaviour and dangerous coding constructs in C++ code.

git-afsantos avatar Sep 06 '21 12:09 git-afsantos