diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-22 12:12:27 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-23 18:12:43 +0300 |
commit | 3fcc1f919251c10c1f1ea105f776d7e9c6f5e18e (patch) | |
tree | ddd5b1ea99d834b6de6c7793be69a0ed450dc5ec /testdata | |
parent | SelfAssignment: check for global scope self assignments (diff) | |
download | pkgcheck-3fcc1f919251c10c1f1ea105f776d7e9c6f5e18e.tar.gz pkgcheck-3fcc1f919251c10c1f1ea105f776d7e9c6f5e18e.tar.bz2 pkgcheck-3fcc1f919251c10c1f1ea105f776d7e9c6f5e18e.zip |
BannedPhaseCall: detect calls of phase functions directly
Resolves: https://github.com/pkgcore/pkgcheck/issues/625
Closes: https://bugs.gentoo.org/596616
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/data/repos/standalone/BadCommandsCheck/BannedPhaseCall/expected.json | 1 | ||||
-rw-r--r-- | testdata/repos/standalone/BadCommandsCheck/BannedPhaseCall/BannedPhaseCall-0.ebuild | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/testdata/data/repos/standalone/BadCommandsCheck/BannedPhaseCall/expected.json b/testdata/data/repos/standalone/BadCommandsCheck/BannedPhaseCall/expected.json new file mode 100644 index 00000000..cf55baad --- /dev/null +++ b/testdata/data/repos/standalone/BadCommandsCheck/BannedPhaseCall/expected.json @@ -0,0 +1 @@ +{"__class__": "BannedPhaseCall", "category": "BadCommandsCheck", "package": "BannedPhaseCall", "version": "0", "line": "pkg_postinst", "lineno": 13} diff --git a/testdata/repos/standalone/BadCommandsCheck/BannedPhaseCall/BannedPhaseCall-0.ebuild b/testdata/repos/standalone/BadCommandsCheck/BannedPhaseCall/BannedPhaseCall-0.ebuild new file mode 100644 index 00000000..c7177c07 --- /dev/null +++ b/testdata/repos/standalone/BadCommandsCheck/BannedPhaseCall/BannedPhaseCall-0.ebuild @@ -0,0 +1,14 @@ +EAPI=8 + +DESCRIPTION="Ebuild calls phase function directly" +HOMEPAGE="https://github.com/pkgcore/pkgcheck" +SLOT="0" +LICENSE="BSD" + +pkg_postinst() { + echo "something" +} + +pkg_postrm() { + pkg_postinst +} |