Closed geyslan closed 3 years ago
@nam-jaehyun @seungsoo-lee
For the rest of the project (Go Code = Apache), should the SPDX license identifier also be added in the first line as instructed by Kernel Coding Style (ebpf)? I know that those are different worlds, but I'm asking just for the sake of symmetry since we're doing this for ebpf.
Let's use GPL and Apache licenses like these.
KubeArmor/BPF/*
SPDX-License-Identifier: GPL-2.0
*.go / Dockerfile / Makefile
SPDX-License-Identifier: Apache-2.0
I think it's important to emphasize:
As per https://www.kernel.org/doc/html/v5.0/process/license-rules.html, the SPDX license identifier should be added in the first possible line and follow different comment styles based on the file type.
C source: // SPDX-License-Identifier: <SPDX License Expression>
C header: /* SPDX-License-Identifier: <SPDX License Expression> */
ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
P.S. The checkpatch.pl kernel script can be incorporated into CI to check these coding style rules. E.g.: ./checkpatch.pl --no-tree -f file.c
There's also vscode extension for that matter.
Name: checkpatch Id: idanp.checkpatch Description: Using linux kernel checkpatch tool to lint code. VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=idanp.checkpatch
When bpf (kernel side) let's define the file as GPL. The rest can continue as Apache.