-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MissingEAPIBlankLine: new check for missing blank after EAPI
Resolves: #570 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
- Loading branch information
Showing
54 changed files
with
110 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
4 changes: 2 additions & 2 deletions
4
testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/BadCommandsCheck/DeprecatedEapiCommand/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
4 changes: 2 additions & 2 deletions
4
testdata/data/repos/standalone/BadCommandsCheck/DeprecatedEapiCommand/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
3 changes: 2 additions & 1 deletion
3
testdata/data/repos/standalone/EapiCheck/DeprecatedEapi/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
6 changes: 3 additions & 3 deletions
6
...a/data/repos/standalone/EbuildUnquotedVariablesCheck/EbuildUnquotedVariable/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/MissingSlotDepCheck/MissingSlotDep/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/ReadonlyVariableCheck/ReadonlyVariable/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
3 changes: 2 additions & 1 deletion
3
testdata/data/repos/standalone/ReadonlyVariableCheck/ReadonlyVariable/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
testdata/data/repos/standalone/RedundantDodirCheck/RedundantDodir/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
12 changes: 6 additions & 6 deletions
12
testdata/data/repos/standalone/RedundantDodirCheck/RedundantDodir/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/RequiredUseCheck/RequiredUseDefaults/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/RequiredUseCheck/UnstatedIuse/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
testdata/data/repos/standalone/VariableScopeCheck/EbuildVariableScope/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]} |
6 changes: 3 additions & 3 deletions
6
testdata/data/repos/standalone/VariableScopeCheck/EbuildVariableScope/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { |
6 changes: 3 additions & 3 deletions
6
testdata/data/repos/standalone/WhitespaceCheck/BadWhitespaceCharacter/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
4 changes: 2 additions & 2 deletions
4
testdata/data/repos/standalone/WhitespaceCheck/BadWhitespaceCharacter/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
testdata/data/repos/standalone/WhitespaceCheck/MissingEAPIBlankLine/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"__class__": "MissingEAPIBlankLine", "category": "WhitespaceCheck", "package": "MissingEAPIBlankLine", "version": "0"} |
9 changes: 9 additions & 0 deletions
9
testdata/data/repos/standalone/WhitespaceCheck/MissingEAPIBlankLine/fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
1 change: 1 addition & 0 deletions
1
testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-0.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.