Bug 1255963 - Detect warnings without space after line number; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Fri, 11 Mar 2016 22:04:38 -0800
changeset 339663 4ef4c73d0e98a2626751f70b1447d36d1794629e
parent 339537 946ed22cad04431c75ab5093989dfedf1bae5a3e
child 516040 1c7dc12b6f5eeeb03a6e68b5914490bdde3523c8
push id12789
push usergszorc@mozilla.com
push dateSat, 12 Mar 2016 06:09:13 +0000
reviewersglandium
bugs1255963
milestone48.0a1
Bug 1255963 - Detect warnings without space after line number; r?glandium I'm not sure when this changed, but at least Visual Studio 2015 doesn't always emit a space between the line number and the ": warning" text in cl.exe output. Making the space optional in the regular expression enables one a VS2015 build to capture 375 warnings instead of 17. We still fail to capture some warnings (notably generic warnings about bad command arguments and linker warnings). But that can be dealt with later. MozReview-Commit-ID: q402CxTrQK
python/mozbuild/mozbuild/compilation/warnings.py
--- a/python/mozbuild/mozbuild/compilation/warnings.py
+++ b/python/mozbuild/mozbuild/compilation/warnings.py
@@ -32,17 +32,17 @@ RE_CLANG_WARNING = re.compile(r"""
     (?P<message>.+)
     \[(?P<flag>[^\]]+)
     """, re.X)
 
 # This captures Visual Studio's warning format.
 RE_MSVC_WARNING = re.compile(r"""
     (?P<file>.*)
     \((?P<line>\d+)\)
-    \s:\swarning\s
+    \s?:\swarning\s
     (?P<flag>[^:]+)
     :\s
     (?P<message>.*)
     """, re.X)
 
 IN_FILE_INCLUDED_FROM = 'In file included from '