Skip to content

Commit

Permalink
MissingEAPIBlankLine: new check for missing blank after EAPI
Browse files Browse the repository at this point in the history
Resolves: #570
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
  • Loading branch information
arthurzam committed Apr 21, 2023
1 parent 7ca3a4b commit 2f5ceb7
Show file tree
Hide file tree
Showing 54 changed files with 110 additions and 53 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires = [
"pathspec",
"tree-sitter>=0.19.0",
"snakeoil~=0.10.4",
"pkgcore~=0.12.20",
"pkgcore~=0.12.21",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -41,7 +41,7 @@ dependencies = [
"pathspec",
"tree-sitter>=0.19.0",
"snakeoil~=0.10.4",
"pkgcore~=0.12.18",
"pkgcore~=0.12.21",
]

[project.optional-dependencies]
Expand Down
17 changes: 15 additions & 2 deletions src/pkgcheck/checks/whitespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ def desc(self):
)


class MissingEAPIBlankLine(results.VersionResult, results.Style):
"""Missing blank line after ``EAPI=`` assignment."""

desc = "missing blank line after EAPI= assignment"


class WhitespaceData(NamedTuple):
"""Data format to register hardcoded list of bad whitespace characters."""

Expand Down Expand Up @@ -118,14 +124,15 @@ class WhitespaceCheck(Check):

_source = sources.EbuildFileRepoSource
known_results = frozenset(
[
{
WhitespaceFound,
WrongIndentFound,
DoubleEmptyLine,
TrailingEmptyLine,
NoFinalNewline,
BadWhitespaceCharacter,
]
MissingEAPIBlankLine,
}
)

_indent_regex = re.compile("^\t* \t+")
Expand All @@ -141,8 +148,14 @@ def feed(self, pkg):
leading = []
indent = []
double_empty = []
eapi_lineno = None

for lineno, line in enumerate(pkg.lines, 1):
if line.startswith("EAPI="):
eapi_lineno = lineno
elif eapi_lineno is not None and lineno == eapi_lineno + 1 and line != "\n":
yield MissingEAPIBlankLine(pkg=pkg)

for match in self.bad_whitespace_regex.finditer(line):
yield BadWhitespaceCharacter(
repr(match.group("char")),
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 8, "command": "dohtml", "eapi": "7"}
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 9, "command": "dohtml", "eapi": "7"}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff -Naur standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-0.ebuild fixed/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-0.ebuild
--- standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-0.ebuild 2019-10-01 15:48:21.121467232 -0600
+++ fixed/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-0.ebuild 2019-10-01 15:50:51.970090195 -0600
@@ -5,5 +5,6 @@
@@ -6,5 +6,6 @@
LICENSE="BSD"

