diff options
Diffstat (limited to 'repoman/lib/repoman/modules/linechecks/nested/nested.py')
-rw-r--r-- | repoman/lib/repoman/modules/linechecks/nested/nested.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/repoman/lib/repoman/modules/linechecks/nested/nested.py b/repoman/lib/repoman/modules/linechecks/nested/nested.py new file mode 100644 index 000000000..06b272772 --- /dev/null +++ b/repoman/lib/repoman/modules/linechecks/nested/nested.py @@ -0,0 +1,15 @@ + +import re + +from repoman.modules.linechecks.base import LineCheck + + +class EbuildNestedDie(LineCheck): + """Check ebuild for nested die statements (die statements in subshells)""" + + repoman_check_name = 'ebuild.nesteddie' + nesteddie_re = re.compile(r'^[^#]*\s\(\s[^)]*\bdie\b') + + def check(self, num, line): + if self.nesteddie_re.match(line): + return self.errors['NESTED_DIE_ERROR'] |