Changed 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.
Changed Files
| API ID | CountDeclFileChanged |
| Targets | Architectures Project |
| Languages | Ada Assembly Basic C# C++ Fortran Java Jovial Pascal Python Rust VHDL Web |
| Categories | Compare Contents |
| Cost | Cached |
Number of changed files, compared to the comparison database.
Counts files in both databases whose text differs. A file counts once, however many of its lines changed. See Files for what counts as a file. Since changes come from a textual diff, a file must have Lines to count. For an architecture or the project, each of its files is counted, and a file added to or removed from an architecture counts as new or removed.
For example, an architecture holding these files in each version:
| Comparison database | Current database | Status |
|---|---|---|
classes.cpp | classes.cpp | changed |
functions.cpp | functions.cpp | changed |
legacy.cpp | removed | |
util.h | util.h | same |
version.h | version.h | changed |
config.h | new | |
extra.cpp | new | |
main.cpp | new | |
shapes.cpp | new | |
shapes.h | new |
classes.cpp, functions.cpp, and version.h changed, so CountDeclFileChanged = 3. util.h is the same in both versions, so it doesn't count.
See New Files and Removed Files for files that exist in only one version, and Files for the total count. See Compare two versions of a project ↗ for how entities are compared, and New Lines, Removed Lines, and Changed Lines for how much a file changed.