summaryrefslogtreecommitdiff
path: root/parabola_repolint/linter_checks/package_not_in_repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'parabola_repolint/linter_checks/package_not_in_repo.py')
-rw-r--r--parabola_repolint/linter_checks/package_not_in_repo.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/parabola_repolint/linter_checks/package_not_in_repo.py b/parabola_repolint/linter_checks/package_not_in_repo.py
new file mode 100644
index 0000000..835f145
--- /dev/null
+++ b/parabola_repolint/linter_checks/package_not_in_repo.py
@@ -0,0 +1,24 @@
+'''
+this is a linter check for package files that are not in the repository
+'''
+
+from parabola_repolint.linter import LinterIssue, LinterCheckBase, LinterCheckType
+from parabola_repolint.config import CONFIG
+
+
+class PackageNotInRepo(LinterCheckBase):
+ ''' check for a package that is not in the repo.db '''
+
+ name = 'package_not_in_repo'
+ check_type = LinterCheckType.PACKAGE
+
+ def check(self, package):
+ ''' check if the package is part of the repo '''
+ pass
+
+ def format(self, issues):
+ ''' format the list of found issues '''
+ result = 'packages not listed in repo.db:'
+ for issue in issues:
+ result += '\n %s' % issue[0]
+ return result