On 5/11/2026 3:38 PM, Andrew Pinski wrote:
I noticed while reviewing a patch check_GNU_style.py would fail for the .opt files in a few ways. First greater than 80 columns is expected. Second is the space after the "function". Both of these are not useful for .opt so let's ignore then here. contrib/ChangeLog: * check_GNU_style_lib.py (LineLengthCheck.check): Ignore filenames that end with .opt. (FunctionParenthesisCheck.check): Likewise. Signed-off-by: Andrew Pinski <[email protected]> --- contrib/check_GNU_style_lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py index bcfe459b4df..2087bbef977 100755 --- a/contrib/check_GNU_style_lib.py +++ b/contrib/check_GNU_style_lib.py @@ -82,7 +82,7 @@ class LineLengthCheck:def check(self, filename, lineno, line):line_expanded = line.replace('\t', self.expanded_tab) - if len(line_expanded) > self.limit: + if not filename.endswith(".opt") and len(line_expanded) > self.limit: return CheckError(filename, lineno, line_expanded[:self.limit] + error_string(line_expanded[self.limit:]), @@ -167,6 +167,9 @@ class FunctionParenthesisCheck: self.re = re.compile(r'\w(\s{2,})?(\()')def check(self, filename, lineno, line):+ if filename.endswith(".opt"): + return None + if '#define' in line: return None
OK with the indention issue Sam pointed out fixed. jeff
