@@ -58,7 +58,8 @@ def msgcheck_parser():
5858Argument "@file.txt" can be used to read default options in a file.
5959
6060The script returns:
61- 0: all files checked are OK (or --extract/--only-misspelled given)
61+ 0: all files checked are OK (or one of these options given:
62+ --extract, --only-misspelled or --ignore-errors given)
6263 n: number of files with errors (1 ≤ n ≤ 255)
6364''' )
6465 parser .add_argument ('-c' , '--no-compile' , action = 'store_true' ,
@@ -93,6 +94,8 @@ def msgcheck_parser():
9394 help = 'display all translations and exit '
9495 '(all checks except compilation are disabled in '
9596 'this mode)' )
97+ parser .add_argument ('-i' , '--ignore-errors' , action = 'store_true' ,
98+ help = 'display but ignore errors (always return 0)' )
9699 parser .add_argument ('-q' , '--quiet' , action = 'store_true' ,
97100 help = 'quiet mode: only display number of errors' )
98101 parser .add_argument ('-v' , '--version' , action = 'version' ,
@@ -195,7 +198,7 @@ def main(): # pylint: disable=too-many-branches
195198 args = msgcheck_args (msgcheck_parser ())
196199 result = msgcheck_check_files (args )
197200 files_with_errors = msgcheck_display_result (args , result )
198- sys .exit (min (files_with_errors , 255 ))
201+ sys .exit (0 if args . ignore_errors else min (files_with_errors , 255 ))
199202
200203
201204if __name__ == "__main__" :
0 commit comments