]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc/taglets: error/warning message improvements
authorFlorian Brosch <flo.brosch@gmail.com>
Sat, 21 Jul 2012 16:14:57 +0000 (18:14 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sat, 21 Jul 2012 16:14:57 +0000 (18:14 +0200)
src/libvaladoc/taglets/tagletdeprecated.vala
src/libvaladoc/taglets/tagletlink.vala
src/libvaladoc/taglets/tagletparam.vala
src/libvaladoc/taglets/tagletreturn.vala
src/libvaladoc/taglets/tagletsee.vala
src/libvaladoc/taglets/tagletthrows.vala

index f685f3fe5ed4a90e365da87a118f11b533d80d74..0d3c19290d94f5cd2aa410b011dd86b622cd78ae 100644 (file)
@@ -31,7 +31,7 @@ public class Valadoc.Taglets.Deprecated : InlineContent, Taglet, Block {
 
        public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
                base.check (api_root, container, file_path, reporter, settings);
-               reporter.simple_warning ("warning: @deprecated is deprecated. Use [Deprecated]");
+               reporter.simple_warning ("%s: %s: @deprecated: warning: @deprecated is deprecated. Use [Deprecated]", file_path, container.get_full_name ());
        }
 
        public override void accept (ContentVisitor visitor) {
index cbe8dc499e0e2dabac22d20e4df512e09531a538..65a6fc706d9264d6e312611e4f5eec088a21672a 100644 (file)
@@ -73,7 +73,8 @@ public class Valadoc.Taglets.Link : InlineTaglet {
 
                if (_symbol == null && symbol_name != "main") {
                        // TODO use ContentElement's source reference
-                       reporter.simple_warning ("%s: %s does not exist", container.get_full_name (), symbol_name);
+                       string node_segment = (container == null)? "" : container.get_full_name () + ": ";
+                       reporter.simple_warning ("%s: %s@link: warning: %s does not exist", file_path, node_segment, symbol_name);
                }
 
                base.check (api_root, container, file_path, reporter, settings);
index bbff4030b54b8480aab269851e0004c7aa7e5f12..36a21eb6bc03103e1ccbd32eac5f3c8f9a49712b 100644 (file)
@@ -70,7 +70,7 @@ public class Valadoc.Taglets.Param : InlineContent, Taglet, Block {
                }
 
                if (this.parameter == null) {
-                       reporter.simple_warning ("%s: Unknown parameter `%s'", container.get_full_name (), parameter_name);
+                       reporter.simple_warning ("%s: %s: @param: warning: Unknown parameter `%s'", file_path, container.get_full_name (), parameter_name);
                }
 
                base.check (api_root, container, file_path, reporter, settings);
index 8a8e0640b83770baf178b41e105cf9071fbd7682..163f0ba53e3f74a1566a5ecd638ab184f553696f 100644 (file)
@@ -39,11 +39,11 @@ public class Valadoc.Taglets.Return : InlineContent, Taglet, Block {
                } else if (container is Api.Signal) {
                        type_ref = ((Api.Signal) container).return_type;
                } else {
-                       reporter.simple_warning ("@return used outside method/delegate/signal context");
+                       reporter.simple_warning ("%s: %s: @return: warning: @return used outside method/delegate/signal context", file_path, container.get_full_name ());
                }
 
                if (type_ref != null && type_ref.data_type == null) {
-                       reporter.simple_warning ("Return description declared for void function");
+                       reporter.simple_warning ("%s: %s: @return: warning: Return description declared for void function", file_path, container.get_full_name ());
                }
 
                base.check (api_root, container, file_path, reporter, settings);
index 895e3c2a22d7a9f92e6af7ecfa5c397941a105ba..fe8f799b58422836e11013779637b8309b3997bb 100644 (file)
@@ -52,7 +52,7 @@ public class Valadoc.Taglets.See : ContentElement, Taglet, Block {
 
                if (symbol == null) {
                        // TODO use ContentElement's source reference
-                       reporter.simple_warning ("%s does not exist", symbol_name);
+                       reporter.simple_warning ("%s: %s: @see: warning: %s does not exist", file_path, container.get_full_name (), symbol_name);
                }
        }
 
index 41366247500aa835b82011ead555d35fe7e15c5e..d833883d46945cb9e5300754411164a23e76aa8f 100644 (file)
@@ -39,7 +39,7 @@ public class Valadoc.Taglets.Throws : InlineContent, Taglet, Block {
        public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
                // context check:
                if (container is Api.Method == false && container is Api.Delegate == false) {
-                       reporter.simple_warning ("@throws used outside method/delegate context");
+                       reporter.simple_warning ("%s: %s: @throws: warning: @throws used outside method/delegate context", file_path, container.get_full_name ());
                        base.check (api_root, container, file_path, reporter, settings);
                        return ;
                }
@@ -49,7 +49,7 @@ public class Valadoc.Taglets.Throws : InlineContent, Taglet, Block {
                error_domain = api_root.search_symbol_str (container, error_domain_name);
                if (error_domain == null) {
                        // TODO use ContentElement's source reference
-                       reporter.simple_error ("%s: %s does not exist", container.get_full_name (), error_domain_name);
+                       reporter.simple_error ("%s: %s: @throws: warning: %s does not exist", file_path, container.get_full_name (), error_domain_name);
                        base.check (api_root, container, file_path, reporter, settings);
                        return ;
                }
@@ -65,7 +65,7 @@ public class Valadoc.Taglets.Throws : InlineContent, Taglet, Block {
                        }
                }
                if (report_warning) {
-                       reporter.simple_warning ("%s: @throws: %s does not exist in exception list", container.get_full_name (), error_domain_name);                    
+                       reporter.simple_warning ("%s: %s: @throws: warning: %s does not exist in exception list", file_path, container.get_full_name (), error_domain_name);                    
                }
 
                base.check (api_root, container, file_path, reporter, settings);