src_install() {
- dohtml doc/*
+ docinto html
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__class__": "DeprecatedEapiCommand", "category": "BadCommandsCheck", "package": "DeprecatedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 8, "command": "dohtml", "eapi": "6"}
{"__class__": "DeprecatedEapiCommand", "category": "BadCommandsCheck", "package": "DeprecatedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 9, "command": "dohtml", "eapi": "6"}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff -Naur standalone/BadCommandsCheck/DeprecatedEapiCommand/DeprecatedEapiCommand-0.ebuild fixed/BadCommandsCheck/DeprecatedEapiCommand/DeprecatedEapiCommand-0.ebuild
--- standalone/BadCommandsCheck/DeprecatedEapiCommand/DeprecatedEapiCommand-0.ebuild 2019-10-01 15:50:01.517881845 -0600
+++ fixed/BadCommandsCheck/DeprecatedEapiCommand/DeprecatedEapiCommand-0.ebuild 2019-10-01 15:51:40.877292175 -0600
@@ -5,5 +5,6 @@
@@ -6,5 +6,6 @@
LICENSE="BSD"

src_install() {
- dohtml doc/*
+ docinto html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
diff -Naur standalone/EapiCheck/BannedEapi/BannedEapi-0.ebuild fixed/EapiCheck/BannedEapi/BannedEapi-0.ebuild
--- standalone/EapiCheck/BannedEapi/BannedEapi-0.ebuild 2019-09-15 03:05:12.832870282 -0600
+++ fixed/EapiCheck/BannedEapi/BannedEapi-0.ebuild 2019-09-15 03:11:08.602303656 -0600
@@ -1,4 +1,4 @@
@@ -1,5 +1,5 @@
-EAPI=1
+EAPI=7

DESCRIPTION="Ebuild using banned EAPI"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
diff -Naur standalone/EapiCheck/DeprecatedEapi/DeprecatedEapi-0.ebuild fixed/EapiCheck/DeprecatedEapi/DeprecatedEapi-0.ebuild
--- standalone/EapiCheck/DeprecatedEapi/DeprecatedEapi-0.ebuild 2019-09-15 03:08:00.380545715 -0600
+++ fixed/EapiCheck/DeprecatedEapi/DeprecatedEapi-0.ebuild 2019-09-15 03:11:41.260435170 -0600
@@ -1,4 +1,4 @@
@@ -1,5 +1,5 @@
-EAPI=5
+EAPI=7

DESCRIPTION="Ebuild using deprecated EAPI"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "FILESDIR", "lines": [9, 19]}
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "T", "lines": [25, 27, 41, 42]}
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "WORKDIR", "lines": [34]}
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "FILESDIR", "lines": [10, 20]}
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "T", "lines": [26, 28, 42, 43]}
{"__class__": "EbuildUnquotedVariable", "category": "EbuildUnquotedVariablesCheck", "package": "EbuildUnquotedVariable", "version": "0", "variable": "WORKDIR", "lines": [35]}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- standalone/EbuildUnquotedVariablesCheck/EbuildUnquotedVariable/EbuildUnquotedVariable-0.ebuild 2022-05-18 20:27:34.657647175 +0200
+++ fixed/EbuildUnquotedVariablesCheck/EbuildUnquotedVariable/EbuildUnquotedVariable-0.ebuild 2022-05-18 20:50:00.271294657 +0200
@@ -6,7 +6,7 @@
@@ -7,7 +7,7 @@
S=${WORKDIR}/${PV} # ok

PATCHES=(
Expand All @@ -9,7 +9,7 @@
"${FILESDIR}"/foo.patch # ok
"${FILESDIR}/foo.patch" # ok
)
@@ -16,28 +16,28 @@
@@ -17,28 +17,28 @@
:
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "0", "line": "insinto /etc/init.d", "lineno": 11, "cmd": "doinitd or newinitd"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "0", "line": "insinto /etc/pam.d", "lineno": 13, "cmd": "dopamd or newpamd from pam.eclass"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "0", "line": "insinto /usr/share/applications", "lineno": 15, "cmd": "domenu or newmenu from desktop.eclass"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}", "lineno": 8, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/\"${PF}\"", "lineno": 10, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}", "lineno": 12, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}/examples", "lineno": 14, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/\"${PF}\"/examples", "lineno": 16, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}", "lineno": 9, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/\"${PF}\"", "lineno": 11, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}", "lineno": 13, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/${PF}/examples", "lineno": 15, "cmd": "docinto/dodoc"}
{"__class__": "DeprecatedInsinto", "category": "InsintoCheck", "package": "DeprecatedInsinto", "version": "1", "line": "insinto /usr/share/doc/\"${PF}\"/examples", "lineno": 17, "cmd": "docinto/dodoc"}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ diff -Naur standalone/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-0.ebuild
+++ fixed/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-0.ebuild 2020-01-21 13:28:02.414341321 -0700
@@ -4,14 +4,9 @@
LICENSE="BSD"

src_install() {
- insinto /etc/conf.d
- doins foo
Expand All @@ -24,9 +24,9 @@ diff -Naur standalone/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-0.ebuild
diff -Naur standalone/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-1.ebuild fixed/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-1.ebuild
--- standalone/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-1.ebuild 2020-01-21 13:20:18.815286720 -0700
+++ fixed/InsintoCheck/DeprecatedInsinto/DeprecatedInsinto-1.ebuild 2020-01-21 13:26:43.359992323 -0700
@@ -5,14 +5,11 @@
@@ -6,14 +6,11 @@
LICENSE="BSD"

src_install() {
- insinto /usr/share/doc/${PF}
- doins foo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ diff -Naur standalone/IuseCheck/InvalidUseFlags/InvalidUseFlags-0.ebuild fixed/I
diff -Naur standalone/IuseCheck/InvalidUseFlags/InvalidUseFlags-4.ebuild fixed/IuseCheck/InvalidUseFlags/InvalidUseFlags-4.ebuild
--- standalone/IuseCheck/InvalidUseFlags/InvalidUseFlags-4.ebuild 2021-05-24 04:15:45.921607273 -0600
+++ fixed/IuseCheck/InvalidUseFlags/InvalidUseFlags-4.ebuild 2021-05-24 04:26:36.519704480 -0600
@@ -3,4 +3,4 @@
@@ -4,4 +4,4 @@
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
LICENSE="BSD"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ diff -Naur standalone/IuseCheck/UnknownUseFlags/metadata.xml fixed/IuseCheck/Unk
diff -Naur standalone/IuseCheck/UnknownUseFlags/UnknownUseFlags-0.ebuild fixed/IuseCheck/UnknownUseFlags/UnknownUseFlags-0.ebuild
--- standalone/IuseCheck/UnknownUseFlags/UnknownUseFlags-0.ebuild 2021-05-24 04:16:22.701404227 -0600
+++ fixed/IuseCheck/UnknownUseFlags/UnknownUseFlags-0.ebuild 2021-05-24 04:22:44.096668337 -0600
@@ -3,4 +3,4 @@
@@ -4,4 +4,4 @@
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
LICENSE="BSD"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -Naur standalone/MissingSlotDepCheck/MissingSlotDep/MissingSlotDep-0.ebuild fixed/MissingSlotDepCheck/MissingSlotDep/MissingSlotDep-0.ebuild
--- standalone/MissingSlotDepCheck/MissingSlotDep/MissingSlotDep-0.ebuild 2019-11-28 01:46:30.606468149 -0700
+++ fixed/MissingSlotDepCheck/MissingSlotDep/MissingSlotDep-0.ebuild 2019-11-28 01:50:03.520400413 -0700
@@ -3,5 +3,5 @@
@@ -4,5 +4,5 @@
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
LICENSE="BSD"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__class__": "ReadonlyVariable", "category": "ReadonlyVariableCheck", "package": "ReadonlyVariable", "version": "0", "line": "PV=\"5\"", "lineno": 2, "variable": "PV"}
{"__class__": "ReadonlyVariable", "category": "ReadonlyVariableCheck", "package": "ReadonlyVariable", "version": "0", "line": "PV=\"5\"", "lineno": 3, "variable": "PV"}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
diff -Naur standalone/ReadonlyVariableCheck/ReadonlyVariable/ReadonlyVariable-0.ebuild fixed/ReadonlyVariableCheck/ReadonlyVariable/ReadonlyVariable-0.ebuild
--- standalone/ReadonlyVariableCheck/ReadonlyVariable/ReadonlyVariable-0.ebuild 2021-03-17 00:53:28.492690175 -0600
+++ fixed/ReadonlyVariableCheck/ReadonlyVariable/ReadonlyVariable-0.ebuild 2021-03-17 00:56:13.093297393 -0600
@@ -1,5 +1,4 @@
@@ -1,6 +1,5 @@
EAPI=7

-PV="5"
DESCRIPTION="Ebuild that assigns read-only variable in global scope"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/bar", "lineno": 9, "cmd": "insinto"}
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/bin", "lineno": 19, "cmd": "exeinto"}
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/doc", "lineno": 24, "cmd": "docinto"}
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/bar", "lineno": 10, "cmd": "insinto"}
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/bin", "lineno": 20, "cmd": "exeinto"}
{"__class__": "RedundantDodir", "category": "RedundantDodirCheck", "package": "RedundantDodir", "version": "0", "line": "dodir /foo/doc", "lineno": 25, "cmd": "docinto"}
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
diff -Naur standalone/RedundantDodirCheck/RedundantDodir/RedundantDodir-0.ebuild fixed/RedundantDodirCheck/RedundantDodir/RedundantDodir-0.ebuild
--- standalone/RedundantDodirCheck/RedundantDodir/RedundantDodir-0.ebuild 2020-01-25 20:21:40.686366299 -0700
+++ fixed/RedundantDodirCheck/RedundantDodir/RedundantDodir-0.ebuild 2020-01-25 20:23:11.888699916 -0700
@@ -6,7 +6,6 @@
@@ -7,7 +7,6 @@

src_install() {
touch blah
- dodir /foo/bar
insinto /foo/bar
doins blah
@@ -16,12 +15,10 @@

@@ -17,12 +16,10 @@
doins blah

touch blaz
- dodir /foo/bin
exeinto /foo/bin
doexe blaz

touch blob
- dodir /foo/doc
docinto /foo/doc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -Naur standalone/RequiredUseCheck/RequiredUseDefaults/RequiredUseDefaults-0.ebuild fixed/RequiredUseCheck/RequiredUseDefaults/RequiredUseDefaults-0.ebuild
--- standalone/RequiredUseCheck/RequiredUseDefaults/RequiredUseDefaults-0.ebuild 2019-11-23 13:59:36.895606367 -0700
+++ fixed/RequiredUseCheck/RequiredUseDefaults/RequiredUseDefaults-0.ebuild 2019-11-23 14:00:49.199924482 -0700
@@ -4,5 +4,5 @@
@@ -5,5 +5,5 @@
SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -Naur standalone/RequiredUseCheck/UnstatedIuse/UnstatedIuse-0.ebuild fixed/RequiredUseCheck/UnstatedIuse/UnstatedIuse-0.ebuild
--- standalone/RequiredUseCheck/UnstatedIuse/UnstatedIuse-0.ebuild 2019-11-23 13:50:52.531217164 -0700
+++ fixed/RequiredUseCheck/UnstatedIuse/UnstatedIuse-0.ebuild 2019-11-23 13:51:47.992485035 -0700
@@ -3,5 +3,5 @@
@@ -4,5 +4,5 @@
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
LICENSE="BSD"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
diff -Naur standalone/SrcUriCheck/RedundantUriRename/RedundantUriRename-0.ebuild fixed/SrcUriCheck/RedundantUriRename/RedundantUriRename-0.ebuild
--- standalone/SrcUriCheck/RedundantUriRename/RedundantUriRename-0.ebuild 2020-01-13 19:03:24.208241614 -0700
+++ fixed/SrcUriCheck/RedundantUriRename/RedundantUriRename-0.ebuild 2020-01-13 19:07:15.539341286 -0700
@@ -1,6 +1,6 @@
@@ -1,7 +1,7 @@
EAPI=7

DESCRIPTION="Ebuild with reundant rename in SRC_URI"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
-SRC_URI="https://github.com/pkgcore/pkgcheck/${P}.tar.gz -> ${P}.tar.gz"
Expand All @@ -12,8 +13,9 @@ diff -Naur standalone/SrcUriCheck/RedundantUriRename/RedundantUriRename-0.ebuild
diff -Naur standalone/SrcUriCheck/RedundantUriRename/RedundantUriRename-1.ebuild fixed/SrcUriCheck/RedundantUriRename/RedundantUriRename-1.ebuild
--- standalone/SrcUriCheck/RedundantUriRename/RedundantUriRename-1.ebuild 2020-01-13 19:05:11.310754211 -0700
+++ fixed/SrcUriCheck/RedundantUriRename/RedundantUriRename-1.ebuild 2020-01-13 19:07:22.031371966 -0700
@@ -1,6 +1,6 @@
@@ -1,7 +1,7 @@
EAPI=7

DESCRIPTION="Ebuild with reundant rename in SRC_URI"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
-SRC_URI="mirror://used/pkgcore/pkgcheck/${P}.tar.gz -> ${P}.tar.gz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ diff -Naur standalone/SrcUriCheck/TarballAvailable/Manifest fixed/SrcUriCheck/Ta
diff -Naur standalone/SrcUriCheck/TarballAvailable/TarballAvailable-0.ebuild fixed/SrcUriCheck/TarballAvailable/TarballAvailable-0.ebuild
--- standalone/SrcUriCheck/TarballAvailable/TarballAvailable-0.ebuild 2019-08-23 17:07:52.527170936 -0600
+++ fixed/SrcUriCheck/TarballAvailable/TarballAvailable-0.ebuild 2019-08-23 17:16:30.793240821 -0600
@@ -2,9 +2,8 @@
@@ -3,9 +3,8 @@
DESCRIPTION="Ebuild with SRC_URI using .zip archive when .tar* is available"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SRC_URI="
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__class__": "EbuildVariableScope", "category": "VariableScopeCheck", "package": "EbuildVariableScope", "version": "0", "variable": "EROOT", "func": "src_configure", "lines": [9]}
{"__class__": "EbuildVariableScope", "category": "VariableScopeCheck", "package": "EbuildVariableScope", "version": "0", "variable": "EROOT", "func": "src_configure", "lines": [10]}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff -Naur standalone/VariableScopeCheck/EbuildVariableScope/EbuildVariableScope-0.ebuild fixed/VariableScopeCheck/EbuildVariableScope/EbuildVariableScope-0.ebuild
--- standalone/VariableScopeCheck/EbuildVariableScope/EbuildVariableScope-0.ebuild 2021-03-17 01:20:05.423678951 -0600
+++ fixed/VariableScopeCheck/EbuildVariableScope/EbuildVariableScope-0.ebuild 2021-03-17 01:21:57.421132212 -0600
@@ -6,7 +6,7 @@
@@ -7,7 +7,7 @@

src_configure() {
# EROOT isn't allowed in src_* phases
- econf --sysconfdir="${EROOT}/etc/${PN}"
+ econf --sysconfdir="${EPREFIX}/etc/${PN}"
}

pkg_postinst() {
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "\"\\t# bad chars aren't ignored\\xa0in comments\\n\"", "lineno": 8, "char": "'\\xa0'", "position": 28}
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "'\\tcd \"${S}\"/cpp ||\\xa0die # or\\xa0inline comments\\n'", "lineno": 9, "char": "'\\xa0'", "position": 18}
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "'\\tcd \"${S}\"/cpp ||\\xa0die # or\\xa0inline comments\\n'", "lineno": 9, "char": "'\\xa0'", "position": 27}
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "\"\\t# bad chars aren't ignored\\xa0in comments\\n\"", "lineno": 9, "char": "'\\xa0'", "position": 28}
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "'\\tcd \"${S}\"/cpp ||\\xa0die # or\\xa0inline comments\\n'", "lineno": 10, "char": "'\\xa0'", "position": 18}
{"__class__": "BadWhitespaceCharacter", "category": "WhitespaceCheck", "package": "BadWhitespaceCharacter", "version": "0", "line": "'\\tcd \"${S}\"/cpp ||\\xa0die # or\\xa0inline comments\\n'", "lineno": 10, "char": "'\\xa0'", "position": 27}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff -Naur standalone/WhitespaceCheck/BadWhitespaceCharacter/BadWhitespaceCharacter-0.ebuild fixed/WhitespaceCheck/BadWhitespaceCharacter/BadWhitespaceCharacter-0.ebuild
--- standalone/WhitespaceCheck/BadWhitespaceCharacter/BadWhitespaceCharacter-0.ebuild 2019-12-03 14:20:02.089699996 -0700
+++ fixed/WhitespaceCheck/BadWhitespaceCharacter/BadWhitespaceCharacter-0.ebuild 2019-12-03 14:24:43.960923352 -0700
@@ -5,7 +5,7 @@
@@ -6,7 +6,7 @@
LICENSE="BSD"

src_test() {
- # bad chars aren't ignored in comments
- cd "${S}"/cpp || die # or inline comments
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"__class__": "MissingEAPIBlankLine", "category": "WhitespaceCheck", "package": "MissingEAPIBlankLine", "version": "0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff -Naur standalone/WhitespaceCheck/MissingEAPIBlankLine/MissingEAPIBlankLine-0.ebuild fixed/WhitespaceCheck/MissingEAPIBlankLine/MissingEAPIBlankLine-0.ebuild
--- standalone/WhitespaceCheck/MissingEAPIBlankLine/MissingEAPIBlankLine-0.ebuild
+++ fixed/WhitespaceCheck/MissingEAPIBlankLine/MissingEAPIBlankLine-0.ebuild
@@ -1,4 +1,5 @@
EAPI=7
+
DESCRIPTION="Ebuild is missing blank line after EAPI"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
EAPI=7

DESCRIPTION="Ebuild using banned EAPI command"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
SLOT="0"
Expand Down
Loading

0 comments on commit 2f5ceb7

Please sign in to comment.