From 10be730ba997a6d1511cd02939c248bf73b10283 Mon Sep 17 00:00:00 2001 From: Boris Zanin Date: Tue, 7 Jan 2020 15:59:35 +0100 Subject: [PATCH] Report Windows EOLs as a failure under Windows Make Python 3 to validate line endings under Windows. We should specify additional parameter to make Python to keep line endings for the script to analyze. Components: vulkan VK-GL-CTS issue: 1665 Change-Id: Ifde3ffb95009d7e0e7c09edced1bf7ef3779db74 --- scripts/src_util/check_whitespace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src_util/check_whitespace.py b/scripts/src_util/check_whitespace.py index b37c128..aca7379 100644 --- a/scripts/src_util/check_whitespace.py +++ b/scripts/src_util/check_whitespace.py @@ -28,7 +28,7 @@ def checkFileWhitespace (file): if (sys.version_info < (3, 0)): f = open(file, 'rt') else: - f = open(file, 'rt', encoding="ascii", errors='replace') + f = open(file, 'rt', encoding="ascii", errors='replace', newline='') error = False for lineNum, line in enumerate(f): if line.endswith(" \n") or line.endswith("\t\n"): -- 2.7.4