ravioli icon indicating copy to clipboard operation
ravioli copied to clipboard

For calculating metrics on C source code.

Results 13 ravioli issues
Sort by recently updated
recently updated
newest added

As an example, I have the following as the total contents of a file called sample1.c ```c #include uint8_t ctof_truncates(uint8_t c) { //simple version, rounds fractions down uint8_t i; if...

I was surprised how many global variables this found in the codebase I'm working in, so I looked into it. Turns out some of the globals it found weren't actually...

Functions that takes array arguments like `void foo(int a[3])` are not recognized as functions by ravioli. Adding '[', ']' characters to function_matcher regex fixes the problem. ```diff diff --git a/ravioli/complexity.py...

``` Traceback (most recent call last): File "/home/tunstall/.local/bin/ravioli", line 8, in sys.exit(main()) File "/home/tunstall/.local/lib/python3.8/site-packages/ravioli/ravioli.py", line 171, in main run(args.source, args) File "/home/tunstall/.local/lib/python3.8/site-packages/ravioli/ravioli.py", line 18, in run report_ksf_for_all_modules(results, errors, args) File...

sample code: ``` #define VAL 0 union { typedef_struct_t tst; uint32_t val; // for alignment } new_struct; new_struct.tst.a = 0; new_struct.tst.b = VAL; ``` Those new_struct initialization statements increase the...

The KSF defines: > Globals is the number of read/write global variables accessed by the module. So we need to count globals wherever they are _accessed_.

Hi, ravioli (0.3.0) is identifing the `breaks` inside a `switch/case` on my `update_config` function as global variables, is this expected? ```c static void update_config(void) { uint8_t config = (HAL_GPIO_ReadPin(SW1_GPIO_Port, SW1_Pin)

A new optional argument "i" was created and added to program. When this argument is used, the program will process the input file as if it contains a list of...