Unverified Commit a2c7c548 authored by Maxim Belkin's avatar Maxim Belkin
Browse files

New 'permissive' flag for lesson-check

parent 51a86ac1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -118,8 +118,8 @@ def main():
        checker.check()

    args.reporter.report()
    if args.reporter.messages:
        raise SystemExit(1)
    if args.reporter.messages and not args.permissive:
        exit(1)


def parse_args():
@@ -148,6 +148,11 @@ def parse_args():
                      action="store_true",
                      dest='trailing_whitespace',
                      help='Check for trailing whitespace')
    parser.add_option('--permissive',
                      default=False,
                      action="store_true",
                      dest='permissive',
                      help='Do not raise an error even if issues are detected')

    args, extras = parser.parse_args()
    require(args.parser is not None,