I've opted to simply add the SPDX license identifier [0]
, just like it's done in the Linux kernel [1]<p>[0] <a href="https://spdx.org/licenses/" rel="nofollow">https://spdx.org/licenses/</a><p>[1] <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/async.c?h=v6.12-rc5#n1" rel="nofollow">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...</a>
Neat. There's a lot of hand rolled implementations of this idea, would be nice to have something to standardize on. I am sure it can be done with custom templates but a good idea IMO might be supporting declarations using SPDX IDs. You see them in some source code, e.g. KDE source code. More info here:<p><a href="https://spdx.dev/learn/handling-license-info/" rel="nofollow">https://spdx.dev/learn/handling-license-info/</a><p>For anyone wondering if this (license information in source files) is necessary, I think the answer is "maybe". Some licenses (e.g. Apache 2) seem to be written such that the license itself requires the disclaimer, and even having copyright information (e.g. users that make substantial contribution adding the name of whoever is assigned the copyright for their contribution to the header) is a good idea. I used to be against this for aesthetic reasons, viewing it somewhat similarly to those annoying corporate email footers, but over time it's become more obvious to me that it not only is great for keeping the license very explicit everywhere but may also be legally a good idea. (IANAL.)
This could be done with a shell one-liner IIUC.<p>Aside: what is with the contemporary obsession with injecting emojis into everything? If I wanted a picture book, well, I'd go read a picture book.
Ideally, this would follow the format of reuse.software so that there's a machine-readable standard for these: <a href="https://reuse.software" rel="nofollow">https://reuse.software</a><p>I'm working on tooling that involves automated reading of this info, and it's a lot easier if the tools don't have to do fuzzier matching.
I like this idea, but with a project with two or more source code files, I would prefer an SPDX identifier, or just rely on the license file in the project directory, licenses at the top of sources IMO should only be for single file/header libraries.