diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2014-12-25 21:51:00 +0100 |
---|---|---|
committer | Luca Bruno <lucabru@src.gnome.org> | 2014-12-25 21:51:00 +0100 |
commit | b3f2ac42f67364b117ff663322f85d4004d49663 (patch) | |
tree | 98ac81278a41738e7fcacd178231dcad72ad1762 | |
parent | 71b29db40f62c25622d9e23c0e9db91a4710fe32 (diff) | |
download | vala-wip/x-version.tar.gz |
Always check unused attrs. Add [Version] to known attrswip/x-version
-rw-r--r-- | compiler/valacompiler.vala | 2 | ||||
-rw-r--r-- | vala/valacodecontext.vala | 6 | ||||
-rw-r--r-- | vala/valausedattr.vala | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index 3c008d30c..ddcb75743 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -460,8 +460,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 (); } diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index a08db1eb1..b3f331bf8 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -490,6 +490,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) { diff --git a/vala/valausedattr.vala b/vala/valausedattr.vala index 04067e103..588aaf7f8 100644 --- a/vala/valausedattr.vala +++ b/vala/valausedattr.vala @@ -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", "" }; |