mslinn/sbtcookbook — comment on commit b5316037ad2b69d90b76b8b976a25e9f13c6219f
File: loc/project/build.scala line 16
By jsuereth:

try something more like this:

def line_count(file: File): Long = IO.readLines(file).length // NOTE: Horribly inefficient and doesn't ignore comments.

def sources_line_count(file: Seq[File]): Long =
if(files.empty) 0
else file.par.map(line_count).reduce(_+_)

val locTask = lock <<= (sources in Compile) map sources_line_count

then in SBT type:

show loc