Skip to content

Commit c81bc6c

Browse files
committed
EmptyDirsCheck: mark results' level as error
This check is done at repo level, so if you are inside a package dir, it will be skipped. As a solution, mark those results as errors, so the bot will fail to regen metadata and we can notice the issue. Resolves: #499 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 64be438 commit c81bc6c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pkgcheck/checks/repo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def finish(self):
5050
yield BinaryFile(rel_path)
5151

5252

53-
class EmptyCategoryDir(results.CategoryResult, results.Warning):
53+
class EmptyCategoryDir(results.CategoryResult, results.Error):
5454
"""Empty category directory in the repository."""
5555

5656
scope = base.repo_scope
@@ -60,7 +60,7 @@ def desc(self):
6060
return f"empty category directory: {self.category}"
6161

6262

63-
class EmptyPackageDir(results.PackageResult, results.Warning):
63+
class EmptyPackageDir(results.PackageResult, results.Error):
6464
"""Empty package directory in the repository."""
6565

6666
scope = base.repo_scope
@@ -74,7 +74,7 @@ class EmptyDirsCheck(GentooRepoCheck, RepoCheck):
7474
"""Scan for empty category or package directories."""
7575

7676
_source = (sources.EmptySource, (base.repo_scope,))
77-
known_results = frozenset([EmptyCategoryDir, EmptyPackageDir])
77+
known_results = frozenset({EmptyCategoryDir, EmptyPackageDir})
7878

7979
def __init__(self, *args):
8080
super().__init__(*args)

0 commit comments

Comments
 (0)