Check for license information parity #36

Merged
mars merged 9 commits from :main into main 2022-11-17 06:30:36 +00:00
Contributor
No description provided.
emma added 2 commits 2022-11-12 05:02:37 +00:00
emma added 1 commit 2022-11-12 06:23:19 +00:00
emma added 1 commit 2022-11-12 06:29:51 +00:00
emma added 1 commit 2022-11-12 08:12:06 +00:00
emma changed title from Add dependency check for check_licenses.sh to Add fallback if rg(1) is not in the $PATH 2022-11-12 08:12:51 +00:00
emma added 1 commit 2022-11-12 08:18:31 +00:00
mars requested changes 2022-11-16 04:00:58 +00:00
mars left a comment
Owner

Looks great, thanks.

Looks great, thanks.
@ -5,0 +10,4 @@
# check if we have rg(1); if not, use find(1) and sed(1) instead
if ! command -v rg >/dev/null 2>&1; then
files="$(find "$PWD" -name "$1")"
Owner

This includes false positive generated Rust source files (i.e. from the wayland-protocols crate) in the target/ directory, so target/ needs to be excluded from the search path.

This includes false positive generated Rust source files (i.e. from the wayland-protocols crate) in the `target/` directory, so `target/` needs to be excluded from the search path.
emma marked this conversation as resolved
@ -5,0 +13,4 @@
files="$(find "$PWD" -name "$1")"
for file in $files; do
if ! test -n \
"$(sed -n '\|// SPDX-License-Identifier: .*|p' <"$file")"
Owner

You need to test for the // Copyright (c) 2022 Marceline Cramer copyright holder line at the beginning too.

You need to test for the `// Copyright (c) 2022 Marceline Cramer` copyright holder line at the beginning too.
emma marked this conversation as resolved
@ -5,0 +19,4 @@
fi
done
else
rg --multiline --files-without-match --glob "$1" --pcre2 \
Owner

If you hate ripgrep this much you can go ahead and ditch support for it if you want.

If you hate ripgrep this much you can go ahead and ditch support for it if you want.
emma marked this conversation as resolved
emma added 1 commit 2022-11-16 05:51:07 +00:00
emma added 1 commit 2022-11-16 06:25:35 +00:00
emma changed title from Add fallback if rg(1) is not in the $PATH to Check for license information parity 2022-11-16 06:26:12 +00:00
Owner

This looks great, thank you very much. :)

This looks great, thank you very much. :)
mars added 1 commit 2022-11-17 06:30:29 +00:00
mars merged commit 7de22f9bd4 into main 2022-11-17 06:30:36 +00:00
Sign in to join this conversation.
No description provided.