Univention Bugzilla – Bug 22480
Vereinheitlichen der Fehlerposition: +Zeilennummer
Last modified: 2023-03-25 06:47:11 CET
--- ucslint/base.py (Revision 24046) +++ ucslint/base.py (Revision 24044) @@ -31,9 +31,9 @@ s = '' if self.filename: s = '%s' % self.filename - if self.line != None: + if self.line is not None: s += ':%s' % self.line - if self.pos != None: + if self.pos is not None: s += ':%s' % self.pos return '%s: %s: %s' % (self.id, s, self.msg) return '%s: %s' % (self.id, self.msg) @@ -47,8 +47,8 @@ self.msg = [] self.debuglevel = 0 - def addmsg(self, msgid, msg=None, filename=None): - self.msg.append( UPCMessage( msgid, msg=msg, filename=filename ) ) + def addmsg(self, msgid, msg=None, filename=None, line=None, pos=None): + self.msg.append( UPCMessage( msgid, msg=msg, filename=filename, line=line, pos=None ) ) def getMsgIds(self): return {} --- ucslint/0011-Control.py (Revision 24046) +++ ucslint/0011-Control.py (Revision 24044) @@ -4,7 +4,8 @@ import univention.ucslint.base as uub except: import ucslint.base as uub -import re, os +import re +import os class UniventionPackageCheck(uub.UniventionPackageCheckBase): def __init__(self): @@ -16,7 +17,7 @@ '0011-2': [ uub.RESULT_ERROR, 'source package name differs in debian/control an debian/changelog' ], '0011-3': [ uub.RESULT_WARN, 'wrong section - should be "Univention"' ], '0011-4': [ uub.RESULT_WARN, 'wrong priority - should be "optional"' ], - '0011-5': [ uub.RESULT_ERROR, 'wrong maintainer - should be "univention GmbH <packages@univention.de>"' ], + '0011-5': [ uub.RESULT_ERROR, 'wrong maintainer - should be "Univention GmbH <packages@univention.de>"' ], '0011-6': [ uub.RESULT_ERROR, 'XS-Python-Version without python-central in build-dependencies' ], '0011-7': [ uub.RESULT_ERROR, 'XS-Python-Version without XB-Python-Version in binary package entries' ], '0011-8': [ uub.RESULT_WARN, 'XS-Python-Version should be "2.4"' ], @@ -42,14 +43,14 @@ try: content_changelog = open(fn, 'r').read(1024) except: - self.addmsg( '0011-1', 'failed to open and read file %s' % fn ) + self.addmsg( '0011-1', 'failed to open and read file', fn ) return fn = os.path.join(path, 'debian', 'control') try: parser = uub.ParserDebianControl(fn) except uub.FailedToReadFile: - self.addmsg( '0011-1', 'failed to open and read file %s' % fn ) + self.addmsg( '0011-1', 'failed to open and read file', fn ) return except uub.UCSLintException: self.addmsg( '0011-11', 'parsing error in %s' % fn ) --- testframework/0008-4.correct (Revision 24046) +++ testframework/0008-4.correct (Revision 24044) @@ -1 +1 @@ -W:0008-4: testframework/0008-4/src/de.po contains empty msgstr in line 120 +W:0008-4: testframework/0008-4/src/de.po:120: contains empty msgstr --- testframework/0008-5-6.correct (Revision 24046) +++ testframework/0008-5-6.correct (Revision 24044) @@ -1,2 +1,2 @@ -E:0008-5: cannot find charset definition in testframework/0008-5-6/src/de.po -E:0008-6: invalid charset (CHARSET) defined in testframework/0008-5-6/src/fr.po +E:0008-5: testframework/0008-5-6/src/de.po: cannot find charset definition +E:0008-6: testframework/0008-5-6/src/fr.po: invalid charset (CHARSET) defined
Das wurde im Rahmen von Bug 22475 umgesetzt. *** This bug has been marked as a duplicate of bug 22475 ***
QA: OK → VERIFIED