.cov files?

I don’t think this is Julia-related, but maybe it is still related to some practice of coding in Julia (and I don’t know where else to ask).

Today I notice that lots of .cov files are generated in my Julia project directory. For example, if I have test.jl, then there are many files like test.jl.XXXXX.cov in the same directory, where XXXXX is some 5-digit number. What are these files? Is it safe to delete them, or I should keep them? I suspected if they were generated by codecov, but I was not able to find relevant information.

1 Like

They are coverage files and are emitted by Julia when it is run with --code-coverage (for example when doing Pkg.test. The number is the PID for the julia process so that parallel tests (multiple processes) don’t write to the same file. They are safe to delete.

7 Likes

To list these coverage files recursively, starting from the current directory, one can use the Unix command:

find . -name "*.cov"

To remove all of the coverage files, the find command accepts an additional -delete option:

find . -name "*.cov" -delete