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
--- 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 '