Show More
@@ -302,7 +302,7 b' def getblame(f):' | |||
|
302 | 302 | return lines |
|
303 | 303 | |
|
304 | 304 | def checkfile(f, logfunc=_defaultlogger.log, maxerr=None, warnings=False, |
|
305 | blame=False, debug=False): | |
|
305 | blame=False, debug=False, lineno=True): | |
|
306 | 306 | """checks style and portability of a given file |
|
307 | 307 | |
|
308 | 308 | :f: filepath |
@@ -385,7 +385,7 b' def checkfile(f, logfunc=_defaultlogger.' | |||
|
385 | 385 | bl, bu, br = blamecache[n] |
|
386 | 386 | if bl == l: |
|
387 | 387 | bd = '%s@%s' % (bu, br) |
|
388 | errors.append((f, n + 1, l, msg, bd)) | |
|
388 | errors.append((f, lineno and n + 1, l, msg, bd)) | |
|
389 | 389 | result = False |
|
390 | 390 | |
|
391 | 391 | errors.sort() |
@@ -408,8 +408,11 b' if __name__ == "__main__":' | |||
|
408 | 408 | help="use annotate to generate blame info") |
|
409 | 409 | parser.add_option("", "--debug", action="store_true", |
|
410 | 410 | help="show debug information") |
|
411 | parser.add_option("", "--nolineno", action="store_false", | |
|
412 | dest='lineno', help="don't show line numbers") | |
|
411 | 413 | |
|
412 |
parser.set_defaults(per_file=15, warnings=False, blame=False, debug=False |
|
|
414 | parser.set_defaults(per_file=15, warnings=False, blame=False, debug=False, | |
|
415 | lineno=True) | |
|
413 | 416 | (options, args) = parser.parse_args() |
|
414 | 417 | |
|
415 | 418 | if len(args) == 0: |
@@ -420,6 +423,7 b' if __name__ == "__main__":' | |||
|
420 | 423 | for f in check: |
|
421 | 424 | ret = 0 |
|
422 | 425 | if not checkfile(f, maxerr=options.per_file, warnings=options.warnings, |
|
423 |
blame=options.blame, debug=options.debug |
|
|
426 | blame=options.blame, debug=options.debug, | |
|
427 | lineno=options.lineno): | |
|
424 | 428 | ret = 1 |
|
425 | 429 | sys.exit(ret) |
General Comments 0
You need to be logged in to leave comments.
Login now