scitools.com

← Metric catalog

Changed Header 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 Header Files

API IDCountDeclFileHeaderChanged
TargetsArchitectures Project
LanguagesC++
CategoriesCompare Contents
CostCached

Number of changed header files, compared to the comparison database.

Counts header files in both databases whose text differs. A header file counts once, however many of its lines changed. See Header Files for what counts as a header file. Since changes come from a textual diff, a header 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 databaseCurrent databaseStatus
classes.cppclasses.cppchanged
functions.cppfunctions.cppchanged
legacy.cppremoved
util.hutil.hsame
version.hversion.hchanged
config.hnew
extra.cppnew
main.cppnew
shapes.cppnew
shapes.hnew

version.h changed, so CountDeclFileHeaderChanged = 1. util.h is the same in both versions, so it doesn't count.

See New Header Files and Removed Header Files for header files that exist in only one version, and Header 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 header file changed.