aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-10-28 16:57:38 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-10-31 20:20:23 +0200
commitbe9e91b4f8ebd49aeff8efd69cac8c61c54d5ba6 (patch)
tree69f3b11ee00e52051f495c9469a10e17f0a36d52 /testdata
parentMissingRemoteIdCheck: fix bad suggestion for downloads.sourceforge.net (diff)
downloadpkgcheck-be9e91b4f8ebd49aeff8efd69cac8c61c54d5ba6.tar.gz
pkgcheck-be9e91b4f8ebd49aeff8efd69cac8c61c54d5ba6.tar.bz2
pkgcheck-be9e91b4f8ebd49aeff8efd69cac8c61c54d5ba6.zip
DoCompressedFilesCheck: new check for compressed do calls
New check for catching passing compressed manpages to doman and newman, and passing compressed info to doinfo. Resolves: https://github.com/pkgcore/pkgcheck/issues/477 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/expected.json2
-rw-r--r--testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/expected.json4
-rw-r--r--testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/InstallCompressedInfo-0.ebuild11
-rw-r--r--testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/InstallCompressedManpage-0.ebuild12
4 files changed, 29 insertions, 0 deletions
diff --git a/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/expected.json b/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/expected.json
new file mode 100644
index 00000000..96e4e20c
--- /dev/null
+++ b/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/expected.json
@@ -0,0 +1,2 @@
+{"__class__": "InstallCompressedInfo", "category": "DoCompressedFilesCheck", "package": "InstallCompressedInfo", "version": "0", "line": "${PN}.bz2", "lineno": 9, "func": "doinfo"}
+{"__class__": "InstallCompressedInfo", "category": "DoCompressedFilesCheck", "package": "InstallCompressedInfo", "version": "0", "line": "test.gz", "lineno": 9, "func": "doinfo"}
diff --git a/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/expected.json b/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/expected.json
new file mode 100644
index 00000000..b743d171
--- /dev/null
+++ b/testdata/data/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/expected.json
@@ -0,0 +1,4 @@
+{"__class__": "InstallCompressedManpage", "category": "DoCompressedFilesCheck", "package": "InstallCompressedManpage", "version": "0", "line": "${PN}.2.bz2", "lineno": 9, "func": "doman"}
+{"__class__": "InstallCompressedManpage", "category": "DoCompressedFilesCheck", "package": "InstallCompressedManpage", "version": "0", "line": "test.gz", "lineno": 9, "func": "doman"}
+{"__class__": "InstallCompressedManpage", "category": "DoCompressedFilesCheck", "package": "InstallCompressedManpage", "version": "0", "line": "${PN}.1.xz", "lineno": 10, "func": "newman"}
+{"__class__": "InstallCompressedManpage", "category": "DoCompressedFilesCheck", "package": "InstallCompressedManpage", "version": "0", "line": "${PN}.xz", "lineno": 10, "func": "newman"}
diff --git a/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/InstallCompressedInfo-0.ebuild b/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/InstallCompressedInfo-0.ebuild
new file mode 100644
index 00000000..d82c952a
--- /dev/null
+++ b/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedInfo/InstallCompressedInfo-0.ebuild
@@ -0,0 +1,11 @@
+EAPI=7
+
+DESCRIPTION="Ebuild installing compressed info"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+SLOT="0"
+LICENSE="BSD"
+
+src_install() {
+ doinfo 'test.gz' "${PN}.bz2"
+ doinfo "${PN}"
+}
diff --git a/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/InstallCompressedManpage-0.ebuild b/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/InstallCompressedManpage-0.ebuild
new file mode 100644
index 00000000..7248d16a
--- /dev/null
+++ b/testdata/repos/standalone/DoCompressedFilesCheck/InstallCompressedManpage/InstallCompressedManpage-0.ebuild
@@ -0,0 +1,12 @@
+EAPI=7
+
+DESCRIPTION="Ebuild installing compressed man pages"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+SLOT="0"
+LICENSE="BSD"
+
+src_install() {
+ doman 'test.gz' "${PN}.2.bz2"
+ newman ${PN}.xz "${PN}.1.xz"
+ doman "${PN}"
+}