scitools.com

← Metric catalog

New 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.

New Files

API IDCountDeclFileNew
TargetsArchitectures Project
LanguagesAda Assembly Basic C# C++ Fortran Java Jovial Pascal Python Rust VHDL Web
CategoriesCompare Contents
CostCached

Number of new files, compared to the comparison database.

Counts files in the current database but not in the comparison database. 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 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

config.h, extra.cpp, main.cpp, shapes.cpp, and shapes.h are new, so CountDeclFileNew = 5.

See Removed Files for the reverse of this metric, Changed Files for files in both versions that differ, 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.