Open jackfirth opened 7 years ago
The main thing that makes it different from other line-counting tools is that it goes through the source locations of syntax objects. So even for a #lang whitespace
or something it would still count the number of lines that had the type of whitespace that would be significant for code, without the type of whitespace that's for actual whitespace and comments.
Does that need to be specified in the collection name though? Being a Racket package alone seems like enough to imply to me that it only works on Racket code (in the sense of any file with a #lang
, not any file written in #lang racket
) and therefore might use some Racket trickery with syntax objects to determine what lines to count.
This is the nittiest of nitpicks, so don't take me too seriously here.
The name
syntax-sloc
for the package and collection is a bit odd, since the package provides line counts for things other than just syntax objects. What do you think of naming the package and collectionsloc
? The existing modules in thesyntax-sloc
collection could be renamed tosloc/syntax
,sloc/file
,sloc/directory
, andsloc/pkg
. It might be simpler to just not bother with separate modules though.