diff options
author | 2023-11-16 21:51:44 +0200 | |
---|---|---|
committer | 2023-11-16 21:51:44 +0200 | |
commit | d837ae22cc5381710f63d6600940d48a8e2875f5 (patch) | |
tree | 60f6a6bd063719ec352ee0d3a115dfc20a49d7aa /testdata | |
parent | whitespace: fix double "on" in result text (diff) | |
download | pkgcheck-d837ae22cc5381710f63d6600940d48a8e2875f5.tar.gz pkgcheck-d837ae22cc5381710f63d6600940d48a8e2875f5.tar.bz2 pkgcheck-d837ae22cc5381710f63d6600940d48a8e2875f5.zip |
UnusedInherits: add whitelist for weak usage by another eclass
Came up as example from elisp eclass, which has automagic calling of
functions from readme.gentoo-r1 eclass if they are found in env. While
weird, this is legal so let's add a simple whitelist support for this,
so it would be simple to extend in future.
Reported-by: Ulrich Müller <ulm@gentoo.org>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
3 files changed, 32 insertions, 0 deletions
diff --git a/testdata/repos/eclass/InheritsCheck/UnusedInherits/UnusedInherits-2.ebuild b/testdata/repos/eclass/InheritsCheck/UnusedInherits/UnusedInherits-2.ebuild new file mode 100644 index 00000000..320a61bd --- /dev/null +++ b/testdata/repos/eclass/InheritsCheck/UnusedInherits/UnusedInherits-2.ebuild @@ -0,0 +1,8 @@ +EAPI=8 + +inherit elisp readme.gentoo-r1 + +DESCRIPTION="Ebuild with weak usage inheritance" +HOMEPAGE="https://github.com/pkgcore/pkgcheck" +SLOT="0" +LICENSE="BSD" diff --git a/testdata/repos/eclass/eclass/elisp.eclass b/testdata/repos/eclass/eclass/elisp.eclass new file mode 100644 index 00000000..e72964ea --- /dev/null +++ b/testdata/repos/eclass/eclass/elisp.eclass @@ -0,0 +1,13 @@ +# @ECLASS: elisp.eclass +# @MAINTAINER: +# Random Person <maintainer@random.email> +# @SUPPORTED_EAPIS: 8 +# @BLURB: Stub eclass for testing the UnusedInherit result. + +EXPORT_FUNCTIONS src_prepare + +# @FUNCTION: elisp_src_prepare +# @USAGE: +# @DESCRIPTION: +# Public src_prepare stub function. +elisp_src_prepare() { :; } diff --git a/testdata/repos/eclass/eclass/readme.gentoo-r1.eclass b/testdata/repos/eclass/eclass/readme.gentoo-r1.eclass new file mode 100644 index 00000000..c7f61a09 --- /dev/null +++ b/testdata/repos/eclass/eclass/readme.gentoo-r1.eclass @@ -0,0 +1,11 @@ +# @ECLASS: readme.gentoo-r1.eclass +# @MAINTAINER: +# Random Person <maintainer@random.email> +# @SUPPORTED_EAPIS: 8 +# @BLURB: Stub eclass for testing the UnusedInherit result. + +# @FUNCTION: readme.gentoo_create_doc +# @USAGE: +# @DESCRIPTION: +# stub function +readme.gentoo_create_doc() { :; } |