#include <tools/ccanlint/ccanlint.h>
#include <tools/doc_extract.h>
+#include <tools/tools.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
unlink_noerr("_info.new");
err(1, "Closing _info.new");
}
- if (rename("_info.new", "_info") != 0) {
+ if (!move_file("_info.new", "_info")) {
unlink_noerr("_info.new");
err(1, "Renaming _info.new to _info");
}
}
struct ccanlint has_info_documentation = {
- .name = "Documentation in _info file",
+ .key = "info-documentation",
+ .name = "Module has documentation in _info",
.total_score = 3,
.score = has_info_documentation_score,
.check = check_has_info_documentation,