ci: Add a CI check for REUSE-compliant licensing/copyright headers

This doesn’t enforce licensing/copyright headers to be present on all
files, but does check that at least a minimum number of files are
correct.

This should help avoid new files being added without appropriate
licensing information in future.

The baseline is set at what `reuse lint` outputs for me at the moment.

See https://reuse.software/tutorial/#step-2 for information about how to
add REUSE-compliant licensing/copyright to files.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
This commit is contained in:
Philip Withnall
2022-11-02 15:20:09 +00:00
parent fca52b7914
commit b906d470c7
3 changed files with 77 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ cache:
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v19"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v13"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v14"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v9"
MESON_TEST_TIMEOUT_MULTIPLIER: 4
G_MESSAGES_DEBUG: all
@@ -72,6 +72,17 @@ sh-and-py-check:
- "**/*.py"
- "**/*.sh"
style-check-mandatory:
extends: .only-default
image: $DEBIAN_IMAGE
stage: style-check
allow_failure: false
script:
- .gitlab-ci/run-reuse.sh
variables:
# The submodules are needed for `reuse lint` to work properly
GIT_SUBMODULE_STRATEGY: "normal"
fedora-x86_64:
extends:
- .build-linux