CMetrics measures size and complexity for C files

Overview
C metrics package
=================

INSTALL
-------

see INSTALL file

USAGE
-----

cmetrics [-h] [-f] [-p] [-n] target_dir

positional arguments:
  target_dir       directory with sources (recursively scanned)

optional arguments:
  -h, --help       show this help message and exit
  -f, --functions  show metrics for functions instead of files
  -p, --path       show full file path in the last column
  -n, --no-header  do not show metrics names in the first row
	  

HOW TO INTERPRET THE OUTPUT OF CMETRICS
---------------------------------------

CMetrics measures size and complexity for C files. The metrics are the
following:

 SLOC    Source Lines of Code (text lines excluding blanks and
         comments)
 LOC	 Text lines in the source code file (including blanks, etc)
 BLANK	 Number of blank lines
 COM.L	 Number of lines that are exclusively comments (no code)
 COM.N	 Number of comments in the file (a comment can be multiline)
 H.LEN	 Halstead's Length
 H.VOL	 Halstead's Volume
 H.LEVEL Halstead's Level
 H MEN.D Halstead's number of mental discriminations
 MAXCY	 Maximum McCabe's cyclomatic complexity (between all the
         functions)
 MINCY	 Minimum McCabe's cyclomatic complexity
 AVGCY	 Average McCabe's cyclomatic complexity
 MEDCY	 Median McCabe's cyclomatic complexity
 TOTCY	 Total McCabe's cyclomatic complexity (sum of all functions)

If you use the '-f' option, you will get info for functions instead of
files. If the function name is "***", it means that it is code outside
of the scope of functions but inside the file. The available metrics
are:

 SLOC    Source Lines of code
 CYCLO	 McCabe's cyclomatic complexity
 RETURN	 Number of exit points in the function

COPYRIGHT INFO
--------------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

See the COPYING file for details.

(c) 2007-2011 Israel Herraiz

Imported from the C Metrics package by Brian Renaud.

It has been "adopted" by Libresoft with permission of the original
author, and it is now part of the Libresoft-tools project.

Check https://github.com/MetricsGrimoire/CMetrics for details

Issues
  • execute fail

    execute fail

    Environment: Ubuntu 18.04 gcc verison: 7.5.0

    [email protected]:~/audio/CMetrics$ ./cmetrics -h -f /home/nathan/S1/s1_app/ File "./cmetrics", line 190 print template.format("FILE", "SLOC", "LOC", "FUNCS", "BLANK", "COM.L", "COM.N", "H LEN", "H VOL", "H LEVEL", "H MEN. D.", "MAXCY", "MINCY", "AVGCY", "MEDCY", "TOTCY",) ^ SyntaxError: invalid syntax

    opened by nathan-yangling 2
Owner
Metrics Grimoire
Metrics Grimoire
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.8k Jun 21, 2022
A static analyzer for Java, C, C++, and Objective-C

Infer Infer is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in OCaml. Installation Read our Getting Started page for det

Facebook 13.4k Jun 27, 2022
Analysis of Argon and Xenon Collision data to test Bardeen-Cooper-Schrieffer Approximation

Univeristy of North Carolina Wilmington Analysis of Argon and Xenon Collision data to test Bardeen-Cooper-Schrieffer Approximation. Argon Data Tree Fi

William Jarratt 1 Nov 15, 2021
Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and used at Facebook.

Flint++ A Cross Platform Port of Facebook's C++ Linter Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and

Joss Whittle 253 Jun 24, 2022
Complete introduction to size balanced trees (O(1) amortized complexity)

Size Balanced Tree A size balanced tree (SBT) is a self-balancing binary search tree (SBBST) rebalanced by examining the sizes of each node's subtrees

Jishan Shaikh 18 Jun 2, 2022
Header-only C++11 library to handle physical measures

cpp-measures Header-only C++11 library to handle physical measures License: This project is released under the Mozilla Public License 2.0. Purpose Thi

Carlo Milanesi 20 Jun 28, 2018
Seidel's Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables

SDLP Seidel's Algorithm: Linear-Complexity Linear Programming (LP) for Small-Dimensions About This solver is super efficient for small-dimensional LP

ZJU FAST Lab 31 Jun 8, 2022
This is the code that powers FiniteCurve.com, a TSP art style generator without the NP-hard complexity.

FiniteCurve.com -- TSP art on a CPU budget This is the code that powers FiniteCurve.com, a TSP art style generator without the NP-hard complexity. For

Vidar Holen 7 Apr 11, 2022
MPEG-H 3D Audio Low Complexity Profile Decoder

