Comment headers in files often contain important metadata about the file
(copyright, license, contact information) that should not be removed.
A note about the implementation: read-comment-header can be implemented
in ~3 lines by using .readLine. However, .readLine discards newlines, so
slamhound would have to make an assumption about what newlines have been
discarded, which is a mistake.
e.g. Editing Unix source files on a Windows machine would produce \r\n
line terminators if we join the header lines with
(System/getProperty "line.separator")
PS. I didn't see an appropriate namespace for the new functions, so I
just placed them in slam.hound.
Comment headers in files often contain important metadata about the file (copyright, license, contact information) that should not be removed.
A note about the implementation: read-comment-header can be implemented in ~3 lines by using .readLine. However, .readLine discards newlines, so slamhound would have to make an assumption about what newlines have been discarded, which is a mistake.
e.g. Editing Unix source files on a Windows machine would produce \r\n line terminators if we join the header lines with (System/getProperty "line.separator")
PS. I didn't see an appropriate namespace for the new functions, so I just placed them in slam.hound.