/* blockcontent.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override void configure (Settings settings, ResourceLocator locator) {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
foreach (Block element in _content) {
- element.check (api_root, container, reporter, settings);
+ element.check (api_root, container, file_path, reporter, settings);
}
}
/* comment.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override void configure (Settings settings, ResourceLocator locator) {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
- base.check (api_root, container, reporter, settings);
+ 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);
foreach (Taglet element in _taglets) {
- element.check (api_root, container, reporter, settings);
+ element.check (api_root, container, file_path, reporter, settings);
}
}
/* contentelement.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public virtual void configure (Settings settings, ResourceLocator locator) {
}
- public abstract void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings);
+ public abstract void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings);
public abstract void accept (ContentVisitor visitor);
/* contentfactory.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/* contentvisitor.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/* embedded.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_locator = locator;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
+ // search relative to our file
+ if (!Path.is_absolute (url)) {
+ string relative_to_file = Path.build_path (Path.DIR_SEPARATOR_S, Path.get_dirname (file_path), url);
+ if (FileUtils.test (relative_to_file, FileTest.EXISTS | FileTest.IS_REGULAR)) {
+ url = (owned) relative_to_file;
+ package = container.package;
+ return ;
+ }
+ }
+
+ // search relative to the current directory / absoulte path
if (!FileUtils.test (url, FileTest.EXISTS | FileTest.IS_REGULAR)) {
reporter.simple_error ("%s does not exist", url);
} else {
/* headline.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_level = 0;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// TODO report error if level == 0 ?
// TODO: content.size == 0?
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* inlinecontent.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
internal InlineContent () {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
foreach (Inline element in _content) {
- element.check (api_root, container, reporter, settings);
+ element.check (api_root, container, file_path, reporter, settings);
}
}
/* taglet.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
this.locator = locator;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
ContentElement element = get_content ();
- element.check (api_root, container, reporter, settings);
+ element.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* link.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override void configure (Settings settings, ResourceLocator locator) {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
//TODO: check url
}
/* list.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_items = new ArrayList<ListItem> ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check individual list items
foreach (ListItem element in _items) {
- element.check (api_root, container, reporter, settings);
+ element.check (api_root, container, file_path, reporter, settings);
}
}
/* listitem.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
base ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
if (sub_list != null) {
- sub_list.check (api_root, container, reporter, settings);
+ sub_list.check (api_root, container, file_path, reporter, settings);
}
}
/* note.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
base ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* paragraph.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
base ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* run.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_style = style;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* sourcecode.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_language = Language.VALA;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
}
public override void accept (ContentVisitor visitor) {
/* symbollink.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override void configure (Settings settings, ResourceLocator locator) {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
}
public override void accept (ContentVisitor visitor) {
/* table.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_rows = new ArrayList<TableRow> ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check the table consistency in term of row/column number
// Check individual rows
foreach (var row in _rows) {
- row.check (api_root, container, reporter, settings);
+ row.check (api_root, container, file_path, reporter, settings);
}
}
/* tablecell.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_rowspan = 1;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* tablerow.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
_cells = new ArrayList<TableCell> ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check individual cells
foreach (var cell in _cells) {
- cell.check (api_root, container, reporter, settings);
+ cell.check (api_root, container, file_path, reporter, settings);
}
}
/* text.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
}
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
}
public override void accept (ContentVisitor visitor) {
/* warning.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
base ();
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check inline content
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* link.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public override void configure (Settings settings, ResourceLocator locator) {
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
page = api_root.wikitree.search (name);
if (page == null) {
reporter.simple_warning ("%s does not exist".printf (name));
/* documentationparser.vala
*
- * Copyright (C) 2008-2011 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
public Comment? parse_comment_str (Api.Node element, string content, string filename, int first_line, int first_column) {
try {
Comment doc_comment = parse_comment (content, filename, first_line, first_column);
- doc_comment.check (_tree, element, _reporter, _settings);
+ doc_comment.check (_tree, element, filename, _reporter, _settings);
return doc_comment;
} catch (ParserError error) {
return null;
try {
Page documentation = parse_wiki (page.documentation_str, page.get_filename ());
- documentation.check (_tree, pkg, _reporter, _settings);
+ documentation.check (_tree, pkg, page.path, _reporter, _settings);
return documentation;
} catch (ParserError error) {
return null;
/* gtkcommentparser.vala
*
- * Copyright (C) 2011 Florian Brosch
+ * Copyright (C) 2011-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
first = false;
}
- comment.check (tree, element, reporter, settings);
+ comment.check (tree, element, gir_comment.file.relative_path, reporter, settings);
return comment;
}
/* tagletdeprecated.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
return run_rule;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
- base.check (api_root, container, reporter, settings);
+ 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);
}
public override void accept (ContentVisitor visitor) {
/* tagletinheritdoc.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
return null;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// TODO Check that the container is an override of an abstract symbol
// Also retrieve that abstract symbol _inherited
/* taglet.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
});
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
if (symbol_name.has_prefix ("c::")) {
_symbol_name = _symbol_name.substring (3);
_symbol = api_root.search_symbol_cstr (container, symbol_name);
reporter.simple_warning ("%s: %s does not exist", container.get_full_name (), symbol_name);
}
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override ContentElement produce_content () {
/* taglet.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// Check for the existence of such a parameter
this.parameter = null;
reporter.simple_warning ("%s: Unknown parameter `%s'", container.get_full_name (), parameter_name);
}
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* taglet.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
return run_rule;
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
// TODO check for the existence of a return type
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {
/* tagletsee.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
});
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
if (symbol_name.has_prefix ("c::")) {
symbol_name = symbol_name.substring (3);
symbol = api_root.search_symbol_cstr (container, symbol_name);
/* tagletsince.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
});
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
}
public override void accept (ContentVisitor visitor) {
/* tagletthrows.vala
*
- * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
+ * Copyright (C) 2008-2009 Didier Villevalois
+ * Copyright (C) 2008-2012 Florian Brosch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
});
}
- public override void check (Api.Tree api_root, Api.Node container, ErrorReporter reporter, Settings settings) {
+ public override void check (Api.Tree api_root, Api.Node container, string file_path, ErrorReporter reporter, Settings settings) {
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 does not exist", error_domain_name);
}
- base.check (api_root, container, reporter, settings);
+ base.check (api_root, container, file_path, reporter, settings);
}
public override void accept (ContentVisitor visitor) {