Don't use LICENSE as a self-test sample file#638
Conversation
puellanivis
left a comment
There was a problem hiding this comment.
I will note that the LICENSE text itself says:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
So, this would suggest that redistributing our source code without including the copyright, the list of conditions, and the disclaimer (this effectively covers the entire LICENSE file) would be violating the terms of the license to redistribute that code.
I would have serious concerns about the copyright compliance should anyone be redistributing this source code without the LICENSE file, so I’m unsure if this change is even appropriate.
ls_formatting_test.go
Outdated
| func TestRunLsWithLicensesFile(t *testing.T) { | ||
| path := "LICENSE" | ||
| func TestRunLsWithSourceFile(t *testing.T) { | ||
| path := "sftp.go" |
There was a problem hiding this comment.
It would recommend in the case that you are not going to copy in the LICENSE file, we would want to use the very source file we’re in, since we should be able to guarantee its existence at least.
There was a problem hiding this comment.
Clever! I updated the pull request.
Good point, but Debian policy is to ship this file in a separate /usr/share/doc/*/copyright file, and the file for your package is here: https://sources.debian.org/src/golang-github-pkg-sftp/1.13.6-1/debian/copyright That file is always included whenever your package is installed, and having a predictable place for all license texts helps the reader to find the appropriate text more easily. /Simon |
d93a0b0 to
36e0a6f
Compare
Hi!
I help maintain this package for Debian, and we have a policy to not install extra copies of license texts. Your self-tests appears to use some file in the source directory and uses
LICENSEfor this. This patch changes to use the hopefully always existingsftp.gofile instead.Thanks for your consideration!
/Simon