Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / frontend / glsl_validation.nit
index 692d918..f6f3760 100644 (file)
@@ -52,15 +52,13 @@ private class GLSLValidationPhase
                # Only applicable on strings
                if not nstring isa AStringFormExpr then
                        toolcontext.error(nstring.location,
-                               "Syntax error: only a string literal can be annotated as \"{annot_name}\".")
+                               "Syntax Error: only a string literal can be annotated as `{annot_name}`.")
                        return
                end
 
                # Do not double check if tool is in path
                var in_path = tool_is_in_path
-               if in_path != null then
-                       if not in_path then return
-               else
+               if in_path == null then
                        # Is _glslangValidator_ installed?
                        var proc_which = new ProcessReader("which", "glslangValidator")
                        proc_which.wait
@@ -68,16 +66,16 @@ private class GLSLValidationPhase
                        var status = proc_which.status
                        in_path = status == 0
                        tool_is_in_path = in_path
-                       if not in_path then
-                               toolcontext.warning(nat.location, "glslvalidator",
-                                       "Warning: program \"glslangValidator\" not in PATH, cannot validate this shader.")
-                               return
-                       end
+               end
+
+               if not in_path then
+                       toolcontext.advice(nat.location, "glslvalidator",
+                               "Warning: program `glslangValidator` not in PATH, cannot validate this shader.")
+                       return
                end
 
                # Get the shader source
                var shader = nstring.value
-               assert shader != null
 
                # Copy the shader to a file
                # TODO make it more portable