summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-12-03 12:39:23 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-12-03 12:46:10 +0100
commit44af0246c480b9421f391dd71376298b43a99e2a (patch)
tree7e76d2a3f547aaa5270463c32ea0b59c817aaa06 /compiler
parentdb1ab49336bee30258561682f780fdeefa598f58 (diff)
downloadvala-44af0246c480b9421f391dd71376298b43a99e2a.tar.gz
Warn about unused attributes
This may not be the best approach, but it's a start
Diffstat (limited to 'compiler')
-rw-r--r--compiler/valacompiler.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index 3f881244d..fe0fdb9ae 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -457,6 +457,12 @@ 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 ();
+ }
+
if (!ccode_only) {
var ccompiler = new CCodeCompiler ();
if (cc_command == null && Environment.get_variable ("CC") != null) {