Preserve file comment headers #47

Merged
merged 1 commit into from Sep 13, 2013

Conversation

Projects
None yet
2 participants
Collaborator

guns commented Aug 4, 2013

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.

@guns guns Preserve file comment headers
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")
3c058a0

@technomancy technomancy added a commit that referenced this pull request Sep 13, 2013

@technomancy technomancy Merge pull request #47 from guns/preserve-comment-headers
Preserve file comment headers
1087042

@technomancy technomancy merged commit 1087042 into technomancy:master Sep 13, 2013

Owner

technomancy commented Sep 13, 2013

Sorry I missed this earlier; thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment