I create with cloc a csv file and used this file later in a Java Application.
This app runs on a linux vm, but I develope on a windows PC.
The Problem:
Cloc generate 2 different Header
Command:
cloc . --csv --quiet --by-file --unix
Testoutput via Java Processbuilder.redirectOutput
or > cloc.csv
in cmd
Header Windows:
language,filename,blank,comment,code,"http://cloc.sourceforge.net v 1.64 T=0.52 s (558.7 files/s, 29979.7 lines/s)"
Java,./b3-eos-ws/src/main/java/com/db/data/data.java,3,0,2048
Header Linux:
100 files
200 files
300 files
Duplicate file check 327 files (278 known unique)
Unique: 100 files
Unique: 200 files
Counting: 100
Counting: 200
Counting: 300
language,filename,blank,comment,code,"http://cloc.sourceforge.net v 1.60 T=0.45 s (591.6 files/s, 34060.2 lines/s)"
Java,./b3-eos-ws/src/main/java/com/db/data/data.java,3,0,2048
Is there a way to hide the lines where cloc count the files ? Or is the only way to remove this in my Java App ?
Solution:
I try it with
cloc . --csv --quiet --by-file --unix --report-file=cloc.csv
and this works instead of
cloc . --csv --quiet --by-file --unix
and save the file with Java redirectOutput
With this solution the csv has always this format without a blank line on the top or some output from cloc :
language,filename,blank,comment,code,"http://cloc.sourceforge.net v 1.60 T=0.44 s (605.4 files/s, 34856.5 lines/s)"
Java,./git/src/main/java/com/db/data/data.java,3,0,2048