Inhaltsverzeichnis
Static Source Code Analysis (Linting)
Statische Code-Analyse (Static program analysis)
- Source Code Analysis Tools – How to Choose and Use Them
Metriken
Größe − „Anzahl an Programmzeilen“
- line-counting-script – Count lines of code & comments in C/C++, produces basic metrics.
pros: cross platform (requires awk)
pros: very simplecons: does not care about brace/parenthesis only lines
- cloc – (Count Lines Of Code) counts, and computes differences of, comment lines, blank lines, and physical lines of source code in many programming languages.
pros: cross platform (requires perl)
pros: very simplecons: does not care about brace/parenthesis only lines
Komplexität
Kosten/Aufwand/Zeitplan
- COnstructive COst MOdel II (COCOMO® II) is a model that allows one to estimate the cost, effort, and schedule when planning a new software development activity. COCOMO Suite of Constructive Cost Models
- SLOCCount is a „software metrics tool“ or „software measurement tool“. SLOCCount will even automatically estimate the effort, time, and money it would take to develop the software.
Tools
- Resource Standard Metrics, or RSM 2), is a source code metrics and quality analysis tool unlike any other on the market. RSM provides a standard method for analyzing C, ANSI C++, C# and Java source code across operating systems.
- Coverity Scan 3) – Static Analysis
Struktur
- GNU cflow analyzes a collection of C source files and prints a graph, charting control flow within the program.
- Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules.
Universell
- Resource Standard Metrics (RSM) provides a standard method for analyzing C, ANSI C++, C# and Java source code.
FREE Fully Functional Copy for Use or Evaluation
pros: cross platform
cons: verbose output complicates post processing
- SonarQube is an open platform to manage code quality.
Community Edition is open source and available at no cost.
- LocMetrics counts total lines of code (LOC), blank lines of code (BLOC), comment lines of code (CLOC), lines with both code and comments (C&SLOC), logical source lines of code (SLOC-L), McCabe VG complexity (MVG), number of comment words (CWORDS) and physical executable source lines of code (SLOC-P).
- CCCC is a C and C++ Code Counter which analyzes C++ and Java files and generates a report on various metrics of the code. Metrics supported include lines of code, McCabe's complexity and metrics proposed by Chidamber&Kemerer and Henry&Kafura.