Code Files is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Code Files
API ID: CountDeclFileCodeLanguages: C++
Targets: Architectures, Project
Number of code files.
Normally a .c/.cpp file, though it's based on how the parser identifies the file, not just its extension.
For example, this directory:
test/c/
cohesion.cpp
csvExportBigNumbers.cpp
friend.cpp
io.cpp
knots.cpp
paths.cpp
pond.cpp
sample.cpp
vehicles.cpp
classes.cpp
class_macro.h
has 10 .cpp code files (everything except class_macro.h), so CountDeclFileCode = 10.
See Header Files for the complementary count, and Files for the total across all languages.
Targets By Language:- C++: Project
- For projects and architectures, this metric is enabled from "Project Configuration/Metrics/Projects and Architectures" with the "Show aggregated file metrics" option.