technomancy / slamhound

Slamhound rips your namespace form apart and reconstructs it.
Other
473 stars 38 forks source link

Preserve file comment headers #47

Closed guns closed 11 years ago

guns commented 11 years ago

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.

technomancy commented 11 years ago

Sorry I missed this earlier; thanks.