Introduction of the MPEG-H 3D Audio Low Complexity Profile Decoder The advent of object-based audio and scene-based audio has revolutionized the 3D so

Ittiam Systems Pvt. Ltd. 38 Jun 23, 2022
A tool to calculate cyclomatic complexity

Feature: python 3.10.0 is required calculate cyclomatic complexity of a program (python) generate ast from source code with the help of tree-sitter su

null 1 Mar 3, 2022
Refinements of the WFA alignment algorithm with better complexity

wfalm Refinements of the WFA alignment algorithm with better complexity Introduction This repository contains implementations of the WFA algorithm as

Jordan Eizenga 23 Jun 11, 2022
Open hardware to measure EC and pH, drive pumps, and otherwise manage a mid-size hydroponic grow over Wi-Fi.

Hydromisc This is a single PCBA with all the necessary I/O to automate a typical small to mid-size hydroponic grow, controllable over Wi-Fi

null 471 May 25, 2022
Browser and NodeJS Web Assembly audio decoder libraries that are highly optimized for size and performance.

WASM Audio Decoders WASM Audio Decoders is a collection of Web Assembly audio decoder libraries that are highly optimized for browser use. Each module

Ethan Halsall 53 May 30, 2022
A library of type safe sets over fixed size collections of types or values, including methods for accessing, modifying, visiting and iterating over those.

cpp_enum_set A library of type safe sets over fixed size collections of types or values, including methods for accessing, modifying, visiting and iter

Carl Dehlin 22 Jun 16, 2022
Shared to msvcrt.dll or ucrtbase.dll and optimize the C/C++ application file size.

VC-LTL - An elegant way to compile lighter binaries. 简体中文 I would like to turn into a stone bridge, go through 500 years of wind, 500 years of Sun, ra

Chuyu Team 180 Jun 23, 2022
My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets.

My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets. The device use SHTC3 sensors, chip CC2530, battery CR2477.

Andrew Lamchenko 13 Feb 22, 2022
Protocol Buffers with small code size

Nanopb - Protocol Buffers for Embedded Systems Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for us

null 3k Jun 22, 2022
A variation CredBandit that uses compression to reduce the size of the data that must be trasnmitted.

compressedCredBandit compressedCredBandit is a modified version of anthemtotheego's proof of concept Beacon Object File (BOF). This version does all t

Conor Richard 17 Apr 9, 2022
OSA a is minisatellite/ space probe the size of a can designed to participate in the ESA CanSat 2021 competition 🛰️ 📡 .

Project OSA OSA a is minisatellite/ space probe the size of a can designed to participate in the ESA CanSat 2021 competition ??️ ?? . Our project is c

OSATeam 9 Jun 20, 2022
ipcbuf - test/report the size of an IPC kernel buffer

ipcbuf - test/report the size of an IPC kernel buffer Different forms of IPC utilize different in-kernel buffers, depending on a variety of possibly s

Jan Schaumann 4 Nov 24, 2021
CodeCompactor is an open source program designed for reducing the size of your code!

CodeCompacter An exciting, new and open source program for reducing the length of your code! Usage: ./CodeCompacter {ARGUMENTS} Arguments: -L {languag

Henry Dewsnap 1 Nov 28, 2021
esp32s2 implement a usb port display with 320*240 size with ~13pfs

esp32s2_usb_display overview it's a USB mini display for Linux platform, such as raspberry Pi, Centos X86 server. it refer many opensource projects: r

null 8 May 30, 2022
Tiny - low-level library for minimizing the size of your types

foonathan/tiny Note: This project is currently WIP, no guarantees are made until an 0.1 release. This project is a C++11 library for putting every las

Jonathan Müller 96 May 21, 2022
A size-optimized STL implementation.

uSTL This library is obsolete. Please use the official gcc C++ standard library. uSTL is a partial implementation of the C++ standard library that foc

Mike Sharov 397 Jun 24, 2022
An indie game marketing size guide for social media presence

BRINDIE FREE - an .ai sourcefile with sizes for art assets needed to create Facebook page, Twitter profile, Steam Store page and Steam Developer page

Laura Bularca 150 Apr 11, 2022
Creates 3D lithophanes from image files, exports them to stl files, ready for slicing and 3D printing.

LithoMaker Creates 3D lithophanes from PNG image files and exports them to STL files, ready for slicing and 3D printing. Download the latest release h

Lars Muldjord 12 May 24, 2022
This program converts ASCII STL files to RT files for miniRT.

STL to RT This program converts ASCII STL files to RT files for miniRT. Input the ASCII STL file to the standard input and output the RT file from the

null 5 Mar 29, 2021