From a85087a01f3c5439fa69978e3a042cd2f69f2fac Mon Sep 17 00:00:00 2001 From: Ahto Truu Date: Sat, 18 Feb 2023 00:13:29 +0200 Subject: [PATCH] Add '-W no-all' command-line option to silence all warnings. --- latexrun | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100755 => 100644 latexrun diff --git a/latexrun b/latexrun old mode 100755 new mode 100644 index b669d9f..50b16a5 --- a/latexrun +++ b/latexrun @@ -1064,7 +1064,11 @@ class LaTeXFilter: self.__pageno = 1 self.__restart_pageno = 1 - self.__suppress = {cls: 0 for cls in nowarns} + self.__suppress_all = "all" in nowarns + if self.__suppress_all: + self.__suppress = {} + else: + self.__suppress = {cls: 0 for cls in nowarns} def feed(self, data, eof=False): """Feed LaTeX log data to the parser. @@ -1131,6 +1135,8 @@ class LaTeXFilter: self.__restart_pageno = self.__pageno def __message(self, typ, lineno, msg, cls=None, filename=None): + if self.__suppress_all and cls is not None and cls not in self.__suppress: + self.__suppress[cls] = 0 if cls is not None and cls in self.__suppress: self.__suppress[cls] += 1 return