]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Always check unused attrs. Add [Version] to known attrs
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 25 Dec 2014 20:51:00 +0000 (21:51 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 30 Jan 2016 13:55:08 +0000 (14:55 +0100)
compiler/valacompiler.vala
vala/valacodecontext.vala
vala/valausedattr.vala

index ebae467aa07d47cc866d18dbe996d70181f2fb09..968689830c57fdcde60d81891abe3be3649afb80 100644 (file)
@@ -461,8 +461,6 @@ class Vala.Compiler {
                        context.write_dependencies (dependencies);
                }
 
-               context.used_attr.check_unused (context);
-
                if (context.report.get_errors () > 0 || (fatal_warnings && context.report.get_warnings () > 0)) {
                        return quit ();
                }
index 55add504100618f10795d974a9ba7cc8536b39b8..ddb9fdfb1ffd8784af11d676385c8052284c4879 100644 (file)
@@ -488,6 +488,12 @@ public class Vala.CodeContext {
                }
 
                flow_analyzer.analyze (this);
+
+               if (report.get_errors () > 0) {
+                       return;
+               }
+
+               used_attr.check_unused (this);
        }
 
        public void add_define (string define) {
index 04067e103e8b823ec3398e51cd4430cf2273961e..588aaf7f848ee388eae5599a24492a9fe4143a7f 100644 (file)
@@ -57,6 +57,7 @@ public class Vala.UsedAttr : CodeVisitor {
                "HasEmitter", "",
                "ReturnsModifiedPointer", "",
                "Deprecated", "since", "replacement", "",
+               "Version", "since", "replacement", "deprecated", "deprecated_since", "experimental", "",
                "Signal", "detailed", "run", "no_recurse", "action", "no_hooks", "",
                "Description", "nick", "blurb", "",
                
@@ -72,7 +73,7 @@ public class Vala.UsedAttr : CodeVisitor {
                "GtkCallback", "name", "",
 
                "DBus", "name", "no_reply", "result", "use_string_marshalling", "value", "signature", "visible", "",
-               
+
                "GIR", "name", ""
 
        };