# Line Feed

Trend Metric Trend Metrics / Code Size

Counts line feeds in the application source files: the physical lines of code, while # Lines of Code counts logical lines of code (see https://www.ndepend.com/docs/code-metrics#NbLinesOfCode). Source files declaring test code are not counted.

CQLinq source

This trend metric is written in CQLinq, C# LINQ over the NDepend code model. It ships with every new NDepend project: you can read it, adapt it, or use it as a starting point for your own custom rules.

// <TrendMetric Name="# Line Feed" Unit="LF" />
// Application source files only: files declaring test code (the TestCode view) are not counted
codeBase.SourceFiles.Where(f => !f.CodeElements.Any(ce => ce.IsTestCode)).Sum(f => f.NbLines)

//<Desc>
// Counts line feeds in the application source files: the **physical lines
// of code**, while **# Lines of Code** counts **logical lines of code** (see
// https://www.ndepend.com/docs/code-metrics#NbLinesOfCode). Source files
// declaring test code are not counted.
//</Desc>

Trend Metrics / Code Size: all 22 items