From 6a1a56ab57ed29d31c9550d9725e60e2fb67ac6c Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 9 Jan 2018 15:36:30 +0000 Subject: Report warning/error locations in a format IDEs may already know how to parse Examples: meson.build:2:0: ERROR: Dependency is both required and not-found meson.build:4: WARNING: Keyword argument "link_with" defined multiple times. These are already matched by the default compilation-error-regexp-alist in emacs. Also: Don't start 'red' markup until after the \n before an error Unabsorb full-stop at end of warning with location from mlog.warning() Update warning_location test --- mesonbuild/interpreter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/interpreter.py') diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index b5ced9b..a33e847 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1583,7 +1583,7 @@ class Interpreter(InterpreterBase): modname = args[0] if modname.startswith('unstable-'): plainname = modname.split('-', 1)[1] - mlog.warning('Module %s has no backwards or forwards compatibility and might not exist in future releases' % modname, location=node) + mlog.warning('Module %s has no backwards or forwards compatibility and might not exist in future releases.' % modname, location=node) modname = 'unstable_' + plainname if modname not in self.environment.coredata.modules: try: @@ -2756,7 +2756,7 @@ root and issuing %s. var_list = ", ".join(map(repr, sorted(missing_variables))) mlog.warning( "The variable(s) %s in the input file %s are not " - "present in the given configuration data" % ( + "present in the given configuration data." % ( var_list, inputfile), location=node) else: mesonlib.dump_conf_header(ofile_abs, conf.held_object) -- cgit v1.1