aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bracht Laumann Jespersen <t@laumann.xyz>2022-04-20 13:57:17 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2022-05-14 10:25:04 +0300
commitc2001e0c6ebf1c30c75ff919b9dcda4b3ba89621 (patch)
tree432d752c14d802dd78525bb9a6e26bc09fdbde9b /testdata
parentnew check: LICENSE should not contain variables (diff)
downloadpkgcheck-c2001e0c6ebf1c30c75ff919b9dcda4b3ba89621.tar.gz
pkgcheck-c2001e0c6ebf1c30c75ff919b9dcda4b3ba89621.tar.bz2
pkgcheck-c2001e0c6ebf1c30c75ff919b9dcda4b3ba89621.zip
new check: calls to eend without an argument
Calls to eend should always have an argument, there's already a QA notice in portage for this. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Closes: https://github.com/pkgcore/pkgcheck/pull/365 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/expected.json1
-rw-r--r--testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/fix.patch9
-rw-r--r--testdata/repos/standalone/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild11
3 files changed, 21 insertions, 0 deletions
diff --git a/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/expected.json b/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/expected.json
new file mode 100644
index 00000000..5ccb6433
--- /dev/null
+++ b/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/expected.json
@@ -0,0 +1 @@
+{"__class__": "EendMissingArg", "category": "EendMissingArgCheck", "package": "EendMissingArg", "version": "0", "line": "eend", "lineno": 10}
diff --git a/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/fix.patch b/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/fix.patch
new file mode 100644
index 00000000..2a0330c3
--- /dev/null
+++ b/testdata/data/repos/standalone/EendMissingArgCheck/EendMissingArg/fix.patch
@@ -0,0 +1,9 @@
+--- standalone/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild 2022-04-20 14:25:14.385255909 +0200
++++ fixed/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild 2022-04-20 15:42:04.363051160 +0200
+@@ -7,5 +7,5 @@
+
+ src_install() {
+ ebegin "installing"
+- eend
++ eend $?
+ }
diff --git a/testdata/repos/standalone/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild b/testdata/repos/standalone/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild
new file mode 100644
index 00000000..4db1fcc3
--- /dev/null
+++ b/testdata/repos/standalone/EendMissingArgCheck/EendMissingArg/EendMissingArg-0.ebuild
@@ -0,0 +1,11 @@
+EAPI=8
+
+DESCRIPTION="Ebuild calling eend without an argument"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0"
+
+src_install() {
+ ebegin "installing"
+ eend
+}