I have licensed my software under LGPL. I am too lazy to include the licensing headers in all files, so I skipped the unit tests files. Is that a problem?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To directly answer the question (whether it’s a problem to skimp on license headers in unit test files out of laziness), my gut answer is probably not. Open-source purists and legal experts would probably say that you need to include the license in every source file. I think that’s good practice, but failing to do so is not the end of the world, especially if your code comes with a LICENSE.txt file. Even more so for unit test code, which is probably not at all applicable outside the context of your project.
I’m obviously not a lawyer, but if someone were to use your source code in a way not conducive with your license, (LGPL in this case) I have trouble imagining that arguing that the license wasn’t included in a particular source file would hold too much water. I would expect someone that wants to use the code to find out what the license is beforehand, and if someone were to steal your code and call it their own, it’s not okay just because there wasn’t a license header in the file. In my opinion, theft is theft, whether or not there’s a sign that says “You’re not allowed to steal this.” 🙂 Unfortunately, that’s unlikely to be sufficient in the complex world in which we live… (sigh)
Perhaps the best answer is “better safe than sorry”, but go with your instinct and the guidance of experienced developers you trust. I guess that’s why you asked on SO. 